Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Relevant Package
utils
Playground Link
No response
Repro Code
constplugin:TSESLint.FlatConfig.Plugin={configs:{},}plugin.configs={recommended:[{plugins:{example:plugin,},},],}
ESLint Config
No response
tsconfig
No response
Expected Result
The code should type check without errors. The code is a stripped down version of the example given onhttps://eslint.org/docs/latest/extend/plugins#configs-in-plugins except that I've replacedObject.assign with a direct assignment becauseObject.assign doesn't type check that it can be assigned.
You can see in that example that they set the recommended config to an array, but that's not allowed by theSharedConfigs type used byTSESLint.FlatConfig.Plugin["configs"]. If you replaceTSESLint.FlatConfig.Plugin withESLint.Plugin you can also see that it type checks without errors.
Actual Result
Type checking complains that an array can't be assigned to the typeConfig (the type for the values ofSharedConfigs).
Additional Info
No response
Versions
| package | version |
|---|---|
@typescript-eslint/utils | 8.11.0 |
TypeScript | 5.6.3 |
ESLint | 9.13.0 |
node | 20.17.0 |