Excellent write up about Husky and how to leverage git hooks! My teams follow this implementation on projects with the exception of the stricter steps like linting & test validation.
Instead, we leverage a slightly different strategy:
No code is directly committed to our master/main branch on a project
Developers work in feature branches and have their code accepted through pull requests
Pull requests must pass CI/CD steps around linting and test validation before they can be merged.
We found this more flexible for our use case and ensures that all pushed commits still have prettier's formatting applied. Devs can push WIP code as a "save state" to their feature branches without always having to have their solutions fully complete.
Yes, going with CI pipelines is indeed a valid option, I also mentioned it in the conclusion, but if you cannot set them up (cost, private repos, internal policies) then git hooks might help :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Excellent write up about Husky and how to leverage git hooks! My teams follow this implementation on projects with the exception of the stricter steps like linting & test validation.
Instead, we leverage a slightly different strategy:
We found this more flexible for our use case and ensures that all pushed commits still have prettier's formatting applied. Devs can push WIP code as a "save state" to their feature branches without always having to have their solutions fully complete.
Hey Joe, thanks for the comment!
Yes, going with CI pipelines is indeed a valid option, I also mentioned it in the conclusion, but if you cannot set them up (cost, private repos, internal policies) then git hooks might help :)