stylelint-config-sass-recommended

1.0.0 • Public • Published

stylelint-config-sass-recommended

The recommended shareable config of indent-based Sass for stylelint.

It turns on all the possible errors rules within stylelint.

Use it as is or as a foundation for your own config.

Installation

npm

npm install stylelint-config-sass-recommended --save-dev

yarn

yarn add stylelint-config-sass-recommended --dev

Usage

If you've installed stylelint-config-sass-recommended locally within your project, just set your stylelint config to:

{
  "extends": "stylelint-config-sass-recommended"
}

If you've globally installed stylelint-config-sass-recommended using the -g flag, then you'll need to use the absolute path to stylelint-config-sass-recommended in your config e.g.

{
  "extends": "/absolute/path/to/stylelint-config-sass-recommended"
}

Extending the config

Simply add a "rules" key to your config, then add your overrides and additions there.

For example, to change the at-rule-no-unknown rule to use its ignoreAtRules option, turn off the block-no-empty rule, and add the unit-whitelist rule:

{
  "extends": "stylelint-config-sass-recommended",
  "rules": {
    "at-rule-no-unknown": [ true, {
      "ignoreAtRules": [
        "extends"
      ]
    }],
    "block-no-empty": null,
    "unit-whitelist": ["em", "rem", "s"]
  }
}

Changelog

License

Package Sidebar

Install

npm i stylelint-config-sass-recommended

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

11.7 kB

Total Files

6

Last publish

Collaborators

  • kkoudev