@wide/stylelint-config
v3.1.0
Published
The recommended stylelint config for scss files
Downloads
10
Keywords
Readme
Stylelint config
The recommended stylelint config for scss files.
It turns on all the possible errors rules within stylelint.
SCSS Property: Use
stylelint-scss
plugin andstylelint-config-standard-scss
config.Property Ordering: Extends
stylelint-config-property-sort-order-smacss
. Refer to here for the comprehensive list of property orders.
Installation
npm install stylelint stylelint-scss stylelint-config-property-sort-order-smacss stylelint-order @wide/stylelint-config --save-dev
Usage
If you've installed @wide/stylelint-config
locally within your project, just set your stylelint
config to:
{
"extends": "@wide/stylelint-config"
}
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-allowed-list
rule:
{
"extends": "@wide/stylelint-config",
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["extends"]
}
],
"block-no-empty": null,
"unit-allowed-list": ["em", "rem", "s"]
}
}
Stylelint CLI
Use Stylelint CLI to check the supported files. Drop this line into your package.json and customize it as your needs:
{
"scripts": {
"lint:scss": "stylelint src/**/*.scss --formatter verbose"
}
}
Thanks
- stylelint
- stylelint-config-property-sort-order-smacss
- stylelint-config-standard-scss
- stylelint-order
- stylelint-scss
Authors
- Aymeric Assier - github.com/myeti
- Julien Martins Da Costa - github.com/jdacosta
Contributors
- Sébastien Robillard - github.com/robiseb
License
This project is licensed under the MIT License - see the licence file for details