Open artem-zakharchenko opened 5 years ago
I agree the CI should fail fast, or somehow signalize that the lint is failing fast, otherwise one waits 15 minutes until realizing a commit needs to be fixed or a semicolon is missing.
If the hooks are shared using husky, I'd be cautious about pre-commit
with eslint
as that could break my workflow when prototyping or committing work in progress often, but I'd be fine with having it in pre-push
for sure.
Currently that can be achieved locally using a following workaround:
$ echo "npm run lint" > .git/hooks/pre-push
$ chmod +x .git/hooks/pre-push
I'll try to use that for a start before we make permanent change and have husky as an additional dependency.
@artem-zakharchenko Can we close this now? Is everything in place?
I propose to add various linting tools we use as a part of Git workflow.
Why:
How:
husky
forpre-commit
hook to performeslint
.lint-staged
to eslint and prettify code.husky
forpre-push
hook to usecommitlint
to validate commits.