[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"
/>
This commit is contained in:
lauren 2025-10-22 13:18:44 -04:00 committed by GitHub
parent 6b344c7c53
commit bbb7a1fdf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,10 @@ const configs = {
plugins,
rules: recommendedLatestRuleConfigs,
},
flat: {} as Record<string, ReactHooksFlatConfig>,
flat: {} as {
recommended: ReactHooksFlatConfig;
'recommended-latest': ReactHooksFlatConfig;
},
};
const plugin = {