Commit c786258

Browse files
authored
[eprh] Fix config type not being exported correctly (#34746)
Another attempt to fix#34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks
1 parent 1be3ce9 commit c786258

6 files changed

Lines changed: 46 additions & 95 deletions

File tree

‎fixtures/eslint-v9/eslint.config.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export default defineConfig([
1212
},
1313
},
1414
},
15-
plugins: {
16-
'react-hooks': reactHooks,
17-
},
18-
extends: ['react-hooks/recommended-latest'],
15+
extends: [reactHooks.configs['recommended-latest']],
1916
rules: {
2017
'react-hooks/exhaustive-deps': 'error',
2118
},

‎fixtures/eslint-v9/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
},
99
"scripts": {
1010
"build": "node build.mjs && yarn",
11-
"lint": "eslint index.js --report-unused-disable-directives"
11+
"lint": "tsc --noEmit && eslint index.js --report-unused-disable-directives"
12+
},
13+
"devDependencies": {
14+
"typescript": "^5.4.3"
1215
}
1316
}

‎fixtures/eslint-v9/tsconfig.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
{
2+
"compilerOptions": {
3+
"lib": [
4+
"es2022"
5+
],
6+
"module": "nodenext",
7+
"moduleResolution": "nodenext",
8+
"target": "es2022",
9+
"typeRoots": [
10+
"./node_modules/@types"
11+
],
12+
"skipLibCheck": true
13+
},
14+
"exclude": [
15+
"node_modules",
16+
"**/node_modules",
17+
"../node_modules",
18+
"../../node_modules"
19+
]
220
}

‎fixtures/eslint-v9/yarn.lock‎

Lines changed: 14 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
"@jridgewell/trace-mapping""^0.3.28"
4949
jsesc "^3.0.2"
5050

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-
5851
"@babel/helper-compilation-targets@^7.27.2":
5952
version "7.27.2"
6053
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d"
@@ -66,32 +59,11 @@
6659
lru-cache "^5.1.1"
6760
semver "^6.3.1"
6861

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-
8262
"@babel/helper-globals@^7.28.0":
8363
version "7.28.0"
8464
resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
8565
integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
8666

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-
9567
"@babel/helper-module-imports@^7.27.1":
9668
version "7.27.1"
9769
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204"
@@ -109,35 +81,6 @@
10981
"@babel/helper-validator-identifier""^7.27.1"
11082
"@babel/traverse""^7.28.3"
11183

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-
14184
"@babel/helper-string-parser@^7.27.1":
14285
version "7.27.1"
14386
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
@@ -168,14 +111,6 @@
168111
dependencies:
169112
"@babel/types""^7.28.4"
170113

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-
179114
"@babel/template@^7.27.2":
180115
version "7.27.2"
181116
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d"
@@ -198,7 +133,7 @@
198133
"@babel/types""^7.28.4"
199134
debug "^4.3.1"
200135

201-
"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
136+
"@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
202137
version "7.28.4"
203138
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
204139
integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
@@ -668,18 +603,6 @@ has-flag@^4.0.0:
668603
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
669604
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
670605

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-
683606
ignore@^5.2.0:
684607
version "5.3.2"
685608
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
@@ -912,6 +835,11 @@ type-check@^0.4.0, type-check@~0.4.0:
912835
dependencies:
913836
prelude-ls "^1.2.1"
914837

838+
typescript@^5.4.3:
839+
version "5.9.3"
840+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
841+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
842+
915843
update-browserslist-db@^1.1.3:
916844
version "1.1.3"
917845
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"
@@ -949,12 +877,12 @@ yocto-queue@^0.1.0:
949877
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
950878
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
951879

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==
880+
"zod-validation-error@^3.0.3 || ^4.0.0":
881+
version "4.0.2"
882+
resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.2.tgz#bc605eba49ce0fcd598c127fee1c236be3f22918"
883+
integrity sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==
956884

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==
885+
"zod@^3.22.4 || ^4.0.0":
886+
version "4.1.11"
887+
resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.11.tgz#4aab62f76cfd45e6c6166519ba31b2ea019f75f5"
888+
integrity sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==

‎packages/eslint-plugin-react-hooks/npm/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
export*from'./cjs/eslint-plugin-react-hooks';
8+
export{default}from'./cjs/eslint-plugin-react-hooks';

‎packages/eslint-plugin-react-hooks/src/index.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const allRuleConfigs: Linter.RulesRecord = {
4444
...compilerRuleConfigs,
4545
};
4646

47+
typeFlatConfig={
48+
plugins: Record<string,any>;
49+
rules: Linter.RulesRecord;
50+
};
51+
4752
constplugin={
4853
meta: {
4954
name: 'eslint-plugin-react-hooks',
@@ -58,9 +63,9 @@ const plugin = {
5863
plugins: Array<string>;
5964
rules: Linter.RulesRecord;
6065
};
61-
'flat/recommended': Array<Linter.Config>;
62-
'recommended-latest': Array<Linter.Config>;
63-
recommended: Array<Linter.Config>;
66+
'flat/recommended': Array<FlatConfig>;
67+
'recommended-latest': Array<FlatConfig>;
68+
recommended: Array<FlatConfig>;
6469
},
6570
};
6671

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Commit c786258

Browse files
authored
[eprh] Fix config type not being exported correctly (#34746)
Another attempt to fix#34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks
1 parent 1be3ce9 commit c786258

6 files changed

Lines changed: 46 additions & 95 deletions

File tree

‎fixtures/eslint-v9/eslint.config.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export default defineConfig([
1212
},
1313
},
1414
},
15-
plugins: {
16-
'react-hooks': reactHooks,
17-
},
18-
extends: ['react-hooks/recommended-latest'],
15+
extends: [reactHooks.configs['recommended-latest']],
1916
rules: {
2017
'react-hooks/exhaustive-deps': 'error',
2118
},

‎fixtures/eslint-v9/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
},
99
"scripts": {
1010
"build": "node build.mjs && yarn",
11-
"lint": "eslint index.js --report-unused-disable-directives"
11+
"lint": "tsc --noEmit && eslint index.js --report-unused-disable-directives"
12+
},
13+
"devDependencies": {
14+
"typescript": "^5.4.3"
1215
}
1316
}

‎fixtures/eslint-v9/tsconfig.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
{
2+
"compilerOptions": {
3+
"lib": [
4+
"es2022"
5+
],
6+
"module": "nodenext",
7+
"moduleResolution": "nodenext",
8+
"target": "es2022",
9+
"typeRoots": [
10+
"./node_modules/@types"
11+
],
12+
"skipLibCheck": true
13+
},
14+
"exclude": [
15+
"node_modules",
16+
"**/node_modules",
17+
"../node_modules",
18+
"../../node_modules"
19+
]
220
}

‎fixtures/eslint-v9/yarn.lock‎

Lines changed: 14 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
"@jridgewell/trace-mapping""^0.3.28"
4949
jsesc "^3.0.2"
5050

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-
5851
"@babel/helper-compilation-targets@^7.27.2":
5952
version "7.27.2"
6053
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d"
@@ -66,32 +59,11 @@
6659
lru-cache "^5.1.1"
6760
semver "^6.3.1"
6861

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-
8262
"@babel/helper-globals@^7.28.0":
8363
version "7.28.0"
8464
resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
8565
integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
8666

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-
9567
"@babel/helper-module-imports@^7.27.1":
9668
version "7.27.1"
9769
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204"
@@ -109,35 +81,6 @@
10981
"@babel/helper-validator-identifier""^7.27.1"
11082
"@babel/traverse""^7.28.3"
11183

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-
14184
"@babel/helper-string-parser@^7.27.1":
14285
version "7.27.1"
14386
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
@@ -168,14 +111,6 @@
168111
dependencies:
169112
"@babel/types""^7.28.4"
170113

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-
179114
"@babel/template@^7.27.2":
180115
version "7.27.2"
181116
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d"
@@ -198,7 +133,7 @@
198133
"@babel/types""^7.28.4"
199134
debug "^4.3.1"
200135

201-
"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
136+
"@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
202137
version "7.28.4"
203138
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
204139
integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
@@ -668,18 +603,6 @@ has-flag@^4.0.0:
668603
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
669604
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
670605

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-
683606
ignore@^5.2.0:
684607
version "5.3.2"
685608
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
@@ -912,6 +835,11 @@ type-check@^0.4.0, type-check@~0.4.0:
912835
dependencies:
913836
prelude-ls "^1.2.1"
914837

838+
typescript@^5.4.3:
839+
version "5.9.3"
840+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
841+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
842+
915843
update-browserslist-db@^1.1.3:
916844
version "1.1.3"
917845
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"
@@ -949,12 +877,12 @@ yocto-queue@^0.1.0:
949877
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
950878
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
951879

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==
880+
"zod-validation-error@^3.0.3 || ^4.0.0":
881+
version "4.0.2"
882+
resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.2.tgz#bc605eba49ce0fcd598c127fee1c236be3f22918"
883+
integrity sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==
956884

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==
885+
"zod@^3.22.4 || ^4.0.0":
886+
version "4.1.11"
887+
resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.11.tgz#4aab62f76cfd45e6c6166519ba31b2ea019f75f5"
888+
integrity sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==

‎packages/eslint-plugin-react-hooks/npm/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
export*from'./cjs/eslint-plugin-react-hooks';
8+
export{default}from'./cjs/eslint-plugin-react-hooks';

‎packages/eslint-plugin-react-hooks/src/index.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const allRuleConfigs: Linter.RulesRecord = {
4444
...compilerRuleConfigs,
4545
};
4646

47+
typeFlatConfig={
48+
plugins: Record<string,any>;
49+
rules: Linter.RulesRecord;
50+
};
51+
4752
constplugin={
4853
meta: {
4954
name: 'eslint-plugin-react-hooks',
@@ -58,9 +63,9 @@ const plugin = {
5863
plugins: Array<string>;
5964
rules: Linter.RulesRecord;
6065
};
61-
'flat/recommended': Array<Linter.Config>;
62-
'recommended-latest': Array<Linter.Config>;
63-
recommended: Array<Linter.Config>;
66+
'flat/recommended': Array<FlatConfig>;
67+
'recommended-latest': Array<FlatConfig>;
68+
recommended: Array<FlatConfig>;
6469
},
6570
};
6671

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit c786258

Browse files
authored
[eprh] Fix config type not being exported correctly (#34746)
Another attempt to fix#34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks
1 parent 1be3ce9 commit c786258

6 files changed

Lines changed: 46 additions & 95 deletions

File tree

‎fixtures/eslint-v9/eslint.config.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export default defineConfig([
1212
},
1313
},
1414
},
15-
plugins: {
16-
'react-hooks': reactHooks,
17-
},
18-
extends: ['react-hooks/recommended-latest'],
15+
extends: [reactHooks.configs['recommended-latest']],
1916
rules: {
2017
'react-hooks/exhaustive-deps': 'error',
2118
},

‎fixtures/eslint-v9/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
},
99
"scripts": {
1010
"build": "node build.mjs && yarn",
11-
"lint": "eslint index.js --report-unused-disable-directives"
11+
"lint": "tsc --noEmit && eslint index.js --report-unused-disable-directives"
12+
},
13+
"devDependencies": {
14+
"typescript": "^5.4.3"
1215
}
1316
}

‎fixtures/eslint-v9/tsconfig.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
{
2+
"compilerOptions": {
3+
"lib": [
4+
"es2022"
5+
],
6+
"module": "nodenext",
7+
"moduleResolution": "nodenext",
8+
"target": "es2022",
9+
"typeRoots": [
10+
"./node_modules/@types"
11+
],
12+
"skipLibCheck": true
13+
},
14+
"exclude": [
15+
"node_modules",
16+
"**/node_modules",
17+
"../node_modules",
18+
"../../node_modules"
19+
]
220
}

‎fixtures/eslint-v9/yarn.lock‎

Lines changed: 14 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
"@jridgewell/trace-mapping""^0.3.28"
4949
jsesc "^3.0.2"
5050

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-
5851
"@babel/helper-compilation-targets@^7.27.2":
5952
version "7.27.2"
6053
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d"
@@ -66,32 +59,11 @@
6659
lru-cache "^5.1.1"
6760
semver "^6.3.1"
6861

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-
8262
"@babel/helper-globals@^7.28.0":
8363
version "7.28.0"
8464
resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
8565
integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
8666

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-
9567
"@babel/helper-module-imports@^7.27.1":
9668
version "7.27.1"
9769
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204"
@@ -109,35 +81,6 @@
10981
"@babel/helper-validator-identifier""^7.27.1"
11082
"@babel/traverse""^7.28.3"
11183

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-
14184
"@babel/helper-string-parser@^7.27.1":
14285
version "7.27.1"
14386
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
@@ -168,14 +111,6 @@
168111
dependencies:
169112
"@babel/types""^7.28.4"
170113

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-
179114
"@babel/template@^7.27.2":
180115
version "7.27.2"
181116
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d"
@@ -198,7 +133,7 @@
198133
"@babel/types""^7.28.4"
199134
debug "^4.3.1"
200135

201-
"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
136+
"@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
202137
version "7.28.4"
203138
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
204139
integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
@@ -668,18 +603,6 @@ has-flag@^4.0.0:
668603
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
669604
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
670605

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-
683606
ignore@^5.2.0:
684607
version "5.3.2"
685608
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
@@ -912,6 +835,11 @@ type-check@^0.4.0, type-check@~0.4.0:
912835
dependencies:
913836
prelude-ls "^1.2.1"
914837

838+
typescript@^5.4.3:
839+
version "5.9.3"
840+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
841+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
842+
915843
update-browserslist-db@^1.1.3:
916844
version "1.1.3"
917845
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"
@@ -949,12 +877,12 @@ yocto-queue@^0.1.0:
949877
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
950878
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
951879

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==
880+
"zod-validation-error@^3.0.3 || ^4.0.0":
881+
version "4.0.2"
882+
resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.2.tgz#bc605eba49ce0fcd598c127fee1c236be3f22918"
883+
integrity sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==
956884

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==
885+
"zod@^3.22.4 || ^4.0.0":
886+
version "4.1.11"
887+
resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.11.tgz#4aab62f76cfd45e6c6166519ba31b2ea019f75f5"
888+
integrity sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==

‎packages/eslint-plugin-react-hooks/npm/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
export*from'./cjs/eslint-plugin-react-hooks';
8+
export{default}from'./cjs/eslint-plugin-react-hooks';

‎packages/eslint-plugin-react-hooks/src/index.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const allRuleConfigs: Linter.RulesRecord = {
4444
...compilerRuleConfigs,
4545
};
4646

47+
typeFlatConfig={
48+
plugins: Record<string,any>;
49+
rules: Linter.RulesRecord;
50+
};
51+
4752
constplugin={
4853
meta: {
4954
name: 'eslint-plugin-react-hooks',
@@ -58,9 +63,9 @@ const plugin = {
5863
plugins: Array<string>;
5964
rules: Linter.RulesRecord;
6065
};
61-
'flat/recommended': Array<Linter.Config>;
62-
'recommended-latest': Array<Linter.Config>;
63-
recommended: Array<Linter.Config>;
66+
'flat/recommended': Array<FlatConfig>;
67+
'recommended-latest': Array<FlatConfig>;
68+
recommended: Array<FlatConfig>;
6469
},
6570
};
6671

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit c786258

Browse files
authored
[eprh] Fix config type not being exported correctly (#34746)
Another attempt to fix#34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks
1 parent 1be3ce9 commit c786258

6 files changed

Lines changed: 46 additions & 95 deletions

File tree

‎fixtures/eslint-v9/eslint.config.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export default defineConfig([
1212
},
1313
},
1414
},
15-
plugins: {
16-
'react-hooks': reactHooks,
17-
},
18-
extends: ['react-hooks/recommended-latest'],
15+
extends: [reactHooks.configs['recommended-latest']],
1916
rules: {
2017
'react-hooks/exhaustive-deps': 'error',
2118
},

‎fixtures/eslint-v9/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
},
99
"scripts": {
1010
"build": "node build.mjs && yarn",
11-
"lint": "eslint index.js --report-unused-disable-directives"
11+
"lint": "tsc --noEmit && eslint index.js --report-unused-disable-directives"
12+
},
13+
"devDependencies": {
14+
"typescript": "^5.4.3"
1215
}
1316
}

‎fixtures/eslint-v9/tsconfig.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
{
2+
"compilerOptions": {
3+
"lib": [
4+
"es2022"
5+
],
6+
"module": "nodenext",
7+
"moduleResolution": "nodenext",
8+
"target": "es2022",
9+
"typeRoots": [
10+
"./node_modules/@types"
11+
],
12+
"skipLibCheck": true
13+
},
14+
"exclude": [
15+
"node_modules",
16+
"**/node_modules",
17+
"../node_modules",
18+
"../../node_modules"
19+
]
220
}

‎fixtures/eslint-v9/yarn.lock‎

Lines changed: 14 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
"@jridgewell/trace-mapping""^0.3.28"
4949
jsesc "^3.0.2"
5050

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-
5851
"@babel/helper-compilation-targets@^7.27.2":
5952
version "7.27.2"
6053
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d"
@@ -66,32 +59,11 @@
6659
lru-cache "^5.1.1"
6760
semver "^6.3.1"
6861

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-
8262
"@babel/helper-globals@^7.28.0":
8363
version "7.28.0"
8464
resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
8565
integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
8666

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-
9567
"@babel/helper-module-imports@^7.27.1":
9668
version "7.27.1"
9769
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204"
@@ -109,35 +81,6 @@
10981
"@babel/helper-validator-identifier""^7.27.1"
11082
"@babel/traverse""^7.28.3"
11183

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-
14184
"@babel/helper-string-parser@^7.27.1":
14285
version "7.27.1"
14386
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
@@ -168,14 +111,6 @@
168111
dependencies:
169112
"@babel/types""^7.28.4"
170113

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-
179114
"@babel/template@^7.27.2":
180115
version "7.27.2"
181116
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d"
@@ -198,7 +133,7 @@
198133
"@babel/types""^7.28.4"
199134
debug "^4.3.1"
200135

201-
"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
136+
"@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
202137
version "7.28.4"
203138
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
204139
integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
@@ -668,18 +603,6 @@ has-flag@^4.0.0:
668603
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
669604
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
670605

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-
683606
ignore@^5.2.0:
684607
version "5.3.2"
685608
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
@@ -912,6 +835,11 @@ type-check@^0.4.0, type-check@~0.4.0:
912835
dependencies:
913836
prelude-ls "^1.2.1"
914837

838+
typescript@^5.4.3:
839+
version "5.9.3"
840+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
841+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
842+
915843
update-browserslist-db@^1.1.3:
916844
version "1.1.3"
917845
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"
@@ -949,12 +877,12 @@ yocto-queue@^0.1.0:
949877
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
950878
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
951879

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==
880+
"zod-validation-error@^3.0.3 || ^4.0.0":
881+
version "4.0.2"
882+
resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.2.tgz#bc605eba49ce0fcd598c127fee1c236be3f22918"
883+
integrity sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==
956884

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==
885+
"zod@^3.22.4 || ^4.0.0":
886+
version "4.1.11"
887+
resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.11.tgz#4aab62f76cfd45e6c6166519ba31b2ea019f75f5"
888+
integrity sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==

‎packages/eslint-plugin-react-hooks/npm/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
export*from'./cjs/eslint-plugin-react-hooks';
8+
export{default}from'./cjs/eslint-plugin-react-hooks';

‎packages/eslint-plugin-react-hooks/src/index.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const allRuleConfigs: Linter.RulesRecord = {
4444
...compilerRuleConfigs,
4545
};
4646

47+
typeFlatConfig={
48+
plugins: Record<string,any>;
49+
rules: Linter.RulesRecord;
50+
};
51+
4752
constplugin={
4853
meta: {
4954
name: 'eslint-plugin-react-hooks',
@@ -58,9 +63,9 @@ const plugin = {
5863
plugins: Array<string>;
5964
rules: Linter.RulesRecord;
6065
};
61-
'flat/recommended': Array<Linter.Config>;
62-
'recommended-latest': Array<Linter.Config>;
63-
recommended: Array<Linter.Config>;
66+
'flat/recommended': Array<FlatConfig>;
67+
'recommended-latest': Array<FlatConfig>;
68+
recommended: Array<FlatConfig>;
6469
},
6570
};
6671

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Commit c786258

Browse files
authored
[eprh] Fix config type not being exported correctly (#34746)
Another attempt to fix#34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks
1 parent 1be3ce9 commit c786258

6 files changed

Lines changed: 46 additions & 95 deletions

File tree

‎fixtures/eslint-v9/eslint.config.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export default defineConfig([
1212
},
1313
},
1414
},
15-
plugins: {
16-
'react-hooks': reactHooks,
17-
},
18-
extends: ['react-hooks/recommended-latest'],
15+
extends: [reactHooks.configs['recommended-latest']],
1916
rules: {
2017
'react-hooks/exhaustive-deps': 'error',
2118
},

‎fixtures/eslint-v9/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
},
99
"scripts": {
1010
"build": "node build.mjs && yarn",
11-
"lint": "eslint index.js --report-unused-disable-directives"
11+
"lint": "tsc --noEmit && eslint index.js --report-unused-disable-directives"
12+
},
13+
"devDependencies": {
14+
"typescript": "^5.4.3"
1215
}
1316
}

‎fixtures/eslint-v9/tsconfig.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
{
2+
"compilerOptions": {
3+
"lib": [
4+
"es2022"
5+
],
6+
"module": "nodenext",
7+
"moduleResolution": "nodenext",
8+
"target": "es2022",
9+
"typeRoots": [
10+
"./node_modules/@types"
11+
],
12+
"skipLibCheck": true
13+
},
14+
"exclude": [
15+
"node_modules",
16+
"**/node_modules",
17+
"../node_modules",
18+
"../../node_modules"
19+
]
220
}

‎fixtures/eslint-v9/yarn.lock‎

Lines changed: 14 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
"@jridgewell/trace-mapping""^0.3.28"
4949
jsesc "^3.0.2"
5050

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-
5851
"@babel/helper-compilation-targets@^7.27.2":
5952
version "7.27.2"
6053
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d"
@@ -66,32 +59,11 @@
6659
lru-cache "^5.1.1"
6760
semver "^6.3.1"
6861

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-
8262
"@babel/helper-globals@^7.28.0":
8363
version "7.28.0"
8464
resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
8565
integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
8666

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-
9567
"@babel/helper-module-imports@^7.27.1":
9668
version "7.27.1"
9769
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204"
@@ -109,35 +81,6 @@
10981
"@babel/helper-validator-identifier""^7.27.1"
11082
"@babel/traverse""^7.28.3"
11183

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-
14184
"@babel/helper-string-parser@^7.27.1":
14285
version "7.27.1"
14386
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
@@ -168,14 +111,6 @@
168111
dependencies:
169112
"@babel/types""^7.28.4"
170113

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-
179114
"@babel/template@^7.27.2":
180115
version "7.27.2"
181116
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d"
@@ -198,7 +133,7 @@
198133
"@babel/types""^7.28.4"
199134
debug "^4.3.1"
200135

201-
"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
136+
"@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
202137
version "7.28.4"
203138
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
204139
integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
@@ -668,18 +603,6 @@ has-flag@^4.0.0:
668603
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
669604
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
670605

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-
683606
ignore@^5.2.0:
684607
version "5.3.2"
685608
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
@@ -912,6 +835,11 @@ type-check@^0.4.0, type-check@~0.4.0:
912835
dependencies:
913836
prelude-ls "^1.2.1"
914837

838+
typescript@^5.4.3:
839+
version "5.9.3"
840+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
841+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
842+
915843
update-browserslist-db@^1.1.3:
916844
version "1.1.3"
917845
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"
@@ -949,12 +877,12 @@ yocto-queue@^0.1.0:
949877
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
950878
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
951879

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==
880+
"zod-validation-error@^3.0.3 || ^4.0.0":
881+
version "4.0.2"
882+
resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.2.tgz#bc605eba49ce0fcd598c127fee1c236be3f22918"
883+
integrity sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==
956884

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==
885+
"zod@^3.22.4 || ^4.0.0":
886+
version "4.1.11"
887+
resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.11.tgz#4aab62f76cfd45e6c6166519ba31b2ea019f75f5"
888+
integrity sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==

‎packages/eslint-plugin-react-hooks/npm/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
export*from'./cjs/eslint-plugin-react-hooks';
8+
export{default}from'./cjs/eslint-plugin-react-hooks';

‎packages/eslint-plugin-react-hooks/src/index.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const allRuleConfigs: Linter.RulesRecord = {
4444
...compilerRuleConfigs,
4545
};
4646

47+
typeFlatConfig={
48+
plugins: Record<string,any>;
49+
rules: Linter.RulesRecord;
50+
};
51+
4752
constplugin={
4853
meta: {
4954
name: 'eslint-plugin-react-hooks',
@@ -58,9 +63,9 @@ const plugin = {
5863
plugins: Array<string>;
5964
rules: Linter.RulesRecord;
6065
};
61-
'flat/recommended': Array<Linter.Config>;
62-
'recommended-latest': Array<Linter.Config>;
63-
recommended: Array<Linter.Config>;
66+
'flat/recommended': Array<FlatConfig>;
67+
'recommended-latest': Array<FlatConfig>;
68+
recommended: Array<FlatConfig>;
6469
},
6570
};
6671

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit c786258

Browse files
authored
[eprh] Fix config type not being exported correctly (#34746)
Another attempt to fix#34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks
1 parent 1be3ce9 commit c786258

6 files changed

Lines changed: 46 additions & 95 deletions

File tree

‎fixtures/eslint-v9/eslint.config.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export default defineConfig([
1212
},
1313
},
1414
},
15-
plugins: {
16-
'react-hooks': reactHooks,
17-
},
18-
extends: ['react-hooks/recommended-latest'],
15+
extends: [reactHooks.configs['recommended-latest']],
1916
rules: {
2017
'react-hooks/exhaustive-deps': 'error',
2118
},

‎fixtures/eslint-v9/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
},
99
"scripts": {
1010
"build": "node build.mjs && yarn",
11-
"lint": "eslint index.js --report-unused-disable-directives"
11+
"lint": "tsc --noEmit && eslint index.js --report-unused-disable-directives"
12+
},
13+
"devDependencies": {
14+
"typescript": "^5.4.3"
1215
}
1316
}

‎fixtures/eslint-v9/tsconfig.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
{
2+
"compilerOptions": {
3+
"lib": [
4+
"es2022"
5+
],
6+
"module": "nodenext",
7+
"moduleResolution": "nodenext",
8+
"target": "es2022",
9+
"typeRoots": [
10+
"./node_modules/@types"
11+
],
12+
"skipLibCheck": true
13+
},
14+
"exclude": [
15+
"node_modules",
16+
"**/node_modules",
17+
"../node_modules",
18+
"../../node_modules"
19+
]
220
}

‎fixtures/eslint-v9/yarn.lock‎

Lines changed: 14 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
"@jridgewell/trace-mapping""^0.3.28"
4949
jsesc "^3.0.2"
5050

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-
5851
"@babel/helper-compilation-targets@^7.27.2":
5952
version "7.27.2"
6053
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d"
@@ -66,32 +59,11 @@
6659
lru-cache "^5.1.1"
6760
semver "^6.3.1"
6861

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-
8262
"@babel/helper-globals@^7.28.0":
8363
version "7.28.0"
8464
resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
8565
integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
8666

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-
9567
"@babel/helper-module-imports@^7.27.1":
9668
version "7.27.1"
9769
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204"
@@ -109,35 +81,6 @@
10981
"@babel/helper-validator-identifier""^7.27.1"
11082
"@babel/traverse""^7.28.3"
11183

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-
14184
"@babel/helper-string-parser@^7.27.1":
14285
version "7.27.1"
14386
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
@@ -168,14 +111,6 @@
168111
dependencies:
169112
"@babel/types""^7.28.4"
170113

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-
179114
"@babel/template@^7.27.2":
180115
version "7.27.2"
181116
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d"
@@ -198,7 +133,7 @@
198133
"@babel/types""^7.28.4"
199134
debug "^4.3.1"
200135

201-
"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
136+
"@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
202137
version "7.28.4"
203138
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
204139
integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
@@ -668,18 +603,6 @@ has-flag@^4.0.0:
668603
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
669604
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
670605

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-
683606
ignore@^5.2.0:
684607
version "5.3.2"
685608
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
@@ -912,6 +835,11 @@ type-check@^0.4.0, type-check@~0.4.0:
912835
dependencies:
913836
prelude-ls "^1.2.1"
914837

838+
typescript@^5.4.3:
839+
version "5.9.3"
840+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
841+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
842+
915843
update-browserslist-db@^1.1.3:
916844
version "1.1.3"
917845
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"
@@ -949,12 +877,12 @@ yocto-queue@^0.1.0:
949877
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
950878
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
951879

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==
880+
"zod-validation-error@^3.0.3 || ^4.0.0":
881+
version "4.0.2"
882+
resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.2.tgz#bc605eba49ce0fcd598c127fee1c236be3f22918"
883+
integrity sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==
956884

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==
885+
"zod@^3.22.4 || ^4.0.0":
886+
version "4.1.11"
887+
resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.11.tgz#4aab62f76cfd45e6c6166519ba31b2ea019f75f5"
888+
integrity sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==

‎packages/eslint-plugin-react-hooks/npm/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
export*from'./cjs/eslint-plugin-react-hooks';
8+
export{default}from'./cjs/eslint-plugin-react-hooks';

‎packages/eslint-plugin-react-hooks/src/index.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const allRuleConfigs: Linter.RulesRecord = {
4444
...compilerRuleConfigs,
4545
};
4646

47+
typeFlatConfig={
48+
plugins: Record<string,any>;
49+
rules: Linter.RulesRecord;
50+
};
51+
4752
constplugin={
4853
meta: {
4954
name: 'eslint-plugin-react-hooks',
@@ -58,9 +63,9 @@ const plugin = {
5863
plugins: Array<string>;
5964
rules: Linter.RulesRecord;
6065
};
61-
'flat/recommended': Array<Linter.Config>;
62-
'recommended-latest': Array<Linter.Config>;
63-
recommended: Array<Linter.Config>;
66+
'flat/recommended': Array<FlatConfig>;
67+
'recommended-latest': Array<FlatConfig>;
68+
recommended: Array<FlatConfig>;
6469
},
6570
};
6671

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Commit c786258

Browse files
authored
[eprh] Fix config type not being exported correctly (#34746)
Another attempt to fix#34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks
1 parent 1be3ce9 commit c786258

6 files changed

Lines changed: 46 additions & 95 deletions

File tree

‎fixtures/eslint-v9/eslint.config.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export default defineConfig([
1212
},
1313
},
1414
},
15-
plugins: {
16-
'react-hooks': reactHooks,
17-
},
18-
extends: ['react-hooks/recommended-latest'],
15+
extends: [reactHooks.configs['recommended-latest']],
1916
rules: {
2017
'react-hooks/exhaustive-deps': 'error',
2118
},

‎fixtures/eslint-v9/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
},
99
"scripts": {
1010
"build": "node build.mjs && yarn",
11-
"lint": "eslint index.js --report-unused-disable-directives"
11+
"lint": "tsc --noEmit && eslint index.js --report-unused-disable-directives"
12+
},
13+
"devDependencies": {
14+
"typescript": "^5.4.3"
1215
}
1316
}

‎fixtures/eslint-v9/tsconfig.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
{
2+
"compilerOptions": {
3+
"lib": [
4+
"es2022"
5+
],
6+
"module": "nodenext",
7+
"moduleResolution": "nodenext",
8+
"target": "es2022",
9+
"typeRoots": [
10+
"./node_modules/@types"
11+
],
12+
"skipLibCheck": true
13+
},
14+
"exclude": [
15+
"node_modules",
16+
"**/node_modules",
17+
"../node_modules",
18+
"../../node_modules"
19+
]
220
}

‎fixtures/eslint-v9/yarn.lock‎

Lines changed: 14 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
"@jridgewell/trace-mapping""^0.3.28"
4949
jsesc "^3.0.2"
5050

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-
5851
"@babel/helper-compilation-targets@^7.27.2":
5952
version "7.27.2"
6053
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d"
@@ -66,32 +59,11 @@
6659
lru-cache "^5.1.1"
6760
semver "^6.3.1"
6861

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-
8262
"@babel/helper-globals@^7.28.0":
8363
version "7.28.0"
8464
resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
8565
integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
8666

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-
9567
"@babel/helper-module-imports@^7.27.1":
9668
version "7.27.1"
9769
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204"
@@ -109,35 +81,6 @@
10981
"@babel/helper-validator-identifier""^7.27.1"
11082
"@babel/traverse""^7.28.3"
11183

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-
14184
"@babel/helper-string-parser@^7.27.1":
14285
version "7.27.1"
14386
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
@@ -168,14 +111,6 @@
168111
dependencies:
169112
"@babel/types""^7.28.4"
170113

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-
179114
"@babel/template@^7.27.2":
180115
version "7.27.2"
181116
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d"
@@ -198,7 +133,7 @@
198133
"@babel/types""^7.28.4"
199134
debug "^4.3.1"
200135

201-
"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
136+
"@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
202137
version "7.28.4"
203138
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
204139
integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
@@ -668,18 +603,6 @@ has-flag@^4.0.0:
668603
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
669604
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
670605

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-
683606
ignore@^5.2.0:
684607
version "5.3.2"
685608
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
@@ -912,6 +835,11 @@ type-check@^0.4.0, type-check@~0.4.0:
912835
dependencies:
913836
prelude-ls "^1.2.1"
914837

838+
typescript@^5.4.3:
839+
version "5.9.3"
840+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
841+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
842+
915843
update-browserslist-db@^1.1.3:
916844
version "1.1.3"
917845
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"
@@ -949,12 +877,12 @@ yocto-queue@^0.1.0:
949877
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
950878
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
951879

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==
880+
"zod-validation-error@^3.0.3 || ^4.0.0":
881+
version "4.0.2"
882+
resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.2.tgz#bc605eba49ce0fcd598c127fee1c236be3f22918"
883+
integrity sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==
956884

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==
885+
"zod@^3.22.4 || ^4.0.0":
886+
version "4.1.11"
887+
resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.11.tgz#4aab62f76cfd45e6c6166519ba31b2ea019f75f5"
888+
integrity sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==

‎packages/eslint-plugin-react-hooks/npm/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
export*from'./cjs/eslint-plugin-react-hooks';
8+
export{default}from'./cjs/eslint-plugin-react-hooks';

‎packages/eslint-plugin-react-hooks/src/index.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const allRuleConfigs: Linter.RulesRecord = {
4444
...compilerRuleConfigs,
4545
};
4646

47+
typeFlatConfig={
48+
plugins: Record<string,any>;
49+
rules: Linter.RulesRecord;
50+
};
51+
4752
constplugin={
4853
meta: {
4954
name: 'eslint-plugin-react-hooks',
@@ -58,9 +63,9 @@ const plugin = {
5863
plugins: Array<string>;
5964
rules: Linter.RulesRecord;
6065
};
61-
'flat/recommended': Array<Linter.Config>;
62-
'recommended-latest': Array<Linter.Config>;
63-
recommended: Array<Linter.Config>;
66+
'flat/recommended': Array<FlatConfig>;
67+
'recommended-latest': Array<FlatConfig>;
68+
recommended: Array<FlatConfig>;
6469
},
6570
};
6671

0 commit comments

Comments
 (0)
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Commit c786258

Browse files
authored
[eprh] Fix config type not being exported correctly (#34746)
Another attempt to fix#34745. I updated our fixture for eslint-v9 to include running tsc. I believe there were 2 issues: 1. `export * from './cjs/eslint-plugin-react-hooks'` in npm/index.d.ts was no longer correct as we updated index.ts to export default instead of named exports 2. After fixing ^ there was a typescript error which I fixed by making some small tweaks
1 parent 1be3ce9 commit c786258

6 files changed

Lines changed: 46 additions & 95 deletions

File tree

‎fixtures/eslint-v9/eslint.config.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ export default defineConfig([
1212
},
1313
},
1414
},
15-
plugins: {
16-
'react-hooks': reactHooks,
17-
},
18-
extends: ['react-hooks/recommended-latest'],
15+
extends: [reactHooks.configs['recommended-latest']],
1916
rules: {
2017
'react-hooks/exhaustive-deps': 'error',
2118
},

‎fixtures/eslint-v9/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
},
99
"scripts": {
1010
"build": "node build.mjs && yarn",
11-
"lint": "eslint index.js --report-unused-disable-directives"
11+
"lint": "tsc --noEmit && eslint index.js --report-unused-disable-directives"
12+
},
13+
"devDependencies": {
14+
"typescript": "^5.4.3"
1215
}
1316
}

‎fixtures/eslint-v9/tsconfig.json‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
{
2+
"compilerOptions": {
3+
"lib": [
4+
"es2022"
5+
],
6+
"module": "nodenext",
7+
"moduleResolution": "nodenext",
8+
"target": "es2022",
9+
"typeRoots": [
10+
"./node_modules/@types"
11+
],
12+
"skipLibCheck": true
13+
},
14+
"exclude": [
15+
"node_modules",
16+
"**/node_modules",
17+
"../node_modules",
18+
"../../node_modules"
19+
]
220
}

‎fixtures/eslint-v9/yarn.lock‎

Lines changed: 14 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@
4848
"@jridgewell/trace-mapping""^0.3.28"
4949
jsesc "^3.0.2"
5050

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-
5851
"@babel/helper-compilation-targets@^7.27.2":
5952
version "7.27.2"
6053
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d"
@@ -66,32 +59,11 @@
6659
lru-cache "^5.1.1"
6760
semver "^6.3.1"
6861

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-
8262
"@babel/helper-globals@^7.28.0":
8363
version "7.28.0"
8464
resolved "https://registry.yarnpkg.com/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674"
8565
integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==
8666

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-
9567
"@babel/helper-module-imports@^7.27.1":
9668
version "7.27.1"
9769
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204"
@@ -109,35 +81,6 @@
10981
"@babel/helper-validator-identifier""^7.27.1"
11082
"@babel/traverse""^7.28.3"
11183

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-
14184
"@babel/helper-string-parser@^7.27.1":
14285
version "7.27.1"
14386
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687"
@@ -168,14 +111,6 @@
168111
dependencies:
169112
"@babel/types""^7.28.4"
170113

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-
179114
"@babel/template@^7.27.2":
180115
version "7.27.2"
181116
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d"
@@ -198,7 +133,7 @@
198133
"@babel/types""^7.28.4"
199134
debug "^4.3.1"
200135

201-
"@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
136+
"@babel/types@^7.27.1", "@babel/types@^7.28.2", "@babel/types@^7.28.4":
202137
version "7.28.4"
203138
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.4.tgz#0a4e618f4c60a7cd6c11cb2d48060e4dbe38ac3a"
204139
integrity sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==
@@ -668,18 +603,6 @@ has-flag@^4.0.0:
668603
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
669604
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
670605

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-
683606
ignore@^5.2.0:
684607
version "5.3.2"
685608
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
@@ -912,6 +835,11 @@ type-check@^0.4.0, type-check@~0.4.0:
912835
dependencies:
913836
prelude-ls "^1.2.1"
914837

838+
typescript@^5.4.3:
839+
version "5.9.3"
840+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
841+
integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
842+
915843
update-browserslist-db@^1.1.3:
916844
version "1.1.3"
917845
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz#348377dd245216f9e7060ff50b15a1b740b75420"
@@ -949,12 +877,12 @@ yocto-queue@^0.1.0:
949877
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
950878
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
951879

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==
880+
"zod-validation-error@^3.0.3 || ^4.0.0":
881+
version "4.0.2"
882+
resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-4.0.2.tgz#bc605eba49ce0fcd598c127fee1c236be3f22918"
883+
integrity sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==
956884

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==
885+
"zod@^3.22.4 || ^4.0.0":
886+
version "4.1.11"
887+
resolved "https://registry.yarnpkg.com/zod/-/zod-4.1.11.tgz#4aab62f76cfd45e6c6166519ba31b2ea019f75f5"
888+
integrity sha512-WPsqwxITS2tzx1bzhIKsEs19ABD5vmCVa4xBo2tq/SrV4RNZtfws1EnCWQXM6yh8bD08a1idvkB5MZSBiZsjwg==

‎packages/eslint-plugin-react-hooks/npm/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
export*from'./cjs/eslint-plugin-react-hooks';
8+
export{default}from'./cjs/eslint-plugin-react-hooks';

‎packages/eslint-plugin-react-hooks/src/index.ts‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const allRuleConfigs: Linter.RulesRecord = {
4444
...compilerRuleConfigs,
4545
};
4646

47+
typeFlatConfig={
48+
plugins: Record<string,any>;
49+
rules: Linter.RulesRecord;
50+
};
51+
4752
constplugin={
4853
meta: {
4954
name: 'eslint-plugin-react-hooks',
@@ -58,9 +63,9 @@ const plugin = {
5863
plugins: Array<string>;
5964
rules: Linter.RulesRecord;
6065
};
61-
'flat/recommended': Array<Linter.Config>;
62-
'recommended-latest': Array<Linter.Config>;
63-
recommended: Array<Linter.Config>;
66+
'flat/recommended': Array<FlatConfig>;
67+
'recommended-latest': Array<FlatConfig>;
68+
recommended: Array<FlatConfig>;
6469
},
6570
};
6671

0 commit comments

Comments
 (0)