Skip to content

Commit

Permalink
Add stylelint-order to peerDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hudochenkov committed Aug 13, 2022
1 parent 12cf113 commit 72db1f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
14 changes: 2 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ Available configs:

* `stylelint-config-hudochenkov` — default config which includes rules from Stylelint core only.
* `stylelint-config-hudochenkov/order` — config for order of content within declaration blocks and properties order. Uses [`stylelint-order`].
* `stylelint-config-hudochenkov/full` — combines all configs together and includes:
* `stylelint-config-hudochenkov`
* `stylelint-config-hudochenkov/order`
* `stylelint-config-hudochenkov/full` — combines all configs above.

## Installation

Expand All @@ -18,14 +16,6 @@ Install config:
npm install --save-dev stylelint-config-hudochenkov
```

If you're using `stylelint-config-hudochenkov/order` or `stylelint-config-hudochenkov/full`, install additional plugin:

```
npm install --save-dev stylelint-order
```

**Note:** Additional plugins not listed as `peerDependencies`, because not every project need them. npm will shows warning after each `npm install` if not all `peerDependencies` are installed, even if they are not used.

## Usage

Add chosen config to the [`extends` section](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) of your Stylelint configuration:
Expand All @@ -42,7 +32,7 @@ Add chosen config to the [`extends` section](https://eslint.org/docs/user-guide/
}
```

Recommended to run Stylelint with [`--max-warnings` flag](https://stylelint.io/user-guide/usage/options#maxwarnings), because most of the rules has [`warning` severity](https://stylelint.io/user-guide/configure#severity):
Recommended to run Stylelint with [`--max-warnings` flag](https://stylelint.io/user-guide/usage/options#maxwarnings), because many rules has [`warning` severity](https://stylelint.io/user-guide/configure#severity):

```
stylelint "**/*.css" --max-warnings 0
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
},
"prettier": "prettier-config-hudochenkov",
"peerDependencies": {
"stylelint": "^14.10.0"
"stylelint": "^14.10.0",
"stylelint-order": "^5.0.0"
},
"devDependencies": {
"eslint": "^7.3.0",
Expand Down

0 comments on commit 72db1f4

Please sign in to comment.