Open max-norin opened 4 years ago
Thank you for this issue!
I am not familiar with RSCCS. Can you write a detailed specification of the features you want to add, in this issue? Also, can you open a pull request after that?
For example,
replace ignoreBEMModifier
option with:
ignoreModifier: {
// The preset patterns are available: bem and rscc
preset: 'bem'|'rscc',
// Array of regular expressions or strings defining custom modifier naming
list: [
'/{componentSelector}--{modifier}/', // this regular expression match bem
'/{componentSelector}\\.-{modifier}/', // this regular expression match rscc
'&--warn', '&--error', // this strings match bem where as modifiers there can only be `warn` and `error`
'&.-warn', '&.-error', // this strings match rscc where as modifiers there can only be `warn` and `error`
'/{componentSelector}-{modifier}/', // this regular expression match custom modifier naming
'/{componentSelector}---{modifier}/', // this regular expression match custom modifier naming
'/{componentSelector}.{modifier}/', // this regular expression match custom modifier naming
]
}
vue-scoped-css/no-unused-selector
rule hasignoreBEMModifier
option BesidesBEM
, there are other ways to organize CSS code. For example RSCCS, where the modifier is defined as in the following code. More details here.Also, development teams can use custom modifier naming. Сreator of the stylelint-selector-bem-pattern made it possible to specify a regular expression to define a modifier. Maybe you should pay attention to this.