I'm integrating basscss into an app codebase and want to use stylelint to lint my existing app codebase for classes that could conflict. My idea to prevent bugs was to blacklist those classes in my app stylelint configuration. Any idea how to do this? The full list of stylelint rules does not show a specific rule for this but it does have a selector-class-pattern rule that looks promising.
Asked
Active
Viewed 520 times
1 Answers
3
Currently I have solved this using selector-class-pattern
and this blacklist regex
var blacklist = "^(?!(flex|flex-column|flex-wrap)$).+"
module.exports = {
rules: {
"selector-class-pattern": [blacklist, { severity: "warning" }]
}
};

ryanve
- 50,076
- 30
- 102
- 137
-
I am looking to block this pattern `xyz-[0-9]` or `abc-[0-9]`. any idea how can I do it? – ankitd Jan 25 '18 at 04:48