Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaMinaei committed Dec 31, 2023
1 parent 2e95e16 commit ef9b4c0
Show file tree
Hide file tree
Showing 34 changed files with 58 additions and 57 deletions.
2 changes: 1 addition & 1 deletion examples/basic-dom/Scene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {UseDragOpts} from './useDrag'
import useDrag from './useDrag'
import theatre from '@theatre/core'

theatre.init({studio: true})
void theatre.init({studio: true})

const boxObjectConfig = {
x: 0,
Expand Down
2 changes: 1 addition & 1 deletion examples/basic-dom/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'
import theatre, {getProject} from '@theatre/core'
import {Scene} from './Scene'

theatre.init({studio: true})
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(
<Scene project={getProject('Sample project')} />,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ export default function EditWorkspaceDialog({
name: values.name,
description: values.description,
})
queryUtils.teams.invalidate()
queryUtils.workspaces.invalidate()
void queryUtils.teams.invalidate()
void queryUtils.workspaces.invalidate()
} catch (error) {
toast({
variant: 'destructive',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function InviteGuestsDialog({
id: workspaceId,
invites: [{email: values.email, accessLevel: values.accessLevel}],
})
queryUtils.workspaces.invalidate()
void queryUtils.workspaces.invalidate()
} catch (error) {
toast({
variant: 'destructive',
Expand Down Expand Up @@ -157,15 +157,15 @@ function Guests({workspaceId}: {workspaceId: string}) {

async function handleRemoveGuest(email: string) {
await removeGuest({id: workspaceId, email})
queryUtils.workspaces.getGuests.invalidate()
void queryUtils.workspaces.getGuests.invalidate()
}

async function handleChangeAccessLevel(
email: string,
accessLevel: 'READ' | 'READ_WRITE',
) {
await changeAccessLevel({id: workspaceId, email, accessLevel})
queryUtils.workspaces.getGuests.invalidate()
void queryUtils.workspaces.getGuests.invalidate()
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const InviteTeamMembersPrompt: FC<{id: string}> = ({id}) => {
id,
invites: [{email: values.email, role: values.role}],
})
queryUtils.teams.invalidate()
void queryUtils.teams.invalidate()
} catch (error) {
toast({
variant: 'destructive',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export default function NewWorkspaceDialog({teamId}: {teamId: string}) {
description: values.description,
teamId,
})
queryUtils.teams.invalidate()
queryUtils.workspaces.invalidate()
void queryUtils.teams.invalidate()
void queryUtils.workspaces.invalidate()
} catch (error) {
toast({
variant: 'destructive',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const Invitations = () => {
<Button
onClick={async () => {
await acceptGuestInvitation({id: invitation.workspaceId})
queryUtils.me.getGuestInvitations.invalidate()
queryUtils.workspaces.invalidate()
void queryUtils.me.getGuestInvitations.invalidate()
void queryUtils.workspaces.invalidate()
}}
size="sm"
>
Expand All @@ -70,8 +70,8 @@ const Invitations = () => {
id: invitation.workspaceId,
email: me.email!,
})
queryUtils.me.getGuestInvitations.invalidate()
queryUtils.workspaces.invalidate()
void queryUtils.me.getGuestInvitations.invalidate()
void queryUtils.workspaces.invalidate()
}}
variant="ghost"
size="sm"
Expand All @@ -91,8 +91,8 @@ const Invitations = () => {
<Button
onClick={async () => {
await acceptTeamInvitation({id: invitation.teamId})
queryUtils.me.getTeamInvitations.invalidate()
queryUtils.teams.invalidate()
void queryUtils.me.getTeamInvitations.invalidate()
void queryUtils.teams.invalidate()
}}
size="sm"
>
Expand All @@ -104,8 +104,8 @@ const Invitations = () => {
id: invitation.teamId,
email: me.email!,
})
queryUtils.me.getTeamInvitations.invalidate()
queryUtils.teams.invalidate()
void queryUtils.me.getTeamInvitations.invalidate()
void queryUtils.teams.invalidate()
}}
variant="ghost"
size="sm"
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/app/(protected)/_components/TeamMembers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export default function Members({teamId}: {teamId: string}) {

async function handleRemoveMember(email: string) {
await removeMember({id: teamId, email})
queryUtils.teams.getMembers.invalidate()
void queryUtils.teams.getMembers.invalidate()
}

async function handleChangeRole(email: string, role: 'MEMBER' | 'OWNER') {
try {
await changeMemberRole({id: teamId, email, role})
queryUtils.teams.getMembers.invalidate()
void queryUtils.teams.getMembers.invalidate()
} catch (error) {
toast({
variant: 'destructive',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function Team({id}: {id: string}) {
size="icon"
className="invisible group-hover:visible"
onClick={() => {
promptTeamSettings(id)
void promptTeamSettings(id)
}}
>
<Settings className="h-4 w-4" />
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function registerCoreBundle() {

const coreBundle = new CoreBundle({
onAttach: (s) => {
initOptsDeferred.promise.then((opts) => {
void initOptsDeferred.promise.then((opts) => {
s.initialize(opts)
studioDeferred.resolve(s)
})
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/shared/camera/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import App from './App'
import theatre from '@theatre/core'
import extension from '@theatre/r3f/dist/extension'

theatre.getStudio().then((studio) => {
void theatre.getStudio().then((studio) => {
studio.extend(extension)
})
theatre.init({serverUrl: 'http://localhost:3000'})
void theatre.init({serverUrl: 'http://localhost:3000'})

ReactDOM.createRoot(document.getElementById('root')!).render(<App />)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import App from './App'
import theatre from '@theatre/core'
import extension from '@theatre/r3f/dist/extension'

theatre.getStudio().then((studio) => studio.extend(extension))
theatre.init({studio: true, serverUrl: 'http://localhost:3000'})
void theatre.getStudio().then((studio) => studio.extend(extension))
void theatre.init({studio: true, serverUrl: 'http://localhost:3000'})

ReactDOM.createRoot(document.getElementById('root')!).render(<App />)
4 changes: 2 additions & 2 deletions packages/playground/src/shared/custom-raf-driver/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ setInterval(() => {
rafDriver.tick(performance.now())
}, 200)

theatre.getStudio().then((studio) => studio.extend(extension))
theatre.init({studio: true, __experimental_rafDriver: rafDriver})
void theatre.getStudio().then((studio) => studio.extend(extension))
void theatre.init({studio: true, __experimental_rafDriver: rafDriver})

ReactDOM.createRoot(document.getElementById('root')!).render(
<App rafDriver={rafDriver} />,
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/shared/dom-basic/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {Scene} from './Scene'
* This is a basic example of using Theatre.js for manipulating the DOM.
*/

theatre.init({studio: true})
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(
<Scene project={getProject('Sample project')} />,
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/shared/dom/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {Scene} from './Scene'
* the selection behavior.
*/

theatre.init({studio: true})
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(
<Scene
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/shared/file/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const project = getProject('Image type playground', {
baseUrl: '/',
},
})
theatre.init({studio: true})
void theatre.init({studio: true})
const sheet = project.sheet('Image type')

const Wrapper = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {onChange} from '@theatre/core'
* This will ensure that our switch's value matches its state and is reflected in the UI via `set(toolset)`.
*/

theatre.getStudio().then((studio) => {
void theatre.getStudio().then((studio) => {
studio.extend(extension)
studio.extend({
id: '@theatre/hello-world-extension',
Expand Down Expand Up @@ -70,6 +70,6 @@ theatre.getStudio().then((studio) => {
panes: [],
})
})
theatre.init({studio: true})
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(<App />)
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const dataConfig = {
}),
}

theatre.getStudio().then((studio) => {
void theatre.getStudio().then((studio) => {
studio.extend(extension)
studio.extend({
id: '@theatre/hello-world-extension',
Expand Down Expand Up @@ -62,6 +62,6 @@ theatre.getStudio().then((studio) => {
panes: [],
})
})
theatre.init({studio: true})
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(<App />)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import App from './App'
import theatre from '@theatre/core'
import extension from '@theatre/r3f/dist/extension'

theatre.getStudio().then((studio) => {
void theatre.getStudio().then((studio) => {
studio.extend(extension)
studio.extend({
id: '@theatre/hello-world-extension',
Expand Down Expand Up @@ -92,6 +92,6 @@ theatre.getStudio().then((studio) => {
],
})
})
theatre.init({studio: true})
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(<App />)
2 changes: 1 addition & 1 deletion packages/playground/src/shared/image/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const project = getProject('Image type playground', {
baseUrl: '/',
},
})
theatre.init({studio: true})
void theatre.init({studio: true})
const sheet = project.sheet('Image type')

const Wrapper = styled.div`
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/shared/instances/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import App from './App'
import theatre from '@theatre/core'
import extension from '@theatre/r3f/dist/extension'

theatre.getStudio().then((studio) => studio.extend(extension))
theatre.init({studio: true})
void theatre.getStudio().then((studio) => studio.extend(extension))
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/shared/notifications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import theatre from '@theatre/core'
import {getProject, notify} from '@theatre/core'
import {Scene} from './Scene'

theatre.init({studio: true})
void theatre.init({studio: true})

// trigger warning notification
void getProject('Sample project').sheet('Scene').sequence.play()
Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/shared/r3f-rocket/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import App from './App'
import theatre from '@theatre/core'
import extension from '@theatre/r3f/dist/extension'

theatre.getStudio().then((studio) => studio.extend(extension))
theatre.init({studio: true})
void theatre.getStudio().then((studio) => studio.extend(extension))
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(<App />)
2 changes: 1 addition & 1 deletion packages/playground/src/shared/remote/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Scene} from './Scene'
import RemoteController from './RemoteController'

const project = getProject('Sample project')
theatre.init({studio: true})
void theatre.init({studio: true})
RemoteController(project)

ReactDOM.createRoot(document.getElementById('root')!).render(<Scene />)
2 changes: 1 addition & 1 deletion packages/playground/src/shared/sync/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import theatre from '@theatre/core'
import {getProject} from '@theatre/core'

theatre.init({
void theatre.init({
studio: true,
// __experimental_syncServer: 'wss://syncserver-kspg.onrender.com',
serverUrl: 'http://localhost:3000',
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/shared/three-basic/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import theatre from '@theatre/core'
import {getProject} from '@theatre/core'
import ThreeScene from './ThreeScene'

theatre.init({studio: true})
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(
<ThreeScene project={getProject('Three Basic')} />,
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/shared/turtle/TurtleRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {types} from '@theatre/core'
import type {ITurtle} from './turtle'
import {drawTurtlePlan, makeTurtlePlan} from './turtle'

theatre.init({studio: true})
void theatre.init({studio: true})

const objConfig = {
startingPoint: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ext1: IExtension = {
panes: [],
}

theatre.init({studio: true, usePersistentStorage: false})
void theatre.init({studio: true, usePersistentStorage: false})

let currentStep = -1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const ext1: IExtension = {
panes: [],
}

theatre.init({studio: true, usePersistentStorage: false})
void theatre.init({studio: true, usePersistentStorage: false})

let currentStep = -1

Expand Down
4 changes: 2 additions & 2 deletions packages/playground/src/tests/r3f-dynamic-tree/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import App from './App'
import theatre from '@theatre/core'
import extension from '@theatre/r3f/dist/extension'

theatre.getStudio().then((studio) => studio.extend(extension))
theatre.init({studio: true, usePersistentStorage: false})
void theatre.getStudio().then((studio) => studio.extend(extension))
void theatre.init({studio: true, usePersistentStorage: false})

ReactDOM.createRoot(document.getElementById('root')!).render(<App />)
4 changes: 2 additions & 2 deletions packages/playground/src/tests/r3f-stress-test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import getStudio from '@theatre/studio/getStudio'

const studioPrivate = getStudio()

theatre.getStudio().then((studio) => studio.extend(extension))
theatre.init({studio: true})
void theatre.getStudio().then((studio) => studio.extend(extension))
void theatre.init({studio: true})

ReactDOM.createRoot(document.getElementById('root')!).render(<App />)

Expand Down
3 changes: 2 additions & 1 deletion packages/playground/src/tests/reading-obj-value/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import theatre from '@theatre/core'
import {getProject, types} from '@theatre/core'
import state from './reading obj value.theatre-project-state.json'
theatre.init({studio: true, usePersistentStorage: false})

void theatre.init({studio: true, usePersistentStorage: false})

const project = getProject('reading obj value', {state})
const TOTAL_ELEMENTS = 300
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import theatre from '@theatre/core'
import {getProject} from '@theatre/core'

theatre.init({studio: true, usePersistentStorage: false})
void theatre.init({studio: true, usePersistentStorage: false})

const project = getProject('sample project')
const sheet = project.sheet('sample sheet')
Expand Down
Loading

0 comments on commit ef9b4c0

Please sign in to comment.