2.2.0 • Published 5 years ago

@hellroot/stylelint-config v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@hellroot/stylelint-config

npm dependencies status dev dependencies status code style: prettier

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'