Skip to content

Commit

Permalink
docs: update documentation for husky 1.0 (#42)
Browse files Browse the repository at this point in the history
I've released husky `v1` yesterday and this PR updates docs to match the new way to add hooks :)
  • Loading branch information
typicode authored and azz committed Sep 23, 2018
1 parent 230d03f commit a318e7e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Expand Up @@ -60,10 +60,14 @@ You can run `pretty-quick` as a pre-commit hook using [`husky`](https://github.c
yarn add --dev husky
```

In `package.json`'s `"scripts"` section, add:
In `package.json`, add:

```
"precommit": "pretty-quick --staged"
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
```

![demo](./img/precommit.gif)
Expand Down

0 comments on commit a318e7e

Please sign in to comment.