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

Per rule configuration #139

Closed
theKashey opened this issue Apr 30, 2021 · 2 comments
Closed

Per rule configuration #139

theKashey opened this issue Apr 30, 2021 · 2 comments

Comments

@theKashey
Copy link

Hey, it might sound a little strange, but I am thinking about different order settings per file name, as well as per rule.

Technically speaking that's probably stylelint level feature (combing rules), but I would like to start a conversation here, as it can be resolved here as well, but exposing checkNodeForOrder among the public API.

Why

The idea is to use something like rational-order, which different rationales for different use cases - in term of BEM - use different styles for Block(a rule name matching some pattern) and Element(everything else)

Not about allowing/disallowing properties (however, that can be a good idea), but just grouping them in a different order to highlight the difference a little.

@hudochenkov
Copy link
Owner

Per file config could be achieved with overrides option, but someone needs to develop it first.

I could understand why per rule config might be needed for BEM. It seems quite specific and unique problem. Theoretically it could be achieved if new stylelint plugin would call this plugin per rule via stylelint.utils.checkAgainstRule. But currently this utility is limited to stylelint core rules only.

@hudochenkov
Copy link
Owner

Closing as overrides are supported in Stylelint now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants