diff --git a/.eslintrc b/.eslintrc index 8b468fe1..9b2455a7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -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, + }, + ], + }, } diff --git a/src/components/SortableTh.tsx b/src/components/SortableTh.tsx index 4575b1a2..c30acc7b 100644 --- a/src/components/SortableTh.tsx +++ b/src/components/SortableTh.tsx @@ -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) { diff --git a/src/components/SourceSelect.tsx b/src/components/SourceSelect.tsx index b21da1cf..896dcce5 100644 --- a/src/components/SourceSelect.tsx +++ b/src/components/SourceSelect.tsx @@ -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) { diff --git a/src/globalScript/lighthouse/useWatch.tsx b/src/globalScript/lighthouse/useWatch.tsx index d95c022f..8ca9ed30 100644 --- a/src/globalScript/lighthouse/useWatch.tsx +++ b/src/globalScript/lighthouse/useWatch.tsx @@ -57,8 +57,8 @@ const initState = const NullFn = () => null const IdentityFn = (a: Nucleus) => a.value -function useWatch(key: string, ops?: WatchOps): B | null -function useWatch(keys: Record, ops?: WatchOps): Record +function useWatch(key: string, ops?: WatchOps): B | null // eslint-disable-line @typescript-eslint/no-unused-vars +function useWatch(keys: Record, ops?: WatchOps): Record // eslint-disable-line @typescript-eslint/no-unused-vars function useWatch(keys: string | Record, ops?: WatchOps): any { const onBlockRemoved = ops?.onBlockRemoved const isRecord = typeof keys !== 'string'