The standard shareable config for Stylelint
The standard shareable config for Stylelint
The standard shareable config for Stylelint.
It extends stylelint-config-recommended and turns on additional rules to enforce modern conventions found in the CSS specifications and within Baseline Widely Available.
To see the rules that this config uses, please read the config itself.
…Note: the config is tested against this example, as such the example contains plenty of modern CSS syntax and features.
npm install stylelint-config-standard --save-devSet your Stylelint config to:
{
"extends": "stylelint-config-standard"
}Add a "rules" key to your config, then add your overrides and additions there.
You can turn off rules by setting its value to null. For example:
{
"extends": "stylelint-config-standard",
"rules": {
"selector-class-pattern": null
}
}Or lower the severity of a rule to a warning using the severity secondary option. For example:
{
"extends": "stylelint-config-standard",
"rules": {
"property-no-vendor-prefix": [
true,
{
"severity": "warning"
}
]
}
}Or to add a rule, For example, the unit-allowed-list one:
{
"extends": "stylelint-config-standard",
"rules": {
"unit-allowed-list": ["em", "rem", "s"]
}
}We recommend adding more of Stylelint's rules to your config as these rules need to be configured to suit your specific needs.
No open issues yet, or sync has not completed.