/stylelint-config-standard-scss

The standard shareable SCSS config for Stylelint.

Primary LanguageJavaScriptMIT LicenseMIT

stylelint-config-standard-scss

npm version Build Status contributions welcome Downloads per month Greenkeeper badge

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.

Installation

npm install stylelint stylelint-config-standard-scss --save-dev

Usage

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"
}

Extending the config

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"]
  }
}