Add pretty-quick pre-commit docs (#3675)

master
Lucas Azzola 2018-01-09 02:19:53 +11:00 committed by GitHub
parent 5e2e7a2881
commit eb1096d4af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 10 deletions

View File

@ -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.
## 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
yarn add pre-commit --dev
yarn add pretty-quick husky --dev
```
and add this config to your `package.json`:
<!-- prettier-ignore -->
```json
{
"scripts": {
"prettier": "prettier \"*/**/*.js\" --ignore-path ./.prettierignore --write && git add . && git status"
},
"pre-commit": [
"prettier"
]
"precommit": "pretty-quick --staged"
}
}
```
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)