npm install @qvant/stylelint-config stylelint --save-dev
# or with yarn:
yarn add @qvant/stylelint-config stylelint --dev
We provide a config for both CSS and SCSS. You can choose which one you would like to extend in your configuration:
// .stylelintrc
// base rules
{
"extends": "@qvant/stylelint-config/css/base"
}
// or base rules + prettier reset
{
"extends": "@qvant/stylelint-config/css/prettier"
}
// .stylelintrc
// base rules + scss rules
{
"extends": "@qvant/stylelint-config/scss/base"
}
// or base rules + scss rules + prettier reset
{
"extends": "@qvant/stylelint-config/scss/prettier"
}
{
// ...
"scripts": {
// ...
"lint:style": "stylelint '**/*.{css,scss,vue}'",
"lint:style:fix": "stylelint --fix '**/*.{css,scss,vue}'"
}
// ...
}