stylelint-itcss
Version:
A stylelint plugin to help with itcss architecture
28 lines (19 loc) • 1.94 kB
Markdown
# stylelint-itcss
[](https://greenkeeper.io/)

[](https://travis-ci.org/KamiKillertO/stylelint-itcss)
## Installation and usage
```bash
npm install --save-dev stylelint stylelint-itcss
//
yarn add --dev stylelint stylelint-itcss
```
Create 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](http://stylelint.io/user-guide/) for the detailed info on using this linter.
## Rules
⚠️ All rules are "strict" be default, but all rules accept an option `ignoreLayers` to disable them for specific layer(s) (there's a detailed explanation for each layers in this [article](https://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528)).
| | Rule ID | Description |
| :---- | :----------------------------------------------------------------------------------------- | :---------------------------------------------------------------------- |
| | [no-at-important](./src/rules/no-at-important/README.md) | Disallow the use of `!important` |
| | [no-variable-declaration](./src/rules/no-variable-declaration/README.md) | Disallow the declaration of variables
| | [no-mixin-declaration](./src/rules/no-mixin-declaration/README.md) | Disallow the declaration of mixins (SASS only) |