Skip to content

Commit a7c00f8

Browse files
committed
[eprh] Type configs.flat more strictly
Addresses #34801 where `configs.flat` is possibly undefined as it was typed as a record of arbitrary string keys.
1 parent 71b3a03 commit a7c00f8

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)