diff --git a/docs/guides-local-setup.md b/docs/guides-local-setup.md index 169f13fafd..ddc66d197c 100644 --- a/docs/guides-local-setup.md +++ b/docs/guides-local-setup.md @@ -37,9 +37,13 @@ npx husky install yarn husky install # Add hook -npx husky add .husky/commit-msg 'npx --no -- commitlint --edit $1' -# or -yarn husky add .husky/commit-msg 'yarn commitlint --edit $1' +cat < .husky/commit-msg +#!/bin/sh +. "\$(dirname "\$0")/_/husky.sh" + +npx --no -- commitlint --edit "\${1}" +EEE + ``` **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)**\