Skip to content

Commit

Permalink
Add react/hook-use-state rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Mar 19, 2022
1 parent 62e64fd commit 9d77b06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
unnamedComponents: 'arrow-function'
}
],
'react/hook-use-state': 'error',
'react/no-access-state-in-setstate': 'error',
'react/no-array-index-key': 'error',
'react/no-arrow-function-lifecycle': 'error',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@
"devDependencies": {
"ava": "^2.4.0",
"eslint": "^8.6.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react": "^7.29.0",
"eslint-plugin-react-hooks": "^4.3.0",
"is-plain-obj": "^3.0.0",
"react": "^17.0.2"
},
"peerDependencies": {
"eslint": ">=8.6.0",
"eslint-plugin-react": ">=7.28.0",
"eslint-plugin-react": ">=7.29.0",
"eslint-plugin-react-hooks": ">=4.3.0"
}
}

0 comments on commit 9d77b06

Please sign in to comment.