Skip to content

Commit

Permalink
add husky v5 example setup code for HUSKY_GIT_PARAMS (#2340)
Browse files Browse the repository at this point in the history
* add husky v5 example

Hi,
i just added the husky v5 example. 
https://typicode.github.io/husky/#/?id=husky_git_params-ie-commitlint-
cheers

* docs: linting

Co-authored-by: hannes <github@htmlcss.de>
  • Loading branch information
Manubi and escapedcat committed Dec 3, 2020
1 parent db0251c commit 763085c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Expand Up @@ -97,7 +97,9 @@ To lint commits before they are created you can use Husky's 'commit-msg' hook.

Install in your project `npm install husky --save-dev` or `yarn add -D husky`.

After that, you can create a `.huskyrc` file or add to your `package.json` the following code:
After that, you can create a `.huskyrc` file or add to your `package.json` the following code for

Husky V4:

```json
{
Expand All @@ -109,6 +111,16 @@ After that, you can create a `.huskyrc` file or add to your `package.json` the f
}
```

Husky V5

```
# .husky/pre-commit
# ...
npx --no-install commitlint --edit $1
# or
yarn commitlint --edit $1
```

**Detailed Setup instructions**

- [Local setup](https://conventional-changelog.github.io/commitlint/#/guides-local-setup) - Lint messages on commit with husky
Expand Down

0 comments on commit 763085c

Please sign in to comment.