stylelint-config-recommended
![Build status](https://ci.appveyor.com/api/projects/status/o8rfhyax6n7bjnlt/branch/master?svg=true)
The recommended shareable config 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 install stylelint-config-recommended --save-dev
Usage
If you've installed stylelint-config-recommended
locally within your project, just set your stylelint
config to:
{
"extends": "stylelint-config-recommended"
}
If you've globally installed stylelint-config-recommended
using the -g
flag, then you'll need to use the absolute path to stylelint-config-recommended
in your config e.g.
{
"extends": "/absolute/path/to/stylelint-config-recommended"
}
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, change the property-no-unknown
rule to use its ignoreAtRules
option and add the unit-whitelist
rule:
{
"extends": "stylelint-config-recommended",
"rules": {
"block-no-empty": "tab",
"property-no-unknown": [ true, {
"ignoreProperties": [
"composes"
]
}],
"unit-whitelist": ["em", "rem", "s"]
}
}