Skip to content

Commit 5f34a1e

Browse files
committed
Setup linting for hooks.
1 parent 70e12dd commit 5f34a1e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.eslintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
"jsx": true
1111
}
1212
},
13-
"plugins": ["jest", "promise", "react"],
13+
"plugins": ["jest", "promise", "react", "react-hooks"],
1414
"rules": {
15-
"react/prop-types": "off"
15+
"react/prop-types": "off",
16+
"react-hooks/rules-of-hooks": "error"
1617
},
1718
"settings": {
1819
"react": {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"eslint-plugin-prettier": "3.0.1",
5555
"eslint-plugin-promise": "4.0.1",
5656
"eslint-plugin-react": "7.12.0",
57+
"eslint-plugin-react-hooks": "1.0.1",
5758
"jest": "23.6.0",
5859
"jest-dom": "2.1.0",
5960
"prettier": "1.15.3",

0 commit comments

Comments
 (0)