The standard shareable SCSS config for Stylelint.
Extends stylelint-config-standard
and stylelint-config-recommended-scss
.
Turns on additional rules to enforce the common stylistic conventions found within a handful of Sass styleguide such as Sass Guidelines and Sass Style Guide.
Use it as is or as a foundation for your own config.
To see the rules that this config uses, please read the config itself.
npm install stylelint stylelint-config-standard-scss --save-dev
If you've installed stylelint-config-standard-scss
locally within your project, just set your stylelint
config to:
{
"extends": "stylelint-config-standard-scss"
}
If you've globally installed stylelint-config-standard-scss
using the -g
flag, then you'll need to use the absolute path to stylelint-config-standard-scss
in your config e.g.
{
"extends": "/absolute/path/to/stylelint-config-standard-scss"
}
Simply add a "rules"
key to your config, then add your overrides and additions there.
For example, to turn off the block-no-empty
rule, and add the unit-whitelist
rule:
{
"extends": "stylelint-config-standard-scss",
"rules": {
"block-no-empty": null,
"unit-whitelist": ["em", "rem", "s"]
}
}