stylelint-config-recommended

Recommended shareable config for Stylelint

MIT 25 个版本
安装
npm install stylelint-config-recommended
yarn add stylelint-config-recommended
pnpm add stylelint-config-recommended
bun add stylelint-config-recommended
README

stylelint-config-recommended

NPM version Build Status

The recommended shareable config for Stylelint.

It turns on most of the Stylelint rules that help you avoid errors.

You can use this as a foundation for your own config, but we suggest most people use our standard config instead which extends this config and adds a few more rules to enforce common conventions.

Installation

npm install stylelint-config-recommended --save-dev

Usage

Set your stylelint config to:

{
  "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:

{
  "extends": "stylelint-config-recommended",
  "rules": {
    "at-rule-no-unknown": [
      true,
      {
        "ignoreAtRules": ["extends"]
      }
    ],
    "block-no-empty": null,
    "unit-allowed-list": ["em", "rem", "s"]
  }
}

Changelog

License

版本列表
18.0.0 2026-01-15
17.0.0 2025-07-29
16.0.0 2025-04-06
15.0.0 2025-01-12
14.0.1 2024-06-21
14.0.0 2023-12-08
13.0.0 2023-07-04
12.0.0 2023-04-16
11.0.0 2023-03-16
10.0.1 2023-02-09
10.0.0 2023-02-09
9.0.0 2022-08-11
8.0.0 2022-06-08
7.0.0 2022-02-08
6.0.0-0 2021-10-20
6.0.0 2021-10-21
5.0.0 2021-04-24
4.0.0 2021-03-06
3.0.0 2019-09-15
2.2.0 2019-04-13
2.1.0 2018-02-18
2.0.1 2017-12-19
2.0.0 2017-11-26
1.0.0 2017-07-16
0.1.0 2017-07-01