Skip to content

Commit

Permalink
chore: make husky work on macOS
Browse files Browse the repository at this point in the history
commitlint has some issue working with globally installed npm packages.
See conventional-changelog/commitlint#613 for
more details.

The workaround is to not set the commitlint config in its config file
but instead pass the full path to the module in the command line of
commitlint.
  • Loading branch information
abdes committed Mar 8, 2022
1 parent eaaec75 commit 6867e8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
npx --no-install commitlint -x $(npm root -g)/@commitlint/config-conventional --edit $1

0 comments on commit 6867e8f

Please sign in to comment.