Overrides of ignore patterns #15687
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
Projects
From: eslint/eslintrc#20 (comment), #5410
The flat config should provide the way that end-users override the
ignores
setting of shareable configs and ESLint built-ins.In
.eslintignore
, we can use negative patterns.ESLint ignores
/node_modules/*
by default, but we can un-ignore it by such as the above setting.Similarly, ESLint ignores dotfiles by default, but we can un-ignore it to lint
.eslintrc.js
-like config files.In
.eslintrc.*
, theignorePatterns
setting is the same style as.eslintignore
. Both end-user's configs and shareable configs can have theignorePatterns
setting. It let us override the settings of base configs.I think we should consider it on the flat config system.
Also, I think it's confusing with the following:
This is a topic that wasn't resolved in "Config File Simplification" RFC.
In eslint/rfcs#9 (comment) thread, I had tried to describe that the
ignores
setting has two meaning, then argued that it should be separated.files
field exists, theignores
field is used for the adoption of the config array element and isn't merged for the ignore check. It's glob patterns as the RFC says. It corresponds to thefiles
andexcludedFiles
of legacy configs.files
field doesn't exist, theignores
field doesn't affect the adoption of the config array element and is merged for the ignore check. It's a list of gitignore-style patterns and supports negative patterns to override base configs. It corresponds to theignorePatterns
of legacy configs and.eslintignore
.The text was updated successfully, but these errors were encountered: