Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions extensions/ql-vscode/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default tseslint.config(
extends: [
react.configs.flat.recommended,
react.configs.flat['jsx-runtime'],
reactHooks.configs['recommended-latest'],
reactHooks.configs.flat['recommended-latest'],
storybook.configs['flat/recommended'],
github.getFlatConfigs().react,
],
Expand All @@ -122,6 +122,10 @@ export default tseslint.config(
version: "detect",
},
},
rules: {
// Disable new strict rules from eslint-plugin-react-hooks 7.0.1 that fail with current codebase
"react-hooks/set-state-in-effect": "off",
},
},
{
files: ["src/view/**/*"],
Expand All @@ -133,14 +137,32 @@ export default tseslint.config(
extends: [
react.configs.flat.recommended,
react.configs.flat['jsx-runtime'],
reactHooks.configs['recommended-latest'],
reactHooks.configs.flat['recommended-latest'],
github.getFlatConfigs().react,
],
settings: {
react: {
version: "detect",
},
},
rules: {
// Disable new strict rules from eslint-plugin-react-hooks 7.0.1 that fail with current codebase
"react-hooks/set-state-in-effect": "off",
"react-hooks/refs": "off",
"react-hooks/purity": "off",
"react-hooks/error-boundaries": "off",
},
},
{
// Special case for files using custom useEffectEvent implementation
files: [
"src/view/common/SuggestBox/useOpenKey.ts",
"src/view/common/SuggestBox/__tests__/useEffectEvent.test.ts",
],
rules: {
"react-hooks/rules-of-hooks": "off",
"react-hooks/exhaustive-deps": "off",
},
},
{
files: ["test/vscode-tests/**/*"],
Expand Down
57 changes: 52 additions & 5 deletions extensions/ql-vscode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,7 @@
"eslint-plugin-jest-dom": "^5.5.0",
"eslint-plugin-prettier": "^5.2.6",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-storybook": "^9.0.12",
"glob": "^11.0.1",
"gulp": "^5.0.0",
Expand Down