# stylelint-codeguide

> A collection of codeguide-specific rules for Stylelint

Latest version **2.0.0** (published 2023-12-17) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install stylelint-codeguide
pnpm add stylelint-codeguide
yarn add stylelint-codeguide
bun add stylelint-codeguide
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-12-17 |
| First published | 2023-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^18.12 \|\| >=20.9 |
| Dependencies | 8 |
| Unpacked size | 298.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 107 |
| Author | Sergey Artemov |
| Maintainers | firefoxic |
| Keywords | codeguide, css, csslint, lint, linter, stylelint, stylelint-plugin |

## Links

- npm: https://www.npmjs.com/package/stylelint-codeguide
- Repository: https://github.com/firefoxic/stylelint-codeguide
- Issues: https://github.com/firefoxic/stylelint-codeguide/issues
- npm.io page: https://npm.io/package/stylelint-codeguide

## Dependencies (8)

- [stylelint](https://npm.io/package/stylelint.md) ^16.0.2
- [style-search](https://npm.io/package/style-search.md) ^0.1.0
- [is-plain-object](https://npm.io/package/is-plain-object.md) ^5.0.0
- [postcss-value-parser](https://npm.io/package/postcss-value-parser.md) ^4.2.0
- [@csstools/css-tokenizer](https://npm.io/package/@csstools/css-tokenizer.md) ^2.2.1
- [postcss-selector-parser](https://npm.io/package/postcss-selector-parser.md) ^6.0.13
- [@csstools/css-parser-algorithms](https://npm.io/package/@csstools/css-parser-algorithms.md) ^2.3.2
- [@csstools/media-query-list-parser](https://npm.io/package/@csstools/media-query-list-parser.md) ^2.1.5

## 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

- 2.0.0 (latest) — 2023-12-17
- 2.0.0-1 (next) — 2023-12-16
- 2.0.0-0 — 2023-12-16
- 1.0.2 — 2023-12-12
- 1.0.1 — 2023-12-10
- 1.0.0 — 2023-12-08
- 1.0.0-alpha.2 — 2023-12-08
- 1.0.0-alpha.1 — 2023-11-16
- 1.0.0-alpha.0 — 2023-11-15
- 0.3.2 — 2023-10-19
- 0.3.1 — 2023-10-13
- 0.3.0 — 2023-10-13
- 0.2.2 — 2023-09-14
- 0.2.1 — 2023-07-08
- 0.2.0 — 2023-07-01
- … 6 more at https://npm.io/package/stylelint-codeguide/versions

## README

# stylelint-codeguide

[![License: MIT][license-image]][license-url]
[![Test Status][test-image]][test-url]
[![NPM version][npm-image]][npm-url]
[![Vulnerabilities count][vulnerabilities-image]][vulnerabilities-url]

---

> [!WARNING]  
> ⚠️ This package has been deprecated in favor of [`@stylistic/stylelint-plugin`](https://www.npmjs.com/package/@stylistic/stylelint-plugin).

---

An updatable collection of stylistic rules for [Stylelint](https://github.com/stylelint/stylelint) (in plugin form).

## About and purpose

[Stylelint has removed 76 rules](https://stylelint.io/migration-guide/to-16#removed-deprecated-stylistic-rules) that enforce stylistic conventions.

stylelint-codeguide returns these rules to keep styles consistent with your codeguide. In addition, new rules may be added in the future.

The plugin follows [Stylelint's guidelines](https://stylelint.io/developer-guide/rules).

## Installation and usage

Add `stylelint-codeguide` and `stylelint` itself to your project:

```shell
npm install --save-dev stylelint stylelint-codeguide
```

Create the `.stylelintrc` config file (or open the existing one), add `stylelint-codeguide` to the plugins array and the rules you need to the rules list. [All rules from stylelint-codeguide](https://github.com/firefoxic/stylelint-codeguide/blob/main/docs/user-guide/rules.md) need to be namespaced with `codeguide/`:

```json
{
	"plugins": [
		"stylelint-codeguide"
	],
	"rules": {
		// syntax rules from stylelint:
		"color-function-notation": "modern",
		"selector-max-compound-selectors": 2,
		// ...
		// stylistic rules from stylelint-codeguide:
		"codeguide/color-hex-case": "lower",
		"codeguide/number-leading-zero": "always",
		"codeguide/unit-case": "lower"
	}
}
```

Please refer to [Stylelint docs](https://stylelint.io/user-guide/get-started) for detailed info on using this linter.

## Important documents

- [Changelog](https://github.com/firefoxic/stylelint-codeguide/blob/main/CHANGELOG.md)
- [Contributing](https://github.com/firefoxic/stylelint-codeguide/blob/main/CONTRIBUTING.md)
- [License](./LICENSE)

[test-url]: https://github.com/firefoxic/stylelint-codeguide/actions?workflow=Test
[test-image]: https://github.com/firefoxic/stylelint-codeguide/actions/workflows/test.yaml/badge.svg?branch=main

[npm-url]: https://www.npmjs.com/package/stylelint-codeguide
[npm-image]: https://img.shields.io/npm/v/stylelint-codeguide?logo=npm&logoColor=fff

[license-url]: https://github.com/firefoxic/stylelint-codeguide/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/License-MIT-limegreen.svg

[vulnerabilities-url]: https://snyk.io/test/github/firefoxic/stylelint-codeguide
[vulnerabilities-image]: https://snyk.io/test/github/firefoxic/stylelint-codeguide/badge.svg

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