Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ignores configuration object property #7449

Open
jeddy3 opened this issue Jan 7, 2024 · 1 comment
Open

Add ignores configuration object property #7449

jeddy3 opened this issue Jan 7, 2024 · 1 comment
Labels
status: needs discussion triage needs further discussion

Comments

@jeddy3
Copy link
Member

jeddy3 commented Jan 7, 2024

What is the problem you're trying to solve?

If we lint CSS files by default and add files:[] to the configuration object, it's likely people will reach for ignoreFiles: [] to exclude directories. Its current behaviour is:

Stylelint ignores the node_modules directory by default. However, this is overridden if ignoreFiles is set.

ESLint introduces ignores with their flat config. It has a different behaviour to ignoreFiles: [], i.e. it supports unignoring files through negation rather than removing the defaults.

This feels like a better behaviour as it is less likely people will want to include node_modules.

What solution would you like to see?

Either add a new ignores property with that behaviour and deprecate ignoreFiles: [], or change the ignoreFiles: [] behaviour in a major release. The former feels like it'll give us more wiggle room and can happen in 16.x alongside #3860.

@jeddy3 jeddy3 added the status: needs discussion triage needs further discussion label Jan 7, 2024
@jeddy3 jeddy3 changed the title Add ignores configurtion object property Add ignores configuration object property Jan 7, 2024
@ybiquitous
Copy link
Member

add a new ignores property with that behaviour and deprecate ignoreFiles: []

I agree with the former. 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs discussion triage needs further discussion
Development

No branches or pull requests

2 participants