Per rule configuration
theKashey opened this issue · 2 comments
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.
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.
Closing as overrides
are supported in Stylelint now.