Add pre-commit metadata directly to prettier (#2414)

master
Anthony Sottile 2017-07-06 11:13:52 -07:00 committed by Christopher Chedeau
parent 82b80b3c79
commit 19cd7d3227
2 changed files with 9 additions and 5 deletions

5
.pre-commit-hooks.yaml Normal file
View File

@ -0,0 +1,5 @@
- id: prettier
name: prettier
entry: prettier --write
language: node
types: [javascript]

View File

@ -318,19 +318,18 @@ See https://github.com/okonet/lint-staged#configuration for more details about h
##### Option 2. [pre-commit](https://github.com/pre-commit/pre-commit)
Copy the following config in your pre-commit config yaml file:
Copy the following config into your `.pre-commit-config.yaml` file:
```yaml
- repo: https://github.com/awebdeveloper/pre-commit-prettier
- repo: https://github.com/prettier/prettier
sha: '' # Use the sha or tag you want to point at
hooks:
- id: prettier
additional_dependencies: ['prettier@1.4.2']
```
```
Find more info from [here](https://github.com/awebdeveloper/pre-commit-prettier).
Find more info from [here](http://pre-commit.com).
##### Option 3. bash script