npm install --save-dev stylelint stylelint-itcss
//
yarn add --dev stylelint stylelint-itcssCreate the .stylelintrc.json config file (or open the existing one), add stylelint-itcss to the plugins array and the rules you need to the rules list. All rules from stylelint-itcss need to be namespaced with itcss.
Please refer to stylelint docs for the detailed info on using this linter.
ignoreLayers to disable them for specific layer(s) (there's a detailed explanation for each layers in this article).
| Rule ID | Description | |
|---|---|---|
| no-at-important | Disallow the use of !important |
|
| no-variable-declaration | Disallow the declaration of variables | |
| no-mixin-declaration | Disallow the declaration of mixins (SASS only) |