diff --git a/docs/guides-local-setup.md b/docs/guides-local-setup.md index ddc66d197c..4bbe0db084 100644 --- a/docs/guides-local-setup.md +++ b/docs/guides-local-setup.md @@ -31,19 +31,27 @@ npm install husky --save-dev # or yarn add husky --dev -# Active hooks +# Activate hooks npx husky install # or yarn husky install +``` + +### Add hook -# Add hook +```sh cat < .husky/commit-msg #!/bin/sh . "\$(dirname "\$0")/_/husky.sh" npx --no -- commitlint --edit "\${1}" EEE +``` + +Make hook executable +```sh +chmod a+x .husky/commit-msg ``` **Please note that currently @commitlint/cli doesn't support yarn v2 Plug'n'Play (using yarn v2 with `nodeLinker: node-modules` in your .yarnrc.yml file may work sometimes)**\