@samitouri / QOS-React / commits / 26b177bc5e

[eprh] Fix `recommended` config for flat config compatibility (#34700)

Previously, the `recommended` config used the legacy ESLint format (plugins as an array of strings). This causes errors when used with ESLint v9's `defineConfig()` helper. This was following [eslint's own docs](https://eslint.org/docs/latest/extend/plugins#backwards-compatibility-for-legacy-configs): > With this approach, both configuration systems recognize "recommended". The old config system uses the recommended key while the current config system uses the flat/recommended key. The defineConfig() helper first looks at the recommended key, and if that is not in the correct format, it looks for the flat/recommended key. This allows you an upgrade path if you’d later like to rename flat/recommended to recommended when you no longer need to support the old config system. However, [`isLegacyConfig()`](https://github.com/eslint/rewrite/blob/main/packages/config-helpers/src/define-config.js#L73-L81) (also see [`eslintrcKeys`](https://github.com/eslint/rewrite/blob/main/packages/config-helpers/src/define-config.js#L24-L35)) function doesn't check for the `plugins` key, so our config was incorrectly treated as flat config despite being in legacy format. This PR fixes the issue, along with a few other fixes combined: 1. Convert `recommended` to flat config format 2. Separate basic rules (exhaustive-deps, rules-of-hooks) from compiler rules 3. Add `recommended-latest-legacy` config for non-flat config users who want all recommended rules (including compiler rules) 4. Adding more types for the exported config Our shipped presets in 6.x.x will essentially be: - `recommended-legacy`: legacy (non-flat), with basic rules only - `recommended-latest-legacy`: legacy (non-flat), all rules (basic + compiler) - `flat/recommended`: flat, basic rules only (now the same as recommended, but to avoid making a breaking change we'll just keep it around in 6.x.x) - `recommended-latest`: flat, all rules (basic + compiler) - `recommended`: flat, basic rules only In the next breaking release 7.x.x, we will collapse down the presets into three: - `recommended-legacy`: all recommended rules - `recommended`: all recommended rules - `recommended-experimental`: all recommended rules + new bleeding edge experimental rules Closes #34679 --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34700). * #34703 * __->__ #34700

lauren committed Oct 2, 2025 at 18:52 UTC 26b177bc5e1d287c60c50fc1e185b2fb398488a0
10 files changed +504 -34
fixtures/eslint-v6/.eslintrc.json
+1 -4
@@ -1,14 +1,11 @@
1 {
2 "root": true,
3 - "extends": ["plugin:react-hooks/recommended-legacy"],
3 + "extends": ["plugin:react-hooks/recommended-latest-legacy"],
4 "parserOptions": {
5 "ecmaVersion": 2020,
6 "sourceType": "module",
7 "ecmaFeatures": {
8 "jsx": true
9 }
10 - },
11 - "rules": {
12 - "react-hooks/exhaustive-deps": "error"
10 }
11 }
fixtures/eslint-v6/index.js
+24
@@ -141,3 +141,27 @@ function useHookInLoops() {
141 useHook4();
142 }
143 }
144 +
145 +/**
146 + * Compiler Rules
147 + */
148 +// Invalid: component factory
149 +function InvalidComponentFactory() {
150 + const DynamicComponent = () => <div>Hello</div>;
151 + // eslint-disable-next-line react-hooks/static-components
152 + return <DynamicComponent />;
153 +}
154 +
155 +// Invalid: mutating globals
156 +function InvalidGlobals() {
157 + // eslint-disable-next-line react-hooks/immutability
158 + window.myGlobal = 42;
159 + return <div>Done</div>;
160 +}
161 +
162 +// Invalid: useMemo with wrong deps - triggers preserve-manual-memoization
163 +function InvalidUseMemo({items}) {
164 + // eslint-disable-next-line react-hooks/preserve-manual-memoization, react-hooks/exhaustive-deps
165 + const sorted = useMemo(() => [...items].sort(), []);
166 + return <div>{sorted.length}</div>;
167 +}
fixtures/eslint-v7/.eslintrc.json
+1 -4
@@ -1,14 +1,11 @@
1 {
2 "root": true,
3 - "extends": ["plugin:react-hooks/recommended-legacy"],
3 + "extends": ["plugin:react-hooks/recommended-latest-legacy"],
4 "parserOptions": {
5 "ecmaVersion": 2020,
6 "sourceType": "module",
7 "ecmaFeatures": {
8 "jsx": true
9 }
10 - },
11 - "rules": {
12 - "react-hooks/exhaustive-deps": "error"
10 }
11 }
fixtures/eslint-v7/index.js
+24
@@ -141,3 +141,27 @@ function useHookInLoops() {
141 useHook4();
142 }
143 }
144 +
145 +/**
146 + * Compiler Rules
147 + */
148 +// Invalid: component factory
149 +function InvalidComponentFactory() {
150 + const DynamicComponent = () => <div>Hello</div>;
151 + // eslint-disable-next-line react-hooks/static-components
152 + return <DynamicComponent />;
153 +}
154 +
155 +// Invalid: mutating globals
156 +function InvalidGlobals() {
157 + // eslint-disable-next-line react-hooks/immutability
158 + window.myGlobal = 42;
159 + return <div>Done</div>;
160 +}
161 +
162 +// Invalid: useMemo with wrong deps - triggers preserve-manual-memoization
163 +function InvalidUseMemo({items}) {
164 + // eslint-disable-next-line react-hooks/preserve-manual-memoization, react-hooks/exhaustive-deps
165 + const sorted = useMemo(() => [...items].sort(), []);
166 + return <div>{sorted.length}</div>;
167 +}
fixtures/eslint-v8/.eslintrc.json
+1 -4
@@ -1,14 +1,11 @@
1 {
2 "root": true,
3 - "extends": ["plugin:react-hooks/recommended-legacy"],
3 + "extends": ["plugin:react-hooks/recommended-latest-legacy"],
4 "parserOptions": {
5 "ecmaVersion": 2020,
6 "sourceType": "module",
7 "ecmaFeatures": {
8 "jsx": true
9 }
10 - },
11 - "rules": {
12 - "react-hooks/exhaustive-deps": "error"
10 }
11 }
fixtures/eslint-v8/index.js
+24
@@ -141,3 +141,27 @@ function useHookInLoops() {
141 useHook4();
142 }
143 }
144 +
145 +/**
146 + * Compiler Rules
147 + */
148 +// Invalid: component factory
149 +function InvalidComponentFactory() {
150 + const DynamicComponent = () => <div>Hello</div>;
151 + // eslint-disable-next-line react-hooks/static-components
152 + return <DynamicComponent />;
153 +}
154 +
155 +// Invalid: mutating globals
156 +function InvalidGlobals() {
157 + // eslint-disable-next-line react-hooks/immutability
158 + window.myGlobal = 42;
159 + return <div>Done</div>;
160 +}
161 +
162 +// Invalid: useMemo with wrong deps - triggers preserve-manual-memoization
163 +function InvalidUseMemo({items}) {
164 + // eslint-disable-next-line react-hooks/preserve-manual-memoization, react-hooks/exhaustive-deps
165 + const sorted = useMemo(() => [...items].sort(), []);
166 + return <div>{sorted.length}</div>;
167 +}
fixtures/eslint-v9/eslint.config.ts
-2
@@ -1,8 +1,6 @@
1 import {defineConfig} from 'eslint/config';
2 import reactHooks from 'eslint-plugin-react-hooks';
3
4 -console.log(reactHooks.configs['recommended-latest']);
5 -
4 export default defineConfig([
5 {
6 languageOptions: {
fixtures/eslint-v9/index.js
+24
@@ -141,3 +141,27 @@ function useHookInLoops() {
141 useHook4();
142 }
143 }
144 +
145 +/**
146 + * Compiler Rules
147 + */
148 +// Invalid: component factory
149 +function InvalidComponentFactory() {
150 + const DynamicComponent = () => <div>Hello</div>;
151 + // eslint-disable-next-line react-hooks/static-components
152 + return <DynamicComponent />;
153 +}
154 +
155 +// Invalid: mutating globals
156 +function InvalidGlobals() {
157 + // eslint-disable-next-line react-hooks/immutability
158 + window.myGlobal = 42;
159 + return <div>Done</div>;
160 +}
161 +
162 +// Invalid: useMemo with wrong deps - triggers preserve-manual-memoization
163 +function InvalidUseMemo({items}) {
164 + // eslint-disable-next-line react-hooks/preserve-manual-memoization, react-hooks/exhaustive-deps
165 + const sorted = useMemo(() => [...items].sort(), []);
166 + return <div>{sorted.length}</div>;
167 +}
fixtures/eslint-v9/yarn.lock
+358
@@ -2,6 +2,210 @@
2 # yarn lockfile v1
3
4
5 +"@babel/code-frame@^7.27.1":
6 + version "7.27.1"
7 + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be"
8 + integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==
9 + dependencies:
10 + "@babel/helper-validator-identifier" "^7.27.1"
11 + js-tokens "^4.0.0"
12 + picocolors "^1.1.1"
13 +
14 +"@babel/compat-data@^7.27.2":
15 + version "7.28.4"
16 + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.4.tgz#96fdf1af1b8859c8474ab39c295312bfb7c24b04"
17 + integrity sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==
18 +
19 +"@babel/core@^7.24.4":
20 + version "7.28.4"
21 + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.4.tgz#12a550b8794452df4c8b084f95003bce1742d496"
22 + integrity sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==
23 + dependencies:
24 + "@babel/code-frame" "^7.27.1"
25 + "@babel/generator" "^7.28.3"
26 + "@babel/helper-compilation-targets" "^7.27.2"
27 + "@babel/helper-module-transforms" "^7.28.3"
28 + "@babel/helpers" "^7.28.4"
29 + "@babel/parser" "^7.28.4"
30 + "@babel/template" "^7.27.2"
31 + "@babel/traverse" "^7.28.4"
32 + "@babel/types" "^7.28.4"
33 + "@jridgewell/remapping" "^2.3.5"
34 + convert-source-map "^2.0.0"
35 + debug "^4.1.0"
36 + gensync "^1.0.0-beta.2"
37 + json5 "^2.2.3"
38 + semver "^6.3.1"
39 +
40 +"@babel/generator@^7.28.3":
41 + version "7.28.3"
42 + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.3.tgz#9626c1741c650cbac39121694a0f2d7451b8ef3e"
43 + integrity sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==
44 + dependencies:
45 + "@babel/parser" "^7.28.3"
46 + "@babel/types" "^7.28.2"
47 + "@jridgewell/gen-mapping" "^0.3.12"
48 + "@jridgewell/trace-mapping" "^0.3.28"
49 + jsesc "^3.0.2"
50 +
51 +"@babel/helper-annotate-as-pure@^7.27.3":
52 + version "7.27.3"
53 + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.27.3.tgz#f31fd86b915fc4daf1f3ac6976c59be7084ed9c5"
54 + integrity sha512-fXSwMQqitTGeHLBC08Eq5yXz2m37E4pJX1qAU1+2cNedz/ifv/bVXft90VeSav5nFO61EcNgwr0aJxbyPaWBPg==
55 + dependencies:
56 + "@babel/types" "^7.27.3"
57 +
58 +"@babel/helper-compilation-targets@^7.27.2":
59 + version "7.27.2"
60 + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d"
61 + integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==
62 + dependencies:
63 + "@babel/compat-data" "^7.27.2"
64 + "@babel/helper-validator-option" "^7.27.1"
65 + browserslist "^4.24.0"
66 + lru-cache "^5.1.1"
67 + semver "^6.3.1"
68 +
69 +"@babel/helper-create-class-features-plugin@^7.18.6":
70 + version "7.28.3"
71 + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.3.tgz#3e747434ea007910c320c4d39a6b46f20f371d46"
72 + integrity sha512-V9f6ZFIYSLNEbuGA/92uOvYsGCJNsuA8ESZ4ldc09bWk/j8H8TKiPw8Mk1eG6olpnO0ALHJmYfZvF4MEE4gajg==
73 + dependencies:
74 + "@babel/helper-annotate-as-pure" "^7.27.3"
75 + "@babel/helper-member-expression-to-functions" "^7.27.1"
76 + "@babel/helper-optimise-call-expression" "^7.27.1"
77 + "@babel/helper-replace-supers" "^7.27.1"
78 + "@babel/helper-skip-transparent-expression-wrappers" "^7.27.1"
79 + "@babel/traverse" "^7.28.3"
80 + semver "^6.3.1"
81 +
82 +"@babel/helper-globals@^7.28.0":
83 + version "7.28.0"
84 + resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
85 + integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
86 +
87 +"@babel/helper-member-expression-to-functions@^7.27.1":
88 + version "7.27.1"
89 + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.27.1.tgz#ea1211276be93e798ce19037da6f06fbb994fa44"
90 + integrity sha512-E5chM8eWjTp/aNoVpcbfM7mLxu9XGLWYise2eBKGQomAk/Mb4XoxyqXTZbuTohbsl8EKqdlMhnDI2CCLfcs9wA==
91 + dependencies:
92 + "@babel/traverse" "^7.27.1"
93 + "@babel/types" "^7.27.1"
94 +
95 +"@babel/helper-module-imports@^7.27.1":
96 + version "7.27.1"
97 + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204"
98 + integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==
99 + dependencies:
100 + "@babel/traverse" "^7.27.1"
101 + "@babel/types" "^7.27.1"
102 +
103 +"@babel/helper-module-transforms@^7.28.3":
104 + version "7.28.3"
105 + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz#a2b37d3da3b2344fe085dab234426f2b9a2fa5f6"
106 + integrity sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==
107 + dependencies:
108 + "@babel/helper-module-imports" "^7.27.1"
109 + "@babel/helper-validator-identifier" "^7.27.1"
110 + "@babel/traverse" "^7.28.3"
111 +
112 +"@babel/helper-optimise-call-expression@^7.27.1":
113 + version "7.27.1"
114 + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.27.1.tgz#c65221b61a643f3e62705e5dd2b5f115e35f9200"
115 + integrity sha512-URMGH08NzYFhubNSGJrpUEphGKQwMQYBySzat5cAByY1/YgIRkULnIy3tAMeszlL/so2HbeilYloUmSpd7GdVw==
116 + dependencies:
117 + "@babel/types" "^7.27.1"
118 +
119 +"@babel/helper-plugin-utils@^7.18.6":
120 + version "7.27.1"
121 + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz#ddb2f876534ff8013e6c2b299bf4d39b3c51d44c"
122 + integrity sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==
123 +
124 +"@babel/helper-replace-supers@^7.27.1":
125 + version "7.27.1"
126 + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz#b1ed2d634ce3bdb730e4b52de30f8cccfd692bc0"
127 + integrity sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==
128 + dependencies:
129 + "@babel/helper-member-expression-to-functions" "^7.27.1"
130 + "@babel/helper-optimise-call-expression" "^7.27.1"
131 + "@babel/traverse" "^7.27.1"
132 +
133 +"@babel/helper-skip-transparent-expression-wrappers@^7.27.1":
134 + version "7.27.1"
135 + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.27.1.tgz#62bb91b3abba8c7f1fec0252d9dbea11b3ee7a56"
136 + integrity sha512-Tub4ZKEXqbPjXgWLl2+3JpQAYBJ8+ikpQ2Ocj/q/r0LwE3UhENh7EUabyHjz2kCEsrRY83ew2DQdHluuiDQFzg==
137 + dependencies:
138 + "@babel/traverse" "^7.27.1"
139 + "@babel/types" "^7.27.1"
140 +
141 +"@babel/helper-string-parser@^7.27.1":
142 + version "7.27.1"
143 + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
144 + integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==
145 +
146 +"@babel/helper-validator-identifier@^7.27.1":
147 + version "7.27.1"
148 + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8"
149 + integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==
150 +
151 +"@babel/helper-validator-option@^7.27.1":
152 + version "7.27.1"
153 + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f"
154 + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==
155 +
156 +"@babel/helpers@^7.28.4":
157 + version "7.28.4"
158 + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827"
159 + integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==
160 + dependencies:
161 + "@babel/template" "^7.27.2"
162 + "@babel/types" "^7.28.4"
163 +
164 +"@babel/parser@^7.24.4", "@babel/parser@^7.27.2", "@babel/parser@^7.28.3", "@babel/parser@^7.28.4":
165 + version "7.28.4"
166 + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.4.tgz#da25d4643532890932cc03f7705fe19637e03fa8"
167 + integrity sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==
168 + dependencies:
169 + "@babel/types" "^7.28.4"
170 +
171 +"@babel/plugin-proposal-private-methods@^7.18.6":
172 + version "7.18.6"
173 + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea"
174 + integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==
175 + dependencies:
176 + "@babel/helper-create-class-features-plugin" "^7.18.6"
177 + "@babel/helper-plugin-utils" "^7.18.6"
178 +
179 +"@babel/template@^7.27.2":
180 + version "7.27.2"
181 + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d"
182 + integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==
183 + dependencies:
184 + "@babel/code-frame" "^7.27.1"
185 + "@babel/parser" "^7.27.2"
186 + "@babel/types" "^7.27.1"
187 +
188 +"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.4":
189 + version "7.28.4"
190 + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.4.tgz#8d456101b96ab175d487249f60680221692b958b"
191 + integrity sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==
192 + dependencies:
193 + "@babel/code-frame" "^7.27.1"
194 + "@babel/generator" "^7.28.3"
195 + "@babel/helper-globals" "^7.28.0"
196 + "@babel/parser" "^7.28.4"
197 + "@babel/template" "^7.27.2"
198 + "@babel/types" "^7.28.4"
199 + debug "^4.3.1"
200 +
201 +"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
202 + version "7.28.4"
203 + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
204 + integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
205 + dependencies:
206 + "@babel/helper-string-parser" "^7.27.1"
207 + "@babel/helper-validator-identifier" "^7.27.1"
208 +
209 "@eslint-community/eslint-utils@^4.2.0":
210 version "4.4.1"
211 resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56"
@@ -96,6 +300,40 @@
300 resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.2.tgz#1860473de7dfa1546767448f333db80cb0ff2161"
301 integrity sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==
302
303 +"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5":
304 + version "0.3.13"
305 + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f"
306 + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==
307 + dependencies:
308 + "@jridgewell/sourcemap-codec" "^1.5.0"
309 + "@jridgewell/trace-mapping" "^0.3.24"
310 +
311 +"@jridgewell/remapping@^2.3.5":
312 + version "2.3.5"
313 + resolved "https://registry.yarnpkg.com/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1"
314 + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==
315 + dependencies:
316 + "@jridgewell/gen-mapping" "^0.3.5"
317 + "@jridgewell/trace-mapping" "^0.3.24"
318 +
319 +"@jridgewell/resolve-uri@^3.1.0":
320 + version "3.1.2"
321 + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6"
322 + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
323 +
324 +"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0":
325 + version "1.5.5"
326 + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba"
327 + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==
328 +
329 +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28":
330 + version "0.3.31"
331 + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0"
332 + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==
333 + dependencies:
334 + "@jridgewell/resolve-uri" "^3.1.0"
335 + "@jridgewell/sourcemap-codec" "^1.4.14"
336 +
337 "@types/estree@^1.0.6":
338 version "1.0.6"
339 resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50"
@@ -148,6 +386,11 @@ balanced-match@^1.0.0:
386 resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
387 integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
388
389 +baseline-browser-mapping@^2.8.9:
390 + version "2.8.10"
391 + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.8.10.tgz#32eb5e253d633fa3fa3ffb1685fabf41680d9e8a"
392 + integrity sha512-uLfgBi+7IBNay8ECBO2mVMGZAc1VgZWEChxm4lv+TobGdG82LnXMjuNGo/BSSZZL4UmkWhxEHP2f5ziLNwGWMA==
393 +
394 brace-expansion@^1.1.7:
395 version "1.1.11"
396 resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -156,11 +399,27 @@ brace-expansion@^1.1.7:
399 balanced-match "^1.0.0"
400 concat-map "0.0.1"
401
402 +browserslist@^4.24.0:
403 + version "4.26.3"
404 + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.26.3.tgz#40fbfe2d1cd420281ce5b1caa8840049c79afb56"
405 + integrity sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==
406 + dependencies:
407 + baseline-browser-mapping "^2.8.9"
408 + caniuse-lite "^1.0.30001746"
409 + electron-to-chromium "^1.5.227"
410 + node-releases "^2.0.21"
411 + update-browserslist-db "^1.1.3"
412 +
413 callsites@^3.0.0:
414 version "3.1.0"
415 resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
416 integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
417
418 +caniuse-lite@^1.0.30001746:
419 + version "1.0.30001746"
420 + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001746.tgz#199d20f04f5369825e00ff7067d45d5dfa03aee7"
421 + integrity sha512-eA7Ys/DGw+pnkWWSE/id29f2IcPHVoE8wxtvE5JdvD2V28VTDPy1yEeo11Guz0sJ4ZeGRcm3uaTcAqK1LXaphA==
422 +
423 chalk@^4.0.0:
424 version "4.1.2"
425 resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
@@ -186,6 +445,11 @@ concat-map@0.0.1:
445 resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
446 integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
447
448 +convert-source-map@^2.0.0:
449 + version "2.0.0"
450 + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a"
451 + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==
452 +
453 cross-spawn@^7.0.6:
454 version "7.0.6"
455 resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
@@ -195,6 +459,13 @@ cross-spawn@^7.0.6:
459 shebang-command "^2.0.0"
460 which "^2.0.1"
461
462 +debug@^4.1.0:
463 + version "4.4.3"
464 + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a"
465 + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==
466 + dependencies:
467 + ms "^2.1.3"
468 +
469 debug@^4.3.1, debug@^4.3.2:
470 version "4.4.0"
471 resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a"
@@ -207,6 +478,16 @@ deep-is@^0.1.3:
478 resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
479 integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
480
481 +electron-to-chromium@^1.5.227:
482 + version "1.5.228"
483 + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.228.tgz#38b849bc8714bd21fb64f5ad56bf8cfd8638e1e9"
484 + integrity sha512-nxkiyuqAn4MJ1QbobwqJILiDtu/jk14hEAWaMiJmNPh1Z+jqoFlBFZjdXwLWGeVSeu9hGLg6+2G9yJaW8rBIFA==
485 +
486 +escalade@^3.2.0:
487 + version "3.2.0"
488 + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
489 + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==
490 +
491 escape-string-regexp@^4.0.0:
492 version "4.0.0"
493 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
@@ -365,6 +646,11 @@ flatted@^3.2.9:
646 resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.2.tgz#adba1448a9841bec72b42c532ea23dbbedef1a27"
647 integrity sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==
648
649 +gensync@^1.0.0-beta.2:
650 + version "1.0.0-beta.2"
651 + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
652 + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
653 +
654 glob-parent@^6.0.2:
655 version "6.0.2"
656 resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3"
@@ -382,6 +668,18 @@ has-flag@^4.0.0:
668 resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
669 integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
670
671 +hermes-estree@0.25.1:
672 + version "0.25.1"
673 + resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.25.1.tgz#6aeec17d1983b4eabf69721f3aa3eb705b17f480"
674 + integrity sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==
675 +
676 +hermes-parser@^0.25.1:
677 + version "0.25.1"
678 + resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.25.1.tgz#5be0e487b2090886c62bd8a11724cd766d5f54d1"
679 + integrity sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==
680 + dependencies:
681 + hermes-estree "0.25.1"
682 +
683 ignore@^5.2.0:
684 version "5.3.2"
685 resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
@@ -422,6 +720,11 @@ jiti@^2.4.2:
720 resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.4.2.tgz#d19b7732ebb6116b06e2038da74a55366faef560"
721 integrity sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==
722
723 +js-tokens@^4.0.0:
724 + version "4.0.0"
725 + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
726 + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
727 +
728 js-yaml@^4.1.0:
729 version "4.1.0"
730 resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
@@ -429,6 +732,11 @@ js-yaml@^4.1.0:
732 dependencies:
733 argparse "^2.0.1"
734
735 +jsesc@^3.0.2:
736 + version "3.1.0"
737 + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d"
738 + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==
739 +
740 json-buffer@3.0.1:
741 version "3.0.1"
742 resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
@@ -444,6 +752,11 @@ json-stable-stringify-without-jsonify@^1.0.1:
752 resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
753 integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==
754
755 +json5@^2.2.3:
756 + version "2.2.3"
757 + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
758 + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
759 +
760 keyv@^4.5.4:
761 version "4.5.4"
762 resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"
@@ -471,6 +784,13 @@ lodash.merge@^4.6.2:
784 resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
785 integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
786
787 +lru-cache@^5.1.1:
788 + version "5.1.1"
789 + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
790 + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==
791 + dependencies:
792 + yallist "^3.0.2"
793 +
794 minimatch@^3.1.2:
795 version "3.1.2"
796 resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
@@ -488,6 +808,11 @@ natural-compare@^1.4.0:
808 resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
809 integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
810
811 +node-releases@^2.0.21:
812 + version "2.0.21"
813 + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.21.tgz#f59b018bc0048044be2d4c4c04e4c8b18160894c"
814 + integrity sha512-5b0pgg78U3hwXkCM8Z9b2FJdPZlr9Psr9V2gQPESdGHqbntyFJKFW4r5TeWGFzafGY3hzs1JC62VEQMbl1JFkw==
815 +
816 optionator@^0.9.3:
817 version "0.9.4"
818 resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734"
@@ -531,6 +856,11 @@ path-key@^3.1.0:
856 resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375"
857 integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==
858
859 +picocolors@^1.1.1:
860 + version "1.1.1"
861 + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
862 + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
863 +
864 prelude-ls@^1.2.1:
865 version "1.2.1"
866 resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
@@ -546,6 +876,11 @@ resolve-from@^4.0.0:
876 resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
877 integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
878
879 +semver@^6.3.1:
880 + version "6.3.1"
881 + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
882 + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
883 +
884 shebang-command@^2.0.0:
885 version "2.0.0"
886 resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
@@ -577,6 +912,14 @@ type-check@^0.4.0, type-check@~0.4.0:
912 dependencies:
913 prelude-ls "^1.2.1"
914
915 +update-browserslist-db@^1.1.3:
916 + version "1.1.3"
917 + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"
918 + integrity sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==
919 + dependencies:
920 + escalade "^3.2.0"
921 + picocolors "^1.1.1"
922 +
923 uri-js@^4.2.2:
924 version "4.2.2"
925 resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
@@ -596,7 +939,22 @@ word-wrap@^1.2.5:
939 resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
940 integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
941
942 +yallist@^3.0.2:
943 + version "3.1.1"
944 + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
945 + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
946 +
947 yocto-queue@^0.1.0:
948 version "0.1.0"
949 resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
950 integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
951 +
952 +zod-validation-error@^3.0.3:
953 + version "3.5.3"
954 + resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-3.5.3.tgz#85ba33290200d8db9f043621e284f40dddefb7e5"
955 + integrity sha512-OT5Y8lbUadqVZCsnyFaTQ4/O2mys4tj7PqhdbBCp7McPwvIEKfPtdA6QfPeFQK2/Rz5LgwmAXRJTugBNBi0btw==
956 +
957 +zod@^3.22.4:
958 + version "3.25.76"
959 + resolved "https://registry.yarnpkg.com/zod/-/zod-3.25.76.tgz#26841c3f6fd22a6a2760e7ccb719179768471e34"
960 + integrity sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==
packages/eslint-plugin-react-hooks/src/index.ts
+47 -20
@@ -23,33 +23,56 @@ const rules = {
23 ),
24 } satisfies Record<string, Rule.RuleModule>;
25
26 -// Config rules
27 -const ruleConfigs = {
26 +// Basic hooks rules (for recommended config)
27 +const basicRuleConfigs = {
28 'react-hooks/rules-of-hooks': 'error',
29 'react-hooks/exhaustive-deps': 'warn',
30 - // Compiler rules
31 - ...Object.fromEntries(
32 - Object.entries(recommendedRules).map(([name, ruleConfig]) => {
33 - return [
34 - 'react-hooks/' + name,
35 - mapErrorSeverityToESlint(ruleConfig.severity),
36 - ];
37 - }),
38 - ),
39 -} satisfies Linter.RulesRecord;
30 +} as const satisfies Linter.RulesRecord;
31 +
32 +const compilerRuleConfigs = Object.fromEntries(
33 + Object.entries(recommendedRules).map(([name, ruleConfig]) => {
34 + return [
35 + `react-hooks/${name}` as const,
36 + mapErrorSeverityToESlint(ruleConfig.severity),
37 + ] as const;
38 + }),
39 +) as Record<`react-hooks/${string}`, Linter.RuleEntry>;
40 +
41 +// All rules including compiler rules (for recommended-latest config)
42 +const allRuleConfigs: Linter.RulesRecord = {
43 + ...basicRuleConfigs,
44 + ...compilerRuleConfigs,
45 +};
46
47 const plugin = {
48 meta: {
49 name: 'eslint-plugin-react-hooks',
50 },
45 - configs: {},
51 rules,
52 + configs: {} as {
53 + 'recommended-legacy': {
54 + plugins: Array<string>;
55 + rules: Linter.RulesRecord;
56 + };
57 + 'recommended-latest-legacy': {
58 + plugins: Array<string>;
59 + rules: Linter.RulesRecord;
60 + };
61 + 'flat/recommended': Array<Linter.Config>;
62 + 'recommended-latest': Array<Linter.Config>;
63 + recommended: Array<Linter.Config>;
64 + },
65 };
66
67 Object.assign(plugin.configs, {
68 'recommended-legacy': {
69 plugins: ['react-hooks'],
52 - rules: ruleConfigs,
70 + rules: basicRuleConfigs,
71 + },
72 +
73 + 'recommended-latest-legacy': {
74 + plugins: ['react-hooks'],
75 + rules: allRuleConfigs,
76 },
77
78 'flat/recommended': [
@@ -57,7 +80,7 @@ Object.assign(plugin.configs, {
80 plugins: {
81 'react-hooks': plugin,
82 },
60 - rules: ruleConfigs,
83 + rules: basicRuleConfigs,
84 },
85 ],
86
@@ -66,14 +89,18 @@ Object.assign(plugin.configs, {
89 plugins: {
90 'react-hooks': plugin,
91 },
69 - rules: ruleConfigs,
92 + rules: allRuleConfigs,
93 },
94 ],
95
73 - recommended: {
74 - plugins: ['react-hooks'],
75 - rules: ruleConfigs,
76 - },
96 + recommended: [
97 + {
98 + plugins: {
99 + 'react-hooks': plugin,
100 + },
101 + rules: basicRuleConfigs,
102 + },
103 + ],
104 });
105
106 export default plugin;