Skip to content

add husky v5 example setup code for HUSKY_GIT_PARAMS #2340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
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