# stylelint-find-new-rules

> Find stylelint rules that you don't have in your config

Latest version **6.1.0** (published 2026-07-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install stylelint-find-new-rules
pnpm add stylelint-find-new-rules
yarn add stylelint-find-new-rules
bun add stylelint-find-new-rules
```

Provides the command `stylelint-find-new-rules`.

## Health

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

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.1.0 |
| Published | 2026-07-02 |
| First published | 2018-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20.19.0 |
| Dependencies | 4 |
| Unpacked size | 17.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Donovan Lambert |
| Maintainers | donov4n |

## Links

- npm: https://www.npmjs.com/package/stylelint-find-new-rules
- Repository: https://github.com/Donov4n/stylelint-find-new-rules
- Issues: https://github.com/Donov4n/stylelint-find-new-rules/issues
- npm.io page: https://npm.io/package/stylelint-find-new-rules

## Dependencies (4)

- [yargs](https://npm.io/package/yargs.md) ~18.0.0
- [read-pkg](https://npm.io/package/read-pkg.md) ^10.1.0
- [columnify](https://npm.io/package/columnify.md) ~1.6.0
- [picocolors](https://npm.io/package/picocolors.md) ^1.1.1

## Recent versions

- 6.1.0 (latest) — 2026-07-02
- 6.0.0 — 2026-01-26
- 5.0.1 — 2025-12-18
- 5.0.0 — 2024-01-17
- 4.1.2 — 2023-09-02
- 4.1.1 — 2023-08-17
- 4.1.0 — 2023-03-18
- 4.0.0 — 2022-03-12
- 3.0.4 — 2021-11-07
- 3.0.3 — 2021-11-07
- 3.0.2 — 2021-08-14
- 3.0.1 — 2020-10-03
- 3.0.0 — 2020-09-04
- 2.0.0 — 2020-05-16
- 1.2.0 — 2019-11-30
- … 4 more at https://npm.io/package/stylelint-find-new-rules/versions

## README

# stylelint-find-new-rules

> Find [stylelint](https://github.com/stylelint/stylelint) rules that are not configured in your stylelint config.  

> Use this for your own [Stylelint](https://github.com/stylelint/stylelint) 
> shareable configuration to list current configured rules,  
> all-available rules unused rules, and invalid / deprecated rules.

## Acknowledgment

This module is an extended version of [stylelint-find-rules](https://github.com/alexilyaev/stylelint-find-rules), created by Alex Ilyaev.

## Installation

Install as a dev dependency of your project:

```bash
# - Yarn
yarn add stylelint-find-new-rules --dev

# - NPM
npm install --save-dev stylelint-find-new-rules
```

## Usage

> It is expected to be used as local utility, as it needs `stylelint` and the `stylelint-plugins` being referred 
> by the `stylelint-config` file, to be installed. Using it as a global utility, will error out, if `stylelint` 
> and the `stylelint-plugins` being referred by the `stylelint-config` file, are not installed globally.

The intended usage is as an npm script:

```js
{
  ...
  "scripts": {
    "stylelint-find-rules": "stylelint-find-new-rules [options] <file>"
  }
  ...
}
```

__Note:__ If the `<file>` argument is not passed, this module will use the same resolution mechanism 
as Stylelint ([cosmiconfig](https://github.com/davidtheclark/cosmiconfig)) to find your config data.

Then run it with:

```bash
# - Yarn
yarn stylelint-find-rules

# - NPM
npm run --silent stylelint-find-rules
```

## Options

```
-u, --unused      Find available rules that are not configured.         [default: true]
                  To disable, set to false or use --no-u
                  
-d, --deprecated  Find deprecated configured rules.                     [default: true]
                  To disable, set to false or use --no-d
                  
-i, --invalid     Find configured rules that are no longer available.   [default: true]
                  To disable, set to false or use --no-i
                  
-c, --current     Find all currently configured rules.
-a, --available   Find all available stylelint rules.
```

## API Usage

```js
import stylelintRules from 'stylelint-find-new-rules';

const rules = await stylelintRules('./my-config-file.js');

// `rules` format:
// {
//     used       : [[RULE], [RULE], ...],
//     all        : [[RULE], [RULE], ...],
//     unused     : [[RULE], [RULE], ...],
//     deprecated : [[RULE], [RULE], ...],
//     invalid    : [[RULE], [RULE], ...]
// }
// 
// `[RULE]` format:
// {
//     name         : '[Rule name]',
//     url          : '[URL of the rule's documentation if available or `null`]',
//     isDeprecated : [boolean]
// }
```

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