Skip to content

Commit

Permalink
docs: update husky configuration example to match v1.x (#566)
Browse files Browse the repository at this point in the history
* update husky post-commit configuration

* show both husky v0.x and v1.x configuration
  • Loading branch information
levy9527 authored and okonet committed Jun 5, 2019
1 parent 315890a commit 738af13
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions README.md
Expand Up @@ -345,15 +345,29 @@ When using the IDE's GUI to commit changes with the `precommit` hook, you might

Until the issue is resolved in the IDE, you can use the following config to work around it:

```js
husky v1.x
```json
{
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"post-commit": "git update-index --again"
}
}
}
```

husky v0.x
```json
{
"scripts": {
"precommit": "lint-staged",
"postcommit": "git update-index --again"
"precommit": "lint-staged",
"postcommit": "git update-index --again"
}
}
```


_Thanks to [this comment](https://youtrack.jetbrains.com/issue/IDEA-135454#comment=27-2710654) for the fix!_

### How to use `lint-staged` in a multi package monorepo?
Expand Down

0 comments on commit 738af13

Please sign in to comment.