@@ -113,7 +113,7 @@ export default tseslint.config(
113113 extends: [
114114 react.configs.flat.recommended,
115115 react.configs.flat['jsx-runtime'],
116- reactHooks.configs['recommended-latest'],
116+ reactHooks.configs.flat ['recommended-latest'],
117117 storybook.configs['flat/recommended'],
118118 github.getFlatConfigs().react,
119119 ],
@@ -122,6 +122,10 @@ export default tseslint.config(
122122 version: "detect",
123123 },
124124 },
125+ rules: {
126+ // Disable new strict rules from eslint-plugin-react-hooks 7.0.1 that fail with current codebase
127+ "react-hooks/set-state-in-effect": "off",
128+ },
125129 },
126130 {
127131 files: ["src/view/**/*"],
@@ -133,14 +137,32 @@ export default tseslint.config(
133137 extends: [
134138 react.configs.flat.recommended,
135139 react.configs.flat['jsx-runtime'],
136- reactHooks.configs['recommended-latest'],
140+ reactHooks.configs.flat ['recommended-latest'],
137141 github.getFlatConfigs().react,
138142 ],
139143 settings: {
140144 react: {
141145 version: "detect",
142146 },
143147 },
148+ rules: {
149+ // Disable new strict rules from eslint-plugin-react-hooks 7.0.1 that fail with current codebase
150+ "react-hooks/set-state-in-effect": "off",
151+ "react-hooks/refs": "off",
152+ "react-hooks/purity": "off",
153+ "react-hooks/error-boundaries": "off",
154+ },
155+ },
156+ {
157+ // Special case for files using custom useEffectEvent implementation
158+ files: [
159+ "src/view/common/SuggestBox/useOpenKey.ts",
160+ "src/view/common/SuggestBox/__tests__/useEffectEvent.test.ts",
161+ ],
162+ rules: {
163+ "react-hooks/rules-of-hooks": "off",
164+ "react-hooks/exhaustive-deps": "off",
165+ },
144166 },
145167 {
146168 files: ["test/vscode-tests/**/*"],
0 commit comments