Skip to content

Commit c4eec7a

Browse files
committed
detail: force error for exhaustive-deps (and don't rely on outdated 'recommended' config of react hooks)
1 parent b143fd1 commit c4eec7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

eslint.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export default typescript.config(
2525
rules: {
2626
...react.configs.recommended.rules,
2727
...react.configs['jsx-runtime'].rules,
28-
...reactHooks.configs.recommended.rules,
2928
'react-refresh/only-export-components': [
3029
'warn',
3130
{ allowConstantExport: true },
@@ -78,6 +77,9 @@ export default typescript.config(
7877
'@typescript-eslint/restrict-template-expressions': 'off',
7978
'@typescript-eslint/no-unused-vars': 'warn',
8079
'@typescript-eslint/require-await': 'warn',
80+
// react hooks
81+
'react-hooks/rules-of-hooks': 'error',
82+
'react-hooks/exhaustive-deps': 'error',
8183
},
8284
settings: { react: { version: 'detect' } },
8385
},

0 commit comments

Comments
 (0)