Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dkrnl/stylelint-max-root-rules
Limit the count of root rules.
https://github.com/dkrnl/stylelint-max-root-rules
Last synced: 6 days ago
JSON representation
Limit the count of root rules.
- Host: GitHub
- URL: https://github.com/dkrnl/stylelint-max-root-rules
- Owner: dkrnl
- License: mit
- Created: 2020-07-07T08:58:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-07T09:06:38.000Z (over 4 years ago)
- Last Synced: 2024-10-15T09:08:23.704Z (about 1 month ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stylelint-max-root-rules
Limit the count of root rules.For example, the following patterns are considered violations:
```scss
.foo { }.foo-bar { }
```The following patterns are not considered violations:
```scss
.foo {
&-bar { }
}
```## Installation
1. If you haven't, install [stylelint]:
```
npm install stylelint --save-dev
```2. Install `stylelint-max-root-rules`:
```
npm install stylelint-max-root-rules --save-dev
```## Usage
Add `stylelint-max-root-rules` to your stylelint config `plugins` array, then add rules you need to the rules list. All rules from stylelint-max-root-rules need to be namespaced with `pitcher`.
```json
{
"plugins": [
"stylelint-max-root-rules"
],
"rules": {
"pitcher/max-root-rules": 1
}
}
```