1

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.

ryanve
  • 50,076
  • 30
  • 102
  • 137

1 Answers1

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