diff --git a/README.md b/README.md index 61f11dd344..ba335bce23 100644 --- a/README.md +++ b/README.md @@ -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 { @@ -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