Skip to content

Commit fc0d555

Browse files
authored
chore: improve eslint config (#2568)
1 parent 4ca86da commit fc0d555

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import importOrderConfig from '@gravity-ui/eslint-config/import-order';
33
import prettierConfig from '@gravity-ui/eslint-config/prettier';
44
import typescriptParser from '@typescript-eslint/parser';
55
import importPlugin from 'eslint-plugin-import';
6+
import reactHooks from 'eslint-plugin-react-hooks';
67
import globals from 'globals';
78

89
export default [
910
{
1011
plugins: {
1112
import: importPlugin,
13+
'react-hooks': reactHooks,
1214
},
1315
},
1416
...baseConfig,
@@ -43,6 +45,7 @@ export default [
4345
rules: {
4446
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
4547
curly: ['error', 'all'],
48+
'react-hooks/exhaustive-deps': 'warn',
4649
},
4750
},
4851
// TypeScript-specific rules that require type information

package-lock.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
"@typescript-eslint/parser": "^8.34.1",
149149
"copyfiles": "^2.4.1",
150150
"eslint-plugin-import": "^2.31.0",
151+
"eslint-plugin-react-hooks": "^5.2.0",
151152
"globals": "^16.2.0",
152153
"http-proxy-middleware": "^2.0.7",
153154
"husky": "^9.1.7",

0 commit comments

Comments
 (0)