Skip to content

Commit bbb7a1f

Browse files
authored
[eprh] Type configs.flat more strictly (#34950)
Addresses #34801 where `configs.flat` is possibly undefined as it was typed as a record of arbitrary string keys. <img width="990" height="125" alt="Screenshot 2025-10-22 at 1 16 44 PM" src="https://github.com/user-attachments/assets/8b0d37b9-d7b0-4fc0-aa62-1b0968dae75f" />
1 parent 6b344c7 commit bbb7a1f

File tree

1 file changed

+4
-1
lines changed
  • packages/eslint-plugin-react-hooks/src

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ const configs = {
7171
plugins,
7272
rules: recommendedLatestRuleConfigs,
7373
},
74-
flat: {} as Record<string, ReactHooksFlatConfig>,
74+
flat: {} as {
75+
recommended: ReactHooksFlatConfig;
76+
'recommended-latest': ReactHooksFlatConfig;
77+
},
7578
};
7679

7780
const plugin = {

0 commit comments

Comments
 (0)