# @wordpress/stylelint-config

> stylelint config for WordPress development.

Latest version **27.1.0** (published 2026-11-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wordpress/stylelint-config
pnpm add @wordpress/stylelint-config
yarn add @wordpress/stylelint-config
bun add @wordpress/stylelint-config
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 27.1.0 |
| Published | 2026-11-04 |
| First published | 2021-01-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=22.13.0 |
| Dependencies | 4 |
| Unpacked size | 32.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11776 |
| Author | The WordPress Contributors |
| Maintainers | garypendergast, adamsilverstein, gziolo, ntwb, riad, noisysocks, kadamwhite, gutenbergplugin, jorgefilipecosta, ellatrix, iandunn206, whyisjake, ockham, sirreal, nosolosw, wpisabel, ntsekouras, nerrad, desrosj, talldanwp, peterwilsoncc, ryanwelcher, mamaduka, aduth, johnbillion |
| Keywords | stylelint, stylelint-config, stylelint-config-wordpress, wordpress |

## Links

- npm: https://www.npmjs.com/package/@wordpress/stylelint-config
- Repository: https://github.com/WordPress/gutenberg
- Homepage: https://github.com/WordPress/gutenberg/tree/HEAD/packages/stylelint-config/README.md
- Issues: https://github.com/WordPress/gutenberg/issues
- npm.io page: https://npm.io/package/@wordpress/stylelint-config

## Dependencies (4)

- [@stylistic/stylelint-plugin](https://npm.io/package/@stylistic/stylelint-plugin.md) ^5.2.1
- [@wordpress/theme-build-tools](https://npm.io/package/@wordpress/theme-build-tools.md) ^1.0.0
- [stylelint-config-recommended](https://npm.io/package/stylelint-config-recommended.md) ^18.0.0
- [stylelint-config-recommended-scss](https://npm.io/package/stylelint-config-recommended-scss.md) ^17.0.1

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 27.1.0 (latest) — 2026-11-04
- 26.0.1-next.v.202609171837.0 (next) — 2026-09-17
- 23.32.1 (wp-7.0) — 2026-06-30
- 23.25.1 (wp-6.9) — 2025-10-28
- 23.11.1 (wp-6.8) — 2025-03-10
- 23.0.1 (wp-6.7) — 2024-09-19
- 22.0.1 (wp-6.6) — 2024-06-11
- 21.34.1 (wp-6.5) — 2024-02-20
- 21.25.13 (wp-6.4) — 2023-11-13
- 21.18.2 (wp-6.3) — 2023-10-12
- 21.9.2 (wp-6.2) — 2023-10-12
- 21.0.1 (wp-6.1) — 2022-09-20
- 20.0.3 (wp-6.0) — 2022-04-19
- 19.1.0 (wp-5.9) — 2021-07-21
- 19.0.5 (wp-5.8) — 2021-05-31
- … 194 more at https://npm.io/package/@wordpress/stylelint-config/versions

## README

# stylelint config

[stylelint](https://stylelint.io/) configuration rules to ensure your CSS is compliant with the [WordPress CSS Coding Standards](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/).

## Installation

```bash
$ npm install @wordpress/stylelint-config --save-dev
```

**Note**: This package requires Node.js version with long-term support status (check [Active LTS or Maintenance LTS releases](https://nodejs.org/en/about/previous-releases)). It is not compatible with older versions.

## Usage

If you've installed `@wordpress/stylelint-config` locally within your project, just set your `stylelint` config to:

```json
{
	"extends": "@wordpress/stylelint-config"
}
```

If you've globally installed `@wordpress/stylelint-config` using the `-g` flag, then you'll need to use the absolute path to `@wordpress/stylelint-config` in your config:

```json
{
	"extends": "/absolute/path/to/@wordpress/stylelint-config"
}
```

## Presets

In addition to the default preset, there is also a SCSS preset and 2 stylistic variant presets.

### SCSS

This preset extends both `@wordpress/stylelint-config` and [`stylelint-config-recommended-scss`](https://github.com/kristerkari/stylelint-config-recommended-scss).

```json
{
	"extends": [ "@wordpress/stylelint-config/scss" ]
}
```

### Stylistic

This preset extends `@wordpress/stylelint-config` and adds stylistic rules such as `indentation`.

```json
{
	"extends": [ "@wordpress/stylelint-config/stylistic" ]
}
```

### SCSS Stylistic

This preset extends`@wordpress/stylelint-config`, `@wordpress/stylelint-config/stylistic` and `@wordpress/stylelint-config/scss`, and adapts some stylistic rules for SCSS.

```json
{
	"extends": [ "@wordpress/stylelint-config/scss-stylistic" ]
}
```

## Extending the config

Simply add a `"rules"` key to your config and add your overrides there.

For example, to change the `indentation` to four spaces and turn off the `number-leading-zero` rule:

```json
{
	"extends": "@wordpress/stylelint-config/stylistic",
	"rules": {
		"@stylistic/indentation": 4,
		"@stylistic/number-leading-zero": null
	}
}
```

### `custom-property-pattern`

The preset disallows `--_gcd-*` and `--_wp-*` custom properties. These are private and will break at any time.

Stylelint does not merge `custom-property-pattern` values. If your project already sets this rule, the preset ban is replaced — include `(?!_(?:gcd|wp)-)` in your pattern if you want to keep it, for example:

```json
{
	"extends": "@wordpress/stylelint-config",
	"rules": {
		"custom-property-pattern": "^(?!_(?:gcd|wp)-)my-prefix-.+"
	}
}
```

## Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main [contributor guide](https://github.com/WordPress/gutenberg/tree/HEAD/CONTRIBUTING.md).

<br /><br /><p align="center"><img src="https://s.w.org/style/images/codeispoetry.png?1" alt="Code is Poetry." /></p>

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