typicode / husky

Git hooks made easy 🐶 woof!
https://typicode.github.io/husky
MIT License
32.62k stars 1.03k forks source link

docs: confusion on v9 usage with husky init #1535

Open michealroberts opened 1 week ago

michealroberts commented 1 week ago

A simple one, but a lot of what is in husky v9 has thrown me ... I'm coming from v8 but some things aren't clear.

When running npx husky init, it seems like we get a .husky/_/** with everything ignored in git history.

I have moved a precommit hook outside to the root of .husky, but the script isn't executed ... I move it inside, and it is...

Yet all the documentation states otherwise.

I'm left scratching my head ... what do we do after npx husky init ... ?

Also, subsequent usage of npx husky init overwrites what is already in that directory, so ... I guess we no longer use the install hook.

Just left very confused from referencing v8, and the docs.

AllanChain commented 2 days ago

Have you checked out the release note? https://github.com/typicode/husky/releases/tag/v9.0.1 I think the migration guide there is clear.