Skip to content

Commit a222dee

Browse files
committed
fix: Restore missing hook lint rules
1 parent fa4188a commit a222dee

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

packages/app/eslint.config.mjs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,28 @@ export default [
122122
...nextPlugin.configs.recommended.rules,
123123
...nextPlugin.configs['core-web-vitals'].rules,
124124
...reactHooksPlugin.configs.recommended.rules,
125-
...eslintReactPlugin.configs.recommended.rules,
126-
// Disable rules from eslint-plugin-react-hooks that have equivalent rules in @eslint-react
127-
...eslintReactPlugin.configs['disable-conflict-eslint-plugin-react-hooks'].rules,
128125
...eslintReactPlugin.configs['recommended-type-checked'].rules,
126+
127+
// Non-default react-hooks rules
128+
'react-hooks/set-state-in-render': 'error',
129129
'react-hooks/set-state-in-effect': 'warn',
130130
'react-hooks/exhaustive-deps': 'error',
131+
132+
// Disable rules from @eslint-react that have equivalent rules enabled in eslint-plugin-react-hooks
133+
'@eslint-react/rules-of-hooks': 'off',
134+
'@eslint-react/component-hook-factories': 'off',
135+
'@eslint-react/exhaustive-deps': 'off',
136+
'@eslint-react/error-boundaries': 'off',
137+
'@eslint-react/immutability': 'off',
138+
'@eslint-react/purity': 'off',
139+
'@eslint-react/refs': 'off',
140+
'@eslint-react/set-state-in-effect': 'off',
141+
'@eslint-react/set-state-in-render': 'off',
142+
'@eslint-react/no-nested-component-definitions': 'off',
143+
'@eslint-react/no-nested-lazy-component-declarations': 'off',
144+
'@eslint-react/unsupported-syntax': 'off',
145+
'@eslint-react/use-memo': 'off',
146+
131147
'react-hook-form/no-use-watch': 'error',
132148
'@eslint-react/no-unstable-default-props': 'error',
133149
'@typescript-eslint/ban-ts-comment': 'warn',

0 commit comments

Comments
 (0)