Turns off all CSS and SCSS rules that are unnecessary or might conflict with Prettier (extends stylelint-config-prettier
). This lets you use your favorite shareable config without letting its stylistic choices get in the way when using Prettier.
Install stylelint-config-prettier-scss
:
npm install --save-dev stylelint-config-prettier-scss
Then, append stylelint-config-prettier-scss
to the extends
array in your .stylelintrc.*
file. Make sure to put it last, so it will override other configs.
{
"extends": [
// other configs ...
"stylelint-config-prettier-scss"
]
}
stylelint-config-prettier-scss
is shipped with a little CLI tool to help you check if your configuration contains any rules that are in conflict with Prettier.
In order to execute the CLI tool, first add a script for it to package.json
:
{
"scripts": {
"stylelint-scss-check": "stylelint-config-prettier-scss-check"
}
}
Then run npm run stylelint-scss-check
.
- Inspired by
eslint-config-prettier
. - CLI helper inspired by
tslint-config-prettier
. - Original disabled ruleset copied from
prettier-stylelint
.