Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonik/stylelint-config
A shareable stylelint config for CSS used at Tonik
https://github.com/tonik/stylelint-config
Last synced: about 2 months ago
JSON representation
A shareable stylelint config for CSS used at Tonik
- Host: GitHub
- URL: https://github.com/tonik/stylelint-config
- Owner: tonik
- License: mit
- Created: 2018-03-12T11:12:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-15T13:52:21.000Z (over 5 years ago)
- Last Synced: 2024-10-29T16:59:54.524Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stylelint-config
> A shareable stylelint config for CSS used at Tonik
## Installation
```bash
npm install @tonik/stylelint-config --save-dev
```## Usage
If you've installed `@tonik/stylelint-config` locally within your project, just set your `stylelint` config to:
```json
{
"extends": "@tonik/stylelint-config"
}
```If you've globally installed `stylelint-config` using the `-g` flag, then you'll need to use the absolute path to `stylelint-config` in your config e.g.
```json
{
"extends": "/absolute/path/to/@tonik/stylelint-config"
}
```### Extending the config
Simply add a `"rules"` key to your config, then add your overrides and additions there.
For example, to change the `at-rule-no-unknown` rule to use its `ignoreAtRules` option, turn off the `block-no-empty` rule, and add the `unit-whitelist` rule:
```json
{
"extends": "@tonik/stylelint-config",
"rules": {
"at-rule-no-unknown": [true, {
"ignoreAtRules": [
"extends"
]
}],
"block-no-empty": null,
"unit-whitelist": ["em", "rem", "s"]
}
}
```## License
Licensed under the [MIT license](http://opensource.org/licenses/MIT).