Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

stylelint-config-recommended

stylelint20.9mMIT16.0.0

Recommended shareable config for Stylelint

stylelint, 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

changelog

Changelog

16.0.0

  • Removed: stylelint less than 16.16.0 from peer dependencies.
  • Added: syntax-string-no-invalid rule.

15.0.0

This release replaces four rules with broader and more capable ones that validate CSS against syntaxes defined by W3C: at-rule-descriptor-value-no-unknown, at-rule-prelude-no-invalid and declaration-property-value-no-unknown.

  • Removed: stylelint less than 16.13.0 from peer dependencies.
  • Removed: color-no-invalid-hex rule.
  • Removed: function-linear-gradient-no-nonstandard-direction rule.
  • Removed: function-no-unknown rule.
  • Removed: unit-no-unknown rule.
  • Changed: string-no-newline rule option to { ignore: ['at-rule-preludes', 'declaration-values'] }].
  • Added: at-rule-descriptor-no-unknown rule.
  • Added: at-rule-descriptor-value-no-unknown rule.
  • Added: at-rule-no-deprecated rule.
  • Added: at-rule-prelude-no-invalid rule.
  • Added: declaration-property-value-keyword-no-deprecated rule.
  • Added: declaration-property-value-no-unknown rule.
  • Added: media-feature-name-value-no-unknown rule.

14.0.1

  • Fixed: missing funding field in package.json.

14.0.0

  • Removed: stylelint less than 16.0.0 from peer dependencies.
  • Removed: Node.js less than 18.12.0 support.

13.0.0

  • Removed: stylelint less than 15.10.0 from peer dependencies.
  • Added: media-query-no-invalid rule.

12.0.0

  • Removed: stylelint less than 15.5.0 from peer dependencies.
  • Changed: declaration-block-no-duplicate-properties option to ignore: ['consecutive-duplicates-with-different-syntaxes'].

11.0.0

  • Removed: stylelint less than 15.3.0 from peer dependencies.
  • Added: selector-anb-no-unmatchable rule.

10.0.1

  • Removed: deprecated no-extra-semicolons rule.

10.0.0

  • Removed: stylelint less than 15.0.0 from peer dependencies.

9.0.0

  • Removed: stylelint less than 14.10.0 from peer dependencies.
  • Added: annotation-no-unknown rule.

8.0.0

  • Removed: stylelint less than 14.8.0 from peer dependencies.
  • Added: keyframe-block-no-duplicate-selectors rule.

7.0.0

  • Removed: stylelint less than 14.4.0 from peer dependencies.
  • Added: function-no-unknown rule.

6.0.0

  • Removed: stylelint less than 14.0.0 from peer dependencies.
  • Removed: function-calc-no-invalid rule.
  • Added: custom-property-no-missing-var-function rule.

5.0.0

  • Removed: stylelint less than 13.13.0 from peer dependencies.
  • Added: no-invalid-position-at-import-rule rule.
  • Added: no-irregular-whitespace rule.
  • Fixed: selector-type-no-unknown for custom elements.

4.0.0

  • Removed: stylelint less than 13.12.0 from peer dependencies.
  • Added: declaration-block-no-duplicate-custom-properties rule.
  • Added: named-grid-areas-no-invalid rule.

3.0.0

  • Removed: stylelint < 10.1.0 from peer dependencies. `stylelint@10.1.0+` is required now.
  • Added: function-calc-no-invalid rule.

2.2.0

  • Added: stylelint@10 to peer dependency range.

2.1.0

  • Added: stylelint@9 to peer dependency range.

2.0.1

  • Removed: declaration-block-no-redundant-longhand-properties rule. This time it is actually removed.

2.0.0

  • Removed: declaration-block-no-redundant-longhand-properties rule.
  • Removed: shorthand-property-no-redundant-values rule.
  • Added: font-family-no-missing-generic-family-keyword rule.
  • Added: no-descending-specificity rule.
  • Added: no-duplicate-at-import-rules rule.
  • Added: no-duplicate-selectors rule.

1.0.0

  • Use stylelint@8.

0.1.0

  • Initial release