Skip to content

Commit c82dcf0

Browse files
authored
Merge pull request #75 from barroudjo/eslint-plugin-react-hooks
Eslint plugin react hooks
2 parents 2e2e92c + b278e50 commit c82dcf0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

eslintrc.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
},
1515

1616
"plugins": [
17-
"react"
17+
"react",
18+
"react-hooks"
1819
],
1920

2021
"rules": {
@@ -27,6 +28,8 @@
2728
"react/no-unknown-property": "error",
2829
"react/no-unused-prop-types": "error",
2930
"react/prop-types": "error",
30-
"react/react-in-jsx-scope": "error"
31+
"react/react-in-jsx-scope": "error",
32+
"react-hooks/rules-of-hooks": "error",
33+
"react-hooks/exhaustive-deps": "warning"
3134
}
3235
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"main": "index.js",
4949
"peerDependencies": {
5050
"eslint": "^8.8.0",
51-
"eslint-plugin-react": "^7.28.0"
51+
"eslint-plugin-react": "^7.28.0",
52+
"eslint-plugin-react-hooks": "^4.6.0"
5253
},
5354
"repository": {
5455
"type": "git",

0 commit comments

Comments
 (0)