@zilahir/stylelint-config
v3.1.2
Published
My Stylelint configuration
Downloads
12
Maintainers
Readme
stylelint-config
This is my personal configuration for Stylelint. It includes rules for CSS and SCSS and enforces a reasonable property order.
Overview
The rules are based on the sass-guidelines and rational-order configurations and include a couple of custom additions and deletions.
The configuration is compatible with Prettier (if it's configured to use tabs for indentation).
Usage
- Install the required packages:
npm i --save-dev stylelint
npm i --save-dev @zilahir/stylelint-config
- Create a
.stylelintrc.yml
file with the following content in your project root:
extends: "@ziilahir/stylelint-config"
- Add the linting script(s) you need to your
package.json
file:
{
"scripts": {
"lint:css": "stylelint --fix src/**/*.css",
"lint:scss": "stylelint --fix --syntax scss src/**/*.scss"
}
}