stylelint-config-good-scss

Stylelint config to write nice CSS.

Usage no npm install needed!

<script type="module">
  import stylelintConfigGoodScss from 'https://cdn.skypack.dev/stylelint-config-good-scss';
</script>

README

stylelint-config-good-scss

NPM

features

installation

npm install stylelint stylelint-config-good-scss --save-dev
yarn add --dev stylelint stylelint-config-good-scss 

Usage

You create stylelint.config.js in the project root. And a nice idea to write the task in package.json.

basic

stylelint.config.js

module.exports = {
  extends: ['stylelint-config-good-scss'],
  rules: {
    // your rule
  }
}

package.json

{
  "scripts": {
    "lintcss": "stylelint --fix ./**/*.vue ./**/*.scss"
  }
}

with nuxt and prettier

yarn add --dev stylelint stylelint-config-good-scss prettier-stylelint stylelint-webpack-plugin 

stylelint.config.js

module.exports = {
  extends: [
    'stylelint-config-good-scss',
    './node_modules/prettier-stylelint/config.js'
  ]
}

nuxt.config.js

module.exports = {
  build: {
    extend(config, ctx) {
      if (ctx.isDev && ctx.isClient) {
        config.plugins.push(
          new StylelintPlugin({
            files: ['**/*.vue']
          })
        )
      }
    }
  }
}