Stylelint configuration inspired by SMACSS
npm install @touch4it/stylelint-config-guidelinesStylelint configuration inspired by SMACSS
``console`
npm install --save @touch4it/stylelint-config-guidelines
Set your stylelint config to:
`json`
{
"extends": "@touch4it/stylelint-config-guidelines"
}
Simply add a "rules" key to your config and add your overrides there.
For example, to change the indentation to tabs and turn off the number-leading-zero rule:
`json``
{
"extends": "@touch4it/stylelint-config-guidelines",
"rules": {
"indentation": "tab",
"number-leading-zero": null
}
}
Important: When migrating from version 4 to version 5, please note that Stylelint v15+ no longer includes formatting rules. If you need code formatting, you'll need to use Prettier alongside Stylelint.
| @touch4it/stylelint-config-guidelines | Stylelint | Prettier |
| ------------------------------------- | --------- | -------- |
| v3.x | 14.x | - |
| v4.x | 16.x | - |
| v5.x | 16.x | 3.x |