This PR copies those two configs and prepends them here as well, with some added names for them to make sense.
This is somewhat of a blunt fix. UI-wise it can be handled better and ideally one or more of defaultConfig, FlatConfigArray and calculateConfigArray would be exposed by ESLint so that this inspector can make use of the very same logic rather than attempt to reimplement it.
If additionally defaultConfig were to eg. add names, then this inspector could opt to eg. hide all eslint/ prefixed rules and as such get the correct prepended config without having to confuse users with showing a config they never themselves added
The default config in ESLint is always prepended to the config before it uses the config, making it so that
**/*.js
,**/*.mjs
,**/*.cjs
are always matching file patterns: https://github.com/eslint/eslint/blob/21d3766c3f4efd981d3cc294c2c82c8014815e6e/lib/config/default-config.js#L66-L69This PR copies those two configs and prepends them here as well, with some added names for them to make sense.
This is somewhat of a blunt fix. UI-wise it can be handled better and ideally one or more of
defaultConfig
,FlatConfigArray
andcalculateConfigArray
would be exposed by ESLint so that this inspector can make use of the very same logic rather than attempt to reimplement it.If additionally
defaultConfig
were to eg. add names, then this inspector could opt to eg. hide alleslint/
prefixed rules and as such get the correct prepended config without having to confuse users with showing a config they never themselves added