From a318e7ecb38f1576d4cd893e9ad69a653edae376 Mon Sep 17 00:00:00 2001 From: typicode Date: Sun, 23 Sep 2018 10:25:01 +0200 Subject: [PATCH] docs: update documentation for husky 1.0 (#42) I've released husky `v1` yesterday and this PR updates docs to match the new way to add hooks :) --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3e7db72..3aeb819 100644 --- a/README.md +++ b/README.md @@ -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)