stylelint-config 6.0.0-0
Install from the command line:
Learn more about npm packages
$ npm install @zestia/stylelint-config@6.0.0-0
Install via package.json:
"@zestia/stylelint-config": "6.0.0-0"
About this version
This package provides linting rules for CSS and SCSS.
The rules are based on community standards, with a few extra ones specific to Zestia.
npm install --save-dev @zestia/stylelint-config
Add the following to ~/.npmrc
to pull @zestia scoped packages from Github instead of NPM.
@zestia:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<YOUR_GH_TOKEN>
-
Create the following file
.stylelintrc.js
module.exports = { extends: '@zestia/stylelint-config' };
-
Add the following to
scripts
inpackage.json
"lint:css": "stylelint '**/*.{css,scss}'"
npm run lint:css
-
stylelint-config-standard-scss
for a set of community lint rules around best practices and catching errors in scss -
stylelint-scss
for scss specific stylelint rules -
stylelint-selector-bem-pattern
for a bem-like naming convention -
stylelint-declaration-strict-value
to enforce variables (e.g. for a consistent colour palette etc) -
stylelint-order
to enforce the order of certain rules