@smoothie-css/stylelint-scss-config

Smoothie's recommended stylelint-scss configuration

Usage no npm install needed!

<script type="module">
  import smoothieCssStylelintScssConfig from 'https://cdn.skypack.dev/@smoothie-css/stylelint-scss-config';
</script>

README

Back to Smoothie 🍹


Stylelint SCSS Config

Setup

  1. Install the package and its peer dependencies:
    npm i --save-dev stylelint @smoothie-css/stylelint-config stylelint-scss @smoothie-css/stylelint-scss-config
    
  2. 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"
      ],
      ...
    }
    
  3. Run the following command to lint your CSS with the Stylelint config:
    stylelint '**/*.scss' --syntax scss
    
    You could also set this as an npm script within your project's package.json:
    "scripts": {
      "lint:scss": "stylelint '**/*.scss'"
    }
    
    in this example, running via 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.