Skip to content

Commit 76b64c4

Browse files
authored
chore: React 19.2 + hooks lint (#2935)
* react 19.2 * upgrade eslint-plugin-react-hooks, use recommended rules
1 parent d8f4e46 commit 76b64c4

File tree

3 files changed

+339
-117
lines changed

3 files changed

+339
-117
lines changed

.eslintrc.cjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = {
2020
'prettier',
2121
'plugin:react-hook-form/recommended',
2222
'plugin:import/recommended',
23+
'plugin:react-hooks/recommended',
2324
],
2425
plugins: [
2526
'@typescript-eslint',
@@ -91,8 +92,16 @@ module.exports = {
9192
'prefer-arrow-callback': 'off',
9293
'prettier/prettier': 'error',
9394
radix: 'error',
95+
96+
// https://react.dev/reference/eslint-plugin-react-hooks#recommended
9497
'react-hooks/exhaustive-deps': 'error',
95-
'react-hooks/rules-of-hooks': 'error',
98+
// recommended rules that go nuts in our codebase. we should fix them
99+
// eventually
100+
'react-hooks/incompatible-library': 'off',
101+
'react-hooks/purity': 'off',
102+
'react-hooks/refs': 'off',
103+
'react-hooks/set-state-in-effect': 'off',
104+
96105
'react/button-has-type': 'error',
97106
'react/jsx-boolean-value': 'error',
98107
'react/display-name': 'off',

0 commit comments

Comments
 (0)