Skip to content

Commit 39b6a39

Browse files
authored
fix react hooks rules (#36)
1 parent 5b46769 commit 39b6a39

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

.eslintrc.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
11
extends: '@appbooster/eslint-config-base'
2-
plugins:
3-
- react-hooks
4-
rules:
5-
react-hooks/rules-of-hooks: error
6-
react-hooks/exhaustive-deps: warn

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ module.exports = {
1313
'react/jsx-uses-react': 1,
1414
'react/jsx-no-undef': 2,
1515
'react/jsx-no-bind': 2,
16+
'react-hooks/rules-of-hooks': 2,
17+
'react-hooks/exhaustive-deps': 1,
1618
'react/sort-comp': [2, {
1719
order: [
1820
'type-annotations',
@@ -25,6 +27,7 @@ module.exports = {
2527
},
2628
plugins: [
2729
'react',
30+
'react-hooks',
2831
'jest',
2932
],
3033
overrides: [{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@appbooster/eslint-config-react",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "Appbooster's ESLint config for applications with react framework, following our styleguide",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)