typicode / husky-4-to-8

Quickly migrate your hooks from husky v4 to husky@latest
MIT License
131 stars 20 forks source link

Ignores HUSKY_GIT_PARAMS #4

Closed Snaptags closed 3 years ago

Snaptags commented 3 years ago

Thanks for this migration tool, has been really helpful migrating all my hooks!

It did ignore HUSKY_GIT_PARAMS though and put the command unmodified into .husky/pre-commit

Was an easy fix using the migration FAQ, but the tool should at least warn about it.

BTW: in my case I had to replace

commitlint -E HUSKY_GIT_PARAMS

by

commitlint --edit $1
typicode commented 3 years ago

Thanks for the feedback. A warning should be shown (maybe it wasn't apparent enough though) https://github.com/typicode/husky-4-to-5/blob/main/src/config.ts#L59

Snaptags commented 3 years ago

Just ran it again and can confirm the warning to show. Must have missed it due to my terminal color theme :-) Sorry.

And for the record: I actually changed the call to

./node_modules/.bin/commitlint …

(commitlint being a devDependency in my project)