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 4f261c1 commit 33a4867
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 136 deletions.
14 changes: 12 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"extends": ["plugin:@wordpress/eslint-plugin/recommended"],
"ignorePatterns": ["specs/**"],
"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,
},
],
},
}
258 changes: 129 additions & 129 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 33a4867

Please sign in to comment.