Add husky for format and lint before commit
JoseRFelix opened this issue · 3 comments
JoseRFelix commented
Motivation
Since the contributor has to run yarn format
and yarn lint
before committing, this can result in someone committing without running both of these. We could add husky to handle this for us automatically and ensure commits are correct in terms of format and lint before code review in PR.
Basic example
Just by git commit -m "MESSAGE"
the code would be linted and formatted.
kripod commented
Thanks for the suggestion! Would you like to implement this, similar to how it's done in gatsby-starter-strict?
Please follow this, this, this and then this set of changes.
JoseRFelix commented
Sure! Thanks for the links.