Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stylelint/stylelint-config-recommended
The recommended shareable config for Stylelint
https://github.com/stylelint/stylelint-config-recommended
stylelint
Last synced: 3 days ago
JSON representation
The recommended shareable config for Stylelint
- Host: GitHub
- URL: https://github.com/stylelint/stylelint-config-recommended
- Owner: stylelint
- License: mit
- Created: 2017-07-01T12:10:00.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2024-11-03T13:51:27.000Z (10 days ago)
- Last Synced: 2024-11-05T10:12:12.258Z (8 days ago)
- Topics: stylelint
- Language: JavaScript
- Homepage:
- Size: 2.32 MB
- Stars: 383
- Watchers: 9
- Forks: 28
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# stylelint-config-recommended
[![NPM version](https://img.shields.io/npm/v/stylelint-config-recommended.svg)](https://www.npmjs.org/package/stylelint-config-recommended) [![Build Status](https://github.com/stylelint/stylelint-config-recommended/workflows/CI/badge.svg)](https://github.com/stylelint/stylelint-config-recommended/actions)
> The recommended shareable config for Stylelint.
It turns on most of the Stylelint rules that help you [_avoid errors_](https://stylelint.io/user-guide/rules/#avoid-errors).
You can use this as a foundation for your own config, but we suggest most people use our [standard config](https://www.npmjs.com/package/stylelint-config-standard) instead which extends this config and adds a few more rules to enforce common conventions.
## Installation
```bash
npm install stylelint-config-recommended --save-dev
```## Usage
Set your `stylelint` config to:
```json
{
"extends": "stylelint-config-recommended"
}
```### Extending the config
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": "stylelint-config-recommended",
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": ["extends"]
}
],
"block-no-empty": null,
"unit-allowed-list": ["em", "rem", "s"]
}
}
```## [Changelog](CHANGELOG.md)
## [License](LICENSE)