Skip to content

Commit

Permalink
build: update eslint configs
Browse files Browse the repository at this point in the history
  • Loading branch information
bigaru committed Dec 6, 2024
1 parent 28a5ddf commit 1751e4e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
13 changes: 11 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
"rules": {
"no-nested-ternary": "off",
"react-hooks/exhaustive-deps": "off",
"import/no-unresolved": [2, { "ignore": ["^@inseri/"] }]
}
"import/no-unresolved": [2, { "ignore": ["^@inseri/"] }],
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"ignoreRestSiblings": true,
},
],
},
}
2 changes: 1 addition & 1 deletion src/components/SortableTh.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface ThProps {
children: React.ReactNode
reversed: boolean
sorted: boolean
onSort(): void
onSort: () => void
}

export function SortableTh({ className, children, reversed, sorted, onSort }: ThProps) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/SourceSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ interface Props extends SelectProps {
selectValue: string | null
activeTab: string | null
tabs: string[]
onSelectChange(value: string | null): void
setActiveTab(value: string | null): void
onSelectChange: (value: string | null) => void
setActiveTab: (value: string | null) => void
}

export function SourceSelect(props: Props) {
Expand Down
4 changes: 2 additions & 2 deletions src/globalScript/lighthouse/useWatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const initState =
const NullFn = () => null
const IdentityFn = (a: Nucleus<any>) => a.value

function useWatch<A = any, B = any>(key: string, ops?: WatchOps): B | null
function useWatch<A = any, B = any>(keys: Record<string, string>, ops?: WatchOps): Record<string, B | null>
function useWatch<A = any, B = any>(key: string, ops?: WatchOps): B | null // eslint-disable-line @typescript-eslint/no-unused-vars
function useWatch<A = any, B = any>(keys: Record<string, string>, ops?: WatchOps): Record<string, B | null> // eslint-disable-line @typescript-eslint/no-unused-vars
function useWatch<A = any, B = any>(keys: string | Record<string, string>, ops?: WatchOps<A, B>): any {
const onBlockRemoved = ops?.onBlockRemoved
const isRecord = typeof keys !== 'string'
Expand Down

0 comments on commit 1751e4e

Please sign in to comment.