Created by: alexandr-g
Hi folks! I’ve upgraded from husky
v4 to v5, and updated lint-staged
. Please have a look
Let me know if there any comments regarding the pre-commit config.
If you’re curious about what’s new in Husky 5 you can find more details here - https://dev.to/typicode/what-s-new-in-husky-5-32g5
TLDR; faster and smaller, zero dependencies
Some benefits of using the newer husky
version
- Zero dependencies
- Lightweight (
~0.02MB
vs~1MB
for husky 4) - Fast (
~0.01s
vs~0.5s
for husky 4)
How to test:
- Modify a file
- Stash it and commit
- Make sure the
pre-commit
hook runs as before
Let's say a file that you modified, was formatted by prettier --write
, meaning lint-staged
was triggered correctly.
References/Resources: https://typicode.github.io/husky/#/ https://github.com/typicode/husky-4-to-5 https://github.com/typicode/husky/issues/618#issuecomment-737736354