@wezom/stylelint-config

Stylelint shareable config

Usage no npm install needed!

<script type="module">
  import wezomStylelintConfig from 'https://cdn.skypack.dev/@wezom/stylelint-config';
</script>

README

@wezom/stylelint-config

Stylelint shareable config

Rules

See full list of extends with code examples

Usage

We strongly recommend using this config with Prettier together.
See description.

Install

npm i -D stylelint @wezom/stylelint-config stylelint-config-prettier

Setup linter
.stylelintrc.json

{
    "extends": ["@wezom/stylelint-config", "stylelint-config-prettier"]
}

Add npm scripts
package.json

{
    "scripts": {
        "test": "npm run prettier && npm run stylelint",
        "stylelint": "stylelint src/**/*.css",
        "stylelint:autofix": "npm run stylelint -- --fix",
        "prettier": "prettier src/ --check",
        "prettier:autofix": "npm run prettier -- --write"
    }
}

Test your files

npm run test