@hellroot/stylelint-config
v2.2.0
Published
Stylelint config rule set
Downloads
5
Maintainers
Readme
@hellroot/stylelint-config
A StyleLint config compatible with Prettier.
Installation
npm install --save-dev prettier stylelint @hellroot/stylelint-config
Configuration
Extend your StyleLint config:
.stylelintrc
{
"extends": ["@hellroot/stylelint-config"]
}
Configure EditorConfig:
.editorconfig
root = true
[*]
charset = utf-8
indent_size = 2
end_of_line = lf
indent_style = space
max_line_length = 100
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
Configure Prettier:
.prettierrc.json
{
"singleQuote": true,
"trailingComma": "none"
}
Fix errors
Most of errors can be fixed automatically:
npx stylelint --fix '**/*.css'
Migration
Format all your styles:
npx prettier --write '**/*.css'