https://github.com/prettier/stylelint-config-prettier
Turns off all rules that are unnecessary or might conflict with prettier.
https://github.com/prettier/stylelint-config-prettier
Last synced: 9 months ago
JSON representation
Turns off all rules that are unnecessary or might conflict with prettier.
- Host: GitHub
- URL: https://github.com/prettier/stylelint-config-prettier
- Owner: prettier
- License: mit
- Archived: true
- Created: 2017-10-10T17:02:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-18T08:51:59.000Z (about 3 years ago)
- Last Synced: 2024-10-29T22:37:35.341Z (over 1 year ago)
- Language: JavaScript
- Size: 404 KB
- Stars: 372
- Watchers: 12
- Forks: 23
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# stylelint-config-prettier
> **Note**
> As of Stylelint v15 [all style-related rules have been deprecated](https://stylelint.io/migration-guide/to-15#deprecated-stylistic-rules). If you are using v15 or higher and are not making use of these deprecated rules, [this plugin is no longer necessary](https://stylelint.io/migration-guide/to-15#:~:text=Additionally%2C%20you%20may%20no%20longer%20need%20to%20extend%20Prettier%27s%20Stylelint%20config).
[![NPM version][npm-img]][npm-url] [![Downloads][downloads-img]][npm-url]
Turns off all rules that are unnecessary or might conflict with Prettier. This lets you use your favorite shareable config without letting its stylistic choices get in the way when using Prettier.
## Installation
Install `stylelint-config-prettier`:
```
npm install --save-dev stylelint-config-prettier
```
Then, append `stylelint-config-prettier` to the [`extends` array](https://stylelint.io/user-guide/configuration/#extends) in your `.stylelintrc.*` file. Make sure to put it **last,** so it will override other configs.
```js
{
"extends": [
// other configs ...
"stylelint-config-prettier"
]
}
```
## CLI helper tool
`stylelint-config-prettier` is shipped with a little CLI tool to help you check if your configuration contains any rules that are in conflict with Prettier.
In order to execute the CLI tool, first add a script for it to `package.json`:
```json
{
"scripts": {
"stylelint-check": "stylelint-config-prettier-check"
}
}
```
Then run `npm run stylelint-check`.
## Attribution
- Inspired by [`eslint-config-prettier`](https://npm.im/eslint-config-prettier).
- CLI helper inspired by [`tslint-config-prettier`](https://github.com/alexjoverm/tslint-config-prettier).
- Original disabled ruleset copied from [`prettier-stylelint`](https://npm.im/prettier-stylelint).
----
[MIT](license)
[downloads-img]: https://img.shields.io/npm/dm/stylelint-config-prettier.svg?style=flat-square
[npm-img]: https://img.shields.io/npm/v/stylelint-config-prettier.svg?style=flat-square
[npm-url]: https://npmjs.org/package/stylelint-config-prettier