Add pretty-quick pre-commit docs (#3675)
parent
5e2e7a2881
commit
eb1096d4af
|
@ -30,29 +30,25 @@ and add this config to your `package.json`:
|
||||||
|
|
||||||
See https://github.com/okonet/lint-staged#configuration for more details about how you can configure lint-staged.
|
See https://github.com/okonet/lint-staged#configuration for more details about how you can configure lint-staged.
|
||||||
|
|
||||||
## Option 2. [pre-commit](https://github.com/observing/pre-commit) (JS version)
|
## Option 2. [pretty-quick](https://github.com/azz/pretty-quick)
|
||||||
|
|
||||||
Install the package:
|
Install it along with [husky](https://github.com/typicode/husky):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
yarn add pre-commit --dev
|
yarn add pretty-quick husky --dev
|
||||||
```
|
```
|
||||||
|
|
||||||
and add this config to your `package.json`:
|
and add this config to your `package.json`:
|
||||||
|
|
||||||
<!-- prettier-ignore -->
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prettier": "prettier \"*/**/*.js\" --ignore-path ./.prettierignore --write && git add . && git status"
|
"precommit": "pretty-quick --staged"
|
||||||
},
|
}
|
||||||
"pre-commit": [
|
|
||||||
"prettier"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Find more info from [here](https://github.com/observing/pre-commit).
|
Find more info from [here](https://github.com/azz/pretty-quick).
|
||||||
|
|
||||||
## Option 3. [pre-commit](https://github.com/pre-commit/pre-commit) (Python version)
|
## Option 3. [pre-commit](https://github.com/pre-commit/pre-commit) (Python version)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue