# stylelint-config-standard

> Standard shareable config for Stylelint

Latest version **40.0.0** (published 2026-01-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install stylelint-config-standard
pnpm add stylelint-config-standard
yarn add stylelint-config-standard
bun add stylelint-config-standard
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 40.0.0 |
| Published | 2026-01-15 |
| First published | 2016-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=20.19.0 |
| Dependencies | 1 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1420 |
| Author | Stylelint |
| Maintainers | jeddy3, ybiquitous, romainmenke, ntwb |
| Keywords | stylelint, stylelint-config, standard |

## Links

- npm: https://www.npmjs.com/package/stylelint-config-standard
- Repository: https://github.com/stylelint/stylelint-config-standard
- Homepage: https://github.com/stylelint/stylelint-config-standard#readme
- Issues: https://github.com/stylelint/stylelint-config-standard/issues
- Funding: https://opencollective.com/stylelint
- npm.io page: https://npm.io/package/stylelint-config-standard

## Dependencies (1)

- [stylelint-config-recommended](https://npm.io/package/stylelint-config-recommended.md) ^18.0.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 40.0.0 (latest) — 2026-01-15
- 23.0.0-0 (next) — 2021-10-20
- 39.0.1 — 2025-10-06
- 39.0.0 — 2025-07-29
- 38.0.0 — 2025-04-06
- 37.0.0 — 2025-01-12
- 36.0.1 — 2024-06-21
- 36.0.0 — 2023-12-25
- 35.0.0 — 2023-12-08
- 34.0.0 — 2023-07-04
- 33.0.0 — 2023-04-16
- 32.0.0 — 2023-04-01
- 31.0.0 — 2023-03-16
- 30.0.1 — 2023-02-09
- 30.0.0 — 2023-02-09
- … 38 more at https://npm.io/package/stylelint-config-standard/versions

## README

# stylelint-config-standard

[![NPM version](https://img.shields.io/npm/v/stylelint-config-standard.svg)](https://www.npmjs.org/package/stylelint-config-standard) [![Build Status](https://github.com/stylelint/stylelint-config-standard/workflows/CI/badge.svg)](https://github.com/stylelint/stylelint-config-standard/actions)

> The standard shareable config for Stylelint.

It extends [`stylelint-config-recommended`](https://github.com/stylelint/stylelint-config-recommended) and turns on additional rules to enforce modern conventions found in the [CSS specifications](https://www.w3.org/Style/CSS/current-work) and within [Baseline Widely Available](https://web.dev/baseline).

To see the rules that this config uses, please read the [config itself](./index.js).

## Example

```css
@import url("foo.css");
@import url("bar.css");

@custom-media --foo (min-width: 30em);

/**
 * Multi-line comment
 */

:root {
  --brand-red: hsl(5deg 10% 40%);
}

/* Single-line comment */

.class-foo:not(a, div) {
  margin: 0;
  top: calc(100% - 2rem);
}

/* Flush single line comment */
@media (width >= 60em) {
  #id-bar {
    /* Flush to parent comment */
    --offset: 0px;

    color: #fff;
    font-family: Helvetica, "Arial Black", sans-serif;
    left: calc(var(--offset) + 50%);
  }

  @layer layer-foo.layer-bar {
    a::after {
      display: block;
      content: "→";
      background-image: url("x.svg");
    }
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  /* Flush nested single line comment */
  to {
    opacity: 1;
  }
}
```

_Note: the config is tested against this example, as such the example contains plenty of CSS syntax and features._

## Installation

```bash
npm install stylelint-config-standard --save-dev
```

## Usage

Set your Stylelint config to:

```json
{
  "extends": "stylelint-config-standard"
}
```

### Extending the config

Add a `"rules"` key to your config, then add your overrides and additions there.

You can turn off rules by setting its value to `null`. For example:

```json
{
  "extends": "stylelint-config-standard",
  "rules": {
    "selector-class-pattern": null
  }
}
```

Or lower the severity of a rule to a warning using the `severity` secondary option. For example:

```json
{
  "extends": "stylelint-config-standard",
  "rules": {
    "property-no-vendor-prefix": [
      true,
      {
        "severity": "warning"
      }
    ]
  }
}
```

Or to add a rule, For example, the `unit-allowed-list` one:

```json
{
  "extends": "stylelint-config-standard",
  "rules": {
    "unit-allowed-list": ["em", "rem", "s"]
  }
}
```

We recommend adding more of [Stylelint's rules](https://stylelint.io/user-guide/rules/) to your config as these rules need to be configured to suit your specific needs.

## [Changelog](CHANGELOG.md)

## [License](LICENSE)

---
_Source: https://npm.io/package/stylelint-config-standard · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
