This is a stylelint plugin that provides several stylelint rules that are not available out of the box.
npm i @dczajkowski/stylelint-rules --save-dev # yarn add -D @dczajkowski/stylelint-rulesIn your .stylelintrc config:
{
"plugins": ["@dczajkowski/stylelint-rules"],
"rules": {
}
}| auto-fixable? | Rule Name | Description |
|---|---|---|
| ❌ | declaration-property-unit-whitelist | Require specific properties to have only given units |
| ❌ | color-no-non-variables | Disallow usage of color literals (allows only variables) |
| ❌ | no-floats-with-unit | Disallow usage of floats with certain units |
| ❌ | variables-in-files | Allow for variables to be declared only in specified files |
| ❌ | color-variables-in-files | Allow for variables containing color values to be declared only in specified files |
This plugin is an open-sourced software licensed under the MIT license.