Configuration for Stylelint
- Provide Errors and Warnings
- 2 spaces for indentation (warning)
- 90 symbols per line (warning)
- Unix linebreaks (warning)
Install stylelint
and @dopustim/stylelint-config
packages via NPM:
npm install -D stylelint @dopustim/stylelint-config
Extend this config in your .stylelintrc.json
:
{
"extends": "@dopustim/stylelint-config"
}
Or use your package.json
:
"stylelint": {
"extends": "@dopustim/stylelint-config"
}
You can also reassign any rule for your needs:
{
"extends": "@dopustim/stylelint-config",
"rules": {
"max-line-length": [ 100, { "severity": "warning" } ]
}
}
Visit the Stylelint website to find out all rules and descriptions.