https://github.com/wide/stylelint-config
The recommended stylelint config for scss files.
https://github.com/wide/stylelint-config
linter modulus
Last synced: 4 months ago
JSON representation
The recommended stylelint config for scss files.
- Host: GitHub
- URL: https://github.com/wide/stylelint-config
- Owner: wide
- License: mit
- Created: 2020-06-01T13:22:19.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2022-11-17T10:32:49.000Z (over 3 years ago)
- Last Synced: 2025-09-28T09:22:01.515Z (8 months ago)
- Topics: linter, modulus
- Language: JavaScript
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stylelint config
> The recommended stylelint config for scss files.
It turns on all the [_possible errors_](https://stylelint.io/user-guide/rules#possible-errors) rules within stylelint.
- **SCSS Property**: Use [`stylelint-scss`](https://github.com/kristerkari/stylelint-scss) plugin and [`stylelint-config-standard-scss`](https://github.com/stylelint-scss/stylelint-config-standard-scss) config.
- **Property Ordering**: Extends `stylelint-config-property-sort-order-smacss`. Refer to [here](https://github.com/cahamilton/css-property-sort-order-smacss/blob/master/index.js) for the comprehensive list of property orders.
## Installation
```bash
npm install stylelint stylelint-scss stylelint-config-property-sort-order-smacss stylelint-order @wide/stylelint-config --save-dev
```
## Usage
If you've installed `@wide/stylelint-config` locally within your project, just set your `stylelint` config to:
```json
{
"extends": "@wide/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-allowed-list` rule:
```json
{
"extends": "@wide/stylelint-config",
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["extends"]
}
],
"block-no-empty": null,
"unit-allowed-list": ["em", "rem", "s"]
}
}
```
### Stylelint CLI
Use Stylelint CLI to check the supported files. Drop this line into your package.json and customize it as your needs:
```json
{
"scripts": {
"lint:scss": "stylelint src/**/*.scss --formatter verbose"
}
}
```
## Thanks
- [stylelint](https://github.com/stylelint/stylelint)
- [stylelint-config-property-sort-order-smacss](https://github.com/cahamilton/stylelint-config-property-sort-order-smacss)
- [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss)
- [stylelint-order](https://github.com/hudochenkov/stylelint-order)
- [stylelint-scss](https://github.com/kristerkari/stylelint-scss)
## Authors
- **Aymeric Assier** - [github.com/myeti](https://github.com/myeti)
- **Julien Martins Da Costa** - [github.com/jdacosta](https://github.com/jdacosta)
### Contributors
- **Sébastien Robillard** - [github.com/robiseb](https://github.com/robiseb)
## License
This project is licensed under the MIT License - see the [licence](licence) file for details