Skip to content

Commit be7f5a5

Browse files
AmirrezaASafaeirad
authored andcommitted
feat: upgrade react-hooks plugin
1 parent 1826ded commit be7f5a5

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

package-lock.json

Lines changed: 20 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"eslint-plugin-playwright": "2.2.2",
5252
"eslint-plugin-prettier": "5.5.4",
5353
"eslint-plugin-promise": "7.2.1",
54-
"eslint-plugin-react-hooks": "6.1.1",
54+
"eslint-plugin-react-hooks": "7.0.0",
5555
"eslint-plugin-regexp": "2.10.0",
5656
"eslint-plugin-storybook": "0.12.0",
5757
"globals": "16.4.0",

src/modules/react.mjs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,24 @@ function react(options = {}) {
113113
'@eslint-react/web-api/no-leaked-interval': 'error',
114114
'@eslint-react/web-api/no-leaked-resize-observer': 'error',
115115

116-
'react-hooks/exhaustive-deps': 'warn',
117116
'react-hooks/rules-of-hooks': 'error',
117+
'react-hooks/exhaustive-deps': 'warn',
118+
119+
'react-hooks/config': 'error',
120+
'react-hooks/error-boundaries': 'error',
121+
'react-hooks/component-hook-factories': 'error',
122+
'react-hooks/gating': 'error',
123+
'react-hooks/globals': 'error',
124+
'react-hooks/immutability': 'error',
125+
'react-hooks/preserve-manual-memoization': 'error',
126+
'react-hooks/purity': 'error',
127+
'react-hooks/refs': 'error',
128+
'react-hooks/set-state-in-effect': 'error',
129+
'react-hooks/set-state-in-render': 'error',
130+
'react-hooks/static-components': 'error',
131+
'react-hooks/unsupported-syntax': 'warn',
132+
'react-hooks/use-memo': 'error',
133+
'react-hooks/incompatible-library': 'warn',
118134

119135
'jsx-a11y/alt-text': 'warn',
120136
'jsx-a11y/anchor-has-content': 'error',

0 commit comments

Comments
 (0)