Skip to content

Commit b1f5e8f

Browse files
committed
Add missing React Hooks rules
Closes #36
1 parent e428bdf commit b1f5e8f

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,22 @@ export default [
232232

233233
'react-hooks/rules-of-hooks': 'error',
234234
'react-hooks/exhaustive-deps': 'warn',
235+
'react-hooks/static-components': 'error',
236+
'react-hooks/use-memo': 'error',
237+
'react-hooks/void-use-memo': 'error',
238+
'react-hooks/component-hook-factories': 'error',
239+
'react-hooks/preserve-manual-memoization': 'error',
240+
'react-hooks/incompatible-library': 'warn',
241+
'react-hooks/immutability': 'error',
242+
'react-hooks/globals': 'error',
243+
'react-hooks/refs': 'error',
244+
'react-hooks/set-state-in-effect': 'error',
245+
'react-hooks/error-boundaries': 'error',
246+
'react-hooks/purity': 'error',
247+
'react-hooks/set-state-in-render': 'error',
248+
'react-hooks/unsupported-syntax': 'warn',
249+
'react-hooks/config': 'error',
250+
'react-hooks/gating': 'error',
235251
},
236252
},
237253
];

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
"simple"
5858
],
5959
"dependencies": {
60-
"eslint-plugin-react": "^7.37.4",
61-
"eslint-plugin-react-hooks": "^5.1.0"
60+
"eslint-plugin-react": "^7.37.5",
61+
"eslint-plugin-react-hooks": "^7.0.1"
6262
},
6363
"devDependencies": {
64-
"ava": "^6.2.0",
65-
"eslint": "^9.18.0",
66-
"react": "^19.0.0"
64+
"ava": "^6.4.1",
65+
"eslint": "^9.38.0",
66+
"react": "^19.2.0"
6767
},
6868
"peerDependencies": {
6969
"eslint": ">=9.18.0"

0 commit comments

Comments
 (0)