Skip to content

Commit 932b104

Browse files
committed
added eslint-plugin-react-hooks
1 parent f2985d2 commit 932b104

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.eslintrc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
{
22
"parser": "@typescript-eslint/parser",
33
"extends": "airbnb",
4-
"plugins": ["@typescript-eslint", "jest"],
4+
"plugins": ["@typescript-eslint", "jest", "react-hooks"],
55
"env": {
66
"browser": true,
77
"jest/globals": true
88
},
99
"rules": {
1010
"react/jsx-filename-extension": "off",
1111
"indent": ["error", 4],
12+
"no-unused-vars": "off",
1213
"react/jsx-indent": ["error", 4],
1314
"react/jsx-one-expression-per-line": "off",
15+
"react-hooks/rules-of-hooks": "error",
16+
"react-hooks/exhaustive-deps": "warn",
17+
"import/prefer-default-export": "off",
1418
"import/no-extraneous-dependencies": ["error", {
1519
"devDependencies": true
1620
}],
17-
"import/prefer-default-export": "off",
1821
"import/no-unresolved": "off",
19-
"no-unused-vars": "off",
2022
"@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false }]
2123
}
2224
}

package-lock.json

Lines changed: 6 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
@@ -51,6 +51,7 @@
5151
"eslint-plugin-jest": "^22.3.0",
5252
"eslint-plugin-jsx-a11y": "^6.2.1",
5353
"eslint-plugin-react": "^7.12.4",
54+
"eslint-plugin-react-hooks": "^1.5.0",
5455
"file-loader": "^3.0.1",
5556
"fork-ts-checker-webpack-plugin": "^0.5.2",
5657
"html-webpack-plugin": "^3.2.0",

0 commit comments

Comments
 (0)