typicode / husky

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

docs: confusion on v9 usage with husky init #1535

Open michealroberts opened 2 weeks ago

michealroberts commented 2 weeks 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 weeks 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.