A collection of stylelint plugins for SUIT CSS.
npm install stylelint-suitcss --save-dev
# or
yarn add stylelint-suitcss --dev
Add stylelint-suitcss
to your stylelint config plugins array, then add rules
you need to the rules
object.
// .stylelintrc
{
"plugins": [
"stylelint-suitcss"
],
"rules": {
"suitcss/custom-property-no-outside-root": true,
"suitcss/root-no-standard-properties": true,
"suitcss/selector-root-no-composition": true
}
}
custom-property-no-outside-root
- Disallow custom properties outside of:root
rules.root-no-standard-properties
- Disallow standard properties inside:root
rules.selector-root-no-composition
- Disallow the composition of:root
in selectors.