From dc993b928420743b76189cd6e1a8a3c73de46db1 Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Thu, 27 Nov 2025 21:05:49 -0500 Subject: [PATCH 1/8] Bump `eslint-plugin-react-hooks` from `^5.2.0` to `^6.1.1` --- package.json | 2 +- yarn.lock | 31 ++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 4547675a38cc..fed5a1ed2a95 100644 --- a/package.json +++ b/package.json @@ -617,7 +617,7 @@ "eslint-plugin-prettier": "^5.5.1", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-compiler": "19.1.0-rc.2", - "eslint-plugin-react-hooks": "^5.2.0", + "eslint-plugin-react-hooks": "^6.1.1", "eslint-plugin-storybook": "^0.6.15", "eslint-plugin-tailwindcss": "^3.18.0", "eta": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index 1c49185b79ee..6623f40e63ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24320,12 +24320,17 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^5.2.0": - version: 5.2.0 - resolution: "eslint-plugin-react-hooks@npm:5.2.0" +"eslint-plugin-react-hooks@npm:^6.1.1": + version: 6.1.1 + resolution: "eslint-plugin-react-hooks@npm:6.1.1" + dependencies: + "@babel/core": "npm:^7.24.4" + "@babel/parser": "npm:^7.24.4" + zod: "npm:^3.22.4 || ^4.0.0" + zod-validation-error: "npm:^3.0.3 || ^4.0.0" peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - checksum: 10/ebb79e9cf69ae06e3a7876536653c5e556b5fd8cd9dc49577f10a6e728360e7b6f5ce91f4339b33e93b26e3bb23805418f8b5e75db80baddd617b1dffe73bed1 + checksum: 10/dcd74dbff0f18ba5aa1d36f0e414628f99c25f14e5bd7ce8205d719dd488adca7530d15ea429ffbc94b09ab6d499160a2e3d2a9a9d9a72f9d517c79e6b472ba6 languageName: node linkType: hard @@ -33050,7 +33055,7 @@ __metadata: eslint-plugin-prettier: "npm:^5.5.1" eslint-plugin-react: "npm:^7.37.5" eslint-plugin-react-compiler: "npm:19.1.0-rc.2" - eslint-plugin-react-hooks: "npm:^5.2.0" + eslint-plugin-react-hooks: "npm:^6.1.1" eslint-plugin-storybook: "npm:^0.6.15" eslint-plugin-tailwindcss: "npm:^3.18.0" eta: "npm:^3.2.0" @@ -45427,6 +45432,15 @@ __metadata: languageName: node linkType: hard +"zod-validation-error@npm:^3.0.3 || ^4.0.0": + version: 4.0.2 + resolution: "zod-validation-error@npm:4.0.2" + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + checksum: 10/5e35ca8ebb4602dcb526e122d7e9fca695c4a479bd97535f3400a732d49160f24f7213a9ed64986fc9dc3a2e8a6c4e1241ec0c4d8a4e3e69ea91a0328ded2192 + languageName: node + linkType: hard + "zod@npm:3.22.4": version: 3.22.4 resolution: "zod@npm:3.22.4" @@ -45441,6 +45455,13 @@ __metadata: languageName: node linkType: hard +"zod@npm:^3.22.4 || ^4.0.0": + version: 4.1.13 + resolution: "zod@npm:4.1.13" + checksum: 10/0679190318928f69fcb07751063719de232c663b13955fcdb55db59839569d39f3f29b955cb0cba7af0b724233f88c06b3e84c550397ad4e68f8088fa6799d88 + languageName: node + linkType: hard + "zstd-codec@npm:^0.1.4": version: 0.1.4 resolution: "zstd-codec@npm:0.1.4" From c36fe5fa56bd4847d059f6cac941a07afbb771e5 Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Fri, 28 Nov 2025 02:24:55 +0000 Subject: [PATCH 2/8] Update LavaMoat policies --- lavamoat/build-system/policy.json | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 497155b5ec35..ba3aa69e4653 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -2956,8 +2956,21 @@ } }, "eslint-plugin-react-hooks": { + "builtin": { + "crypto.createHmac": true, + "util.isDeepStrictEqual": true + }, "globals": { - "process.env.NODE_ENV": true + "console": true, + "performance.mark": true, + "performance.measure": true, + "process": true + }, + "packages": { + "@babel/core": true, + "@babel/core>@babel/parser": true, + "eslint-plugin-react-hooks>zod-validation-error": true, + "eslint-plugin-react-hooks>zod": true } }, "eslint>eslint-scope": { @@ -8900,6 +8913,22 @@ "packages": { "gulp-zip>yazl>buffer-crc32": true } + }, + "eslint-plugin-react-hooks>zod-validation-error": { + "packages": { + "eslint-plugin-react-hooks>zod": true + } + }, + "eslint-plugin-react-hooks>zod": { + "globals": { + "File": true, + "URL": true, + "__zod_globalRegistry": true, + "atob": true, + "btoa": true, + "console.warn": true, + "navigator": true + } } } } \ No newline at end of file From 07de5fa2278a537dc76d0e810f10592647efbcde Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Fri, 28 Nov 2025 08:10:35 -0500 Subject: [PATCH 3/8] Manually configure lint entries provided by `plugin:react-hooks/recommended` --- .eslintrc.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8b38b1890d32..e1a330db3010 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -314,14 +314,16 @@ module.exports = { 'test/jest/rendering.js', 'ui/**/*.js', ], - extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'], + extends: ['plugin:react/recommended'], parserOptions: { ecmaFeatures: { jsx: true, }, }, - plugins: ['react', 'react-compiler'], + plugins: ['react', 'react-hooks', 'react-compiler'], rules: { + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', 'react-compiler/react-compiler': 'error', 'react/no-unused-prop-types': 'error', 'react/no-unused-state': 'error', @@ -357,14 +359,16 @@ module.exports = { */ { files: ['ui/**/*.ts', 'ui/**/*.tsx'], - extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'], + extends: ['plugin:react/recommended'], parserOptions: { ecmaFeatures: { jsx: true, }, }, - plugins: ['react', 'react-compiler'], + plugins: ['react', 'react-hooks', 'react-compiler'], rules: { + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', 'react-compiler/react-compiler': 'error', 'react/no-unused-prop-types': 'warn', 'react/no-unused-state': 'warn', @@ -378,7 +382,6 @@ module.exports = { 'react/prop-types': 'off', 'react/no-children-prop': 'off', 'react/jsx-key': 'warn', // TODO - increase this into 'error' level - 'react-hooks/rules-of-hooks': 'error', }, settings: { react: { From 402c83106900aba554d7a457dc7f44bcbe9797fd Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Fri, 28 Nov 2025 16:42:26 -0500 Subject: [PATCH 4/8] Bump `eslint-plugin-react-hooks` from `^6.1.1` to `^7.0.1` --- package.json | 2 +- yarn.lock | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index fed5a1ed2a95..75903de1562f 100644 --- a/package.json +++ b/package.json @@ -617,7 +617,7 @@ "eslint-plugin-prettier": "^5.5.1", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-compiler": "19.1.0-rc.2", - "eslint-plugin-react-hooks": "^6.1.1", + "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-storybook": "^0.6.15", "eslint-plugin-tailwindcss": "^3.18.0", "eta": "^3.2.0", diff --git a/yarn.lock b/yarn.lock index 6623f40e63ee..8fe86005a4b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24320,17 +24320,18 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^6.1.1": - version: 6.1.1 - resolution: "eslint-plugin-react-hooks@npm:6.1.1" +"eslint-plugin-react-hooks@npm:^7.0.1": + version: 7.0.1 + resolution: "eslint-plugin-react-hooks@npm:7.0.1" dependencies: "@babel/core": "npm:^7.24.4" "@babel/parser": "npm:^7.24.4" - zod: "npm:^3.22.4 || ^4.0.0" - zod-validation-error: "npm:^3.0.3 || ^4.0.0" + hermes-parser: "npm:^0.25.1" + zod: "npm:^3.25.0 || ^4.0.0" + zod-validation-error: "npm:^3.5.0 || ^4.0.0" peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - checksum: 10/dcd74dbff0f18ba5aa1d36f0e414628f99c25f14e5bd7ce8205d719dd488adca7530d15ea429ffbc94b09ab6d499160a2e3d2a9a9d9a72f9d517c79e6b472ba6 + checksum: 10/12e96c68d58c6588305fd17d660524a1ef1e872650ec591d5b138f059431290831c373d4b1c9ae8991fb25f96c43935497d2149678c027e65d0417d3d99ecc85 languageName: node linkType: hard @@ -33055,7 +33056,7 @@ __metadata: eslint-plugin-prettier: "npm:^5.5.1" eslint-plugin-react: "npm:^7.37.5" eslint-plugin-react-compiler: "npm:19.1.0-rc.2" - eslint-plugin-react-hooks: "npm:^6.1.1" + eslint-plugin-react-hooks: "npm:^7.0.1" eslint-plugin-storybook: "npm:^0.6.15" eslint-plugin-tailwindcss: "npm:^3.18.0" eta: "npm:^3.2.0" @@ -45432,7 +45433,7 @@ __metadata: languageName: node linkType: hard -"zod-validation-error@npm:^3.0.3 || ^4.0.0": +"zod-validation-error@npm:^3.5.0 || ^4.0.0": version: 4.0.2 resolution: "zod-validation-error@npm:4.0.2" peerDependencies: @@ -45455,7 +45456,7 @@ __metadata: languageName: node linkType: hard -"zod@npm:^3.22.4 || ^4.0.0": +"zod@npm:^3.25.0 || ^4.0.0": version: 4.1.13 resolution: "zod@npm:4.1.13" checksum: 10/0679190318928f69fcb07751063719de232c663b13955fcdb55db59839569d39f3f29b955cb0cba7af0b724233f88c06b3e84c550397ad4e68f8088fa6799d88 From c5d7a56c499c0459ac76f72e37b41bb32d54987a Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Fri, 28 Nov 2025 21:59:16 +0000 Subject: [PATCH 5/8] Update LavaMoat policies --- lavamoat/build-system/policy.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index ba3aa69e4653..293185b40ec5 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -2969,6 +2969,7 @@ "packages": { "@babel/core": true, "@babel/core>@babel/parser": true, + "eslint-plugin-react-hooks>hermes-parser": true, "eslint-plugin-react-hooks>zod-validation-error": true, "eslint-plugin-react-hooks>zod": true } @@ -3987,6 +3988,32 @@ "browserify>has>function-bind": true } }, + "eslint-plugin-react-hooks>hermes-parser": { + "builtin": { + "fs.readFile": true, + "fs.readFileSync": true, + "path.dirname": true, + "path.normalize": true + }, + "globals": { + "Buffer.from": true, + "TextDecoder": true, + "URL": true, + "WebAssembly": true, + "__dirname": true, + "__filename": true, + "atob": true, + "clearInterval": true, + "clearTimeout": true, + "console": true, + "define": true, + "document": true, + "navigator": true, + "performance.now": true, + "process": true, + "setTimeout": true + } + }, "stylelint>postcss-html>htmlparser2": { "builtin": { "buffer.Buffer": true, From 193326da54af4929c4bf8d62476f13cf7d47b759 Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Tue, 2 Dec 2025 01:42:47 -0500 Subject: [PATCH 6/8] Remove deprecated `eslint-plugin-react-compiler` pre-release version --- package.json | 1 - yarn.lock | 42 ++---------------------------------------- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 75903de1562f..2173dd274ed6 100644 --- a/package.json +++ b/package.json @@ -616,7 +616,6 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^5.5.1", "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-compiler": "19.1.0-rc.2", "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-storybook": "^0.6.15", "eslint-plugin-tailwindcss": "^3.18.0", diff --git a/yarn.lock b/yarn.lock index 8fe86005a4b4..5944d22ba9b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -306,7 +306,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.25.9": +"@babel/helper-create-class-features-plugin@npm:^7.25.9": version: 7.28.3 resolution: "@babel/helper-create-class-features-plugin@npm:7.28.3" dependencies: @@ -666,18 +666,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-proposal-private-methods@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-proposal-private-methods@npm:7.18.6" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10/22d8502ee96bca99ad2c8393e8493e2b8d4507576dd054490fd8201a36824373440106f5b098b6d821b026c7e72b0424ff4aeca69ed5f42e48f029d3a156d5ad - languageName: node - linkType: hard - "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": version: 7.21.0-placeholder-for-preset-env.2 resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" @@ -24304,22 +24292,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-compiler@npm:19.1.0-rc.2": - version: 19.1.0-rc.2 - resolution: "eslint-plugin-react-compiler@npm:19.1.0-rc.2" - dependencies: - "@babel/core": "npm:^7.24.4" - "@babel/parser": "npm:^7.24.4" - "@babel/plugin-proposal-private-methods": "npm:^7.18.6" - hermes-parser: "npm:^0.25.1" - zod: "npm:^3.22.4" - zod-validation-error: "npm:^3.0.3" - peerDependencies: - eslint: ">=7" - checksum: 10/cabdcbe884722049c11e84a13d1b2747c0612c61b23505fdf7b69dd9ee26e0f4bb86452486708fb359205ab5770b279d8dabac3a2d0c4409a176773eed7a4471 - languageName: node - linkType: hard - "eslint-plugin-react-hooks@npm:^7.0.1": version: 7.0.1 resolution: "eslint-plugin-react-hooks@npm:7.0.1" @@ -33055,7 +33027,6 @@ __metadata: eslint-plugin-node: "npm:^11.1.0" eslint-plugin-prettier: "npm:^5.5.1" eslint-plugin-react: "npm:^7.37.5" - eslint-plugin-react-compiler: "npm:19.1.0-rc.2" eslint-plugin-react-hooks: "npm:^7.0.1" eslint-plugin-storybook: "npm:^0.6.15" eslint-plugin-tailwindcss: "npm:^3.18.0" @@ -45424,15 +45395,6 @@ __metadata: languageName: node linkType: hard -"zod-validation-error@npm:^3.0.3": - version: 3.5.3 - resolution: "zod-validation-error@npm:3.5.3" - peerDependencies: - zod: ^3.25.0 || ^4.0.0 - checksum: 10/f550565ffb2a0a1733616d856302184dbe2080ec649ff9361125467065c3dfa02aeb5bf399605cdb61fe640f79ff1fe8ad0805f6e0c8144fa34764cad58f4401 - languageName: node - linkType: hard - "zod-validation-error@npm:^3.5.0 || ^4.0.0": version: 4.0.2 resolution: "zod-validation-error@npm:4.0.2" @@ -45449,7 +45411,7 @@ __metadata: languageName: node linkType: hard -"zod@npm:3.25.76, zod@npm:^3.22.4": +"zod@npm:3.25.76": version: 3.25.76 resolution: "zod@npm:3.25.76" checksum: 10/f0c963ec40cd96858451d1690404d603d36507c1fc9682f2dae59ab38b578687d542708a7fdbf645f77926f78c9ed558f57c3d3aa226c285f798df0c4da16995 From ccf0c2dbe5f99ccdc952f7c6f618f05d7e301bef Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Tue, 2 Dec 2025 02:04:12 -0500 Subject: [PATCH 7/8] Replace `react-compiler` ESLint rules with `react-hooks` rules --- .eslintrc.js | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e1a330db3010..88b155cea20f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -320,11 +320,25 @@ module.exports = { jsx: true, }, }, - plugins: ['react', 'react-hooks', 'react-compiler'], + plugins: ['react', 'react-hooks'], rules: { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', - 'react-compiler/react-compiler': 'error', + 'react-hooks/component-hook-factories': 'error', // Validates higher order functions defining nested components or hooks + 'react-hooks/config': 'error', // Validates the compiler configuration options + 'react-hooks/error-boundaries': 'error', // Validates usage of Error Boundaries instead of try/catch for child errors + 'react-hooks/gating': 'error', // Validates configuration of gating mode + 'react-hooks/globals': 'error', // Validates against assignment/mutation of globals during render + 'react-hooks/immutability': 'error', // Validates against mutating props, state, and other immutable values + 'react-hooks/incompatible-library': 'error', // Validates against usage of libraries which are incompatible with memoization + 'react-hooks/preserve-manual-memoization': 'error', // Validates that existing manual memoization is preserved by the compiler + 'react-hooks/purity': 'error', // Validates that components/hooks are pure by checking known-impure functions + 'react-hooks/refs': 'error', // Validates correct usage of refs, not reading/writing during render + 'react-hooks/set-state-in-effect': 'error', // Validates against calling setState synchronously in an effect + 'react-hooks/set-state-in-render': 'error', // Validates against setting state during render + 'react-hooks/static-components': 'error', // Validates that components are static, not recreated every render + 'react-hooks/unsupported-syntax': 'error', // Validates against syntax that React Compiler does not support + 'react-hooks/use-memo': 'error', // Validates usage of the useMemo hook without a return value 'react/no-unused-prop-types': 'error', 'react/no-unused-state': 'error', 'react/jsx-boolean-value': 'error', @@ -365,11 +379,25 @@ module.exports = { jsx: true, }, }, - plugins: ['react', 'react-hooks', 'react-compiler'], + plugins: ['react', 'react-hooks'], rules: { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', - 'react-compiler/react-compiler': 'error', + 'react-hooks/component-hook-factories': 'error', // Validates higher order functions defining nested components or hooks + 'react-hooks/config': 'error', // Validates the compiler configuration options + 'react-hooks/error-boundaries': 'error', // Validates usage of Error Boundaries instead of try/catch for child errors + 'react-hooks/gating': 'error', // Validates configuration of gating mode + 'react-hooks/globals': 'error', // Validates against assignment/mutation of globals during render + 'react-hooks/immutability': 'error', // Validates against mutating props, state, and other immutable values + 'react-hooks/incompatible-library': 'error', // Validates against usage of libraries which are incompatible with memoization + 'react-hooks/preserve-manual-memoization': 'error', // Validates that existing manual memoization is preserved by the compiler + 'react-hooks/purity': 'error', // Validates that components/hooks are pure by checking known-impure functions + 'react-hooks/refs': 'error', // Validates correct usage of refs, not reading/writing during render + 'react-hooks/set-state-in-effect': 'error', // Validates against calling setState synchronously in an effect + 'react-hooks/set-state-in-render': 'error', // Validates against setting state during render + 'react-hooks/static-components': 'error', // Validates that components are static, not recreated every render + 'react-hooks/unsupported-syntax': 'error', // Validates against syntax that React Compiler does not support + 'react-hooks/use-memo': 'error', // Validates usage of the useMemo hook without a return value 'react/no-unused-prop-types': 'warn', 'react/no-unused-state': 'warn', 'react/jsx-boolean-value': 'off', From bf205712b825699f3e237a79f10baa41b4f1e63b Mon Sep 17 00:00:00 2001 From: Jongsun Suh Date: Tue, 2 Dec 2025 14:29:02 -0500 Subject: [PATCH 8/8] Set most new rulesets to warn --- .eslintrc.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 88b155cea20f..439b434235fb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -324,21 +324,21 @@ module.exports = { rules: { 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', - 'react-hooks/component-hook-factories': 'error', // Validates higher order functions defining nested components or hooks + 'react-hooks/component-hook-factories': 'warn', // Validates higher order functions defining nested components or hooks 'react-hooks/config': 'error', // Validates the compiler configuration options 'react-hooks/error-boundaries': 'error', // Validates usage of Error Boundaries instead of try/catch for child errors 'react-hooks/gating': 'error', // Validates configuration of gating mode - 'react-hooks/globals': 'error', // Validates against assignment/mutation of globals during render - 'react-hooks/immutability': 'error', // Validates against mutating props, state, and other immutable values - 'react-hooks/incompatible-library': 'error', // Validates against usage of libraries which are incompatible with memoization - 'react-hooks/preserve-manual-memoization': 'error', // Validates that existing manual memoization is preserved by the compiler - 'react-hooks/purity': 'error', // Validates that components/hooks are pure by checking known-impure functions - 'react-hooks/refs': 'error', // Validates correct usage of refs, not reading/writing during render - 'react-hooks/set-state-in-effect': 'error', // Validates against calling setState synchronously in an effect - 'react-hooks/set-state-in-render': 'error', // Validates against setting state during render - 'react-hooks/static-components': 'error', // Validates that components are static, not recreated every render - 'react-hooks/unsupported-syntax': 'error', // Validates against syntax that React Compiler does not support - 'react-hooks/use-memo': 'error', // Validates usage of the useMemo hook without a return value + 'react-hooks/globals': 'warn', // Validates against assignment/mutation of globals during render + 'react-hooks/immutability': 'warn', // Validates against mutating props, state, and other immutable values + 'react-hooks/incompatible-library': 'warn', // Validates against usage of libraries which are incompatible with memoization + 'react-hooks/preserve-manual-memoization': 'warn', // Validates that existing manual memoization is preserved by the compiler + 'react-hooks/purity': 'warn', // Validates that components/hooks are pure by checking known-impure functions + 'react-hooks/refs': 'warn', // Validates correct usage of refs, not reading/writing during render + 'react-hooks/set-state-in-effect': 'warn', // Validates against calling setState synchronously in an effect + 'react-hooks/set-state-in-render': 'warn', // Validates against setting state during render + 'react-hooks/static-components': 'warn', // Validates that components are static, not recreated every render + 'react-hooks/unsupported-syntax': 'warn', // Validates against syntax that React Compiler does not support + 'react-hooks/use-memo': 'warn', // Validates usage of the useMemo hook without a return value 'react/no-unused-prop-types': 'error', 'react/no-unused-state': 'error', 'react/jsx-boolean-value': 'error',