README
@zestia/stylelint-config
This package provides linting rules for CSS and SCSS.
The rules are based on community standards, with a few extra ones specific to Zestia.
Installation
npm install --save-dev @zestia/stylelint-config
Setup
Create the following file
.stylelintrc.js
module.exports = require('@zestia/stylelint-config');
Add the following to
scripts
inpackage.json
"lint:css": "stylelint '**/*.{css,scss}'"
Running
npm run lint:css
Notes
stylelint-config-standard
for a set of community lint rules around best practices and catching errors in cssstylelint-config-standard-scss
as above, but for scssstylelint-scss
for scss specific stylelint rulesstylelint-prettier
adds prettier as a stylelint rulestylelint-config-prettier
for turning off stylelint rules that could conflict with prettierstylelint-selector-bem-pattern
for a bem-like naming conventionstylelint-declaration-strict-value
to enforce variables (e.g. for a consistent colour palette etc)stylelint-order
to enforce the order of certain rules