README
← Back to Smoothie 🍹
Stylelint SCSS Config
Setup
- Install the package and its peer dependencies:
npm i --save-dev stylelint @smoothie-css/stylelint-config stylelint-scss @smoothie-css/stylelint-scss-config - Load the configuration object in your preferred format and add the following to the top of your file:
{ "extends": [ "@smoothie-css/stylelint-config", "@smoothie-css/stylelint-scss-config" ], ... } - Run the following command to lint your CSS with the Stylelint config:
You could also set this as an npmstylelint '**/*.scss' --syntax scssscriptwithin your project'spackage.json:
in this example, running via"scripts": { "lint:scss": "stylelint '**/*.scss'" }npm run lint:scss
Mixing Syntax
If you're using different syntax to write styles in your project you may have to separate out your configs.
See the @smoothie-css/stylelint-config README for more info.