Skip to content

stylelint/stylelint-config-recommended

Folders and files

NameName
Last commit message
Last commit date
Dec 2, 2024
Feb 5, 2024
Aug 2, 2024
Apr 24, 2021
Jul 1, 2017
Apr 1, 2020
Apr 1, 2020
Jan 12, 2025
Dec 11, 2020
Dec 5, 2022
Nov 5, 2024
Jan 12, 2025
Feb 1, 2025
Feb 1, 2025

Repository files navigation

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"]
  }
}