5 ms·
I wish this would also prevent creating PRs that don’t pass the lint rules. It reduces churn on PR reviewers.
by iampims 6y ago
I wish this would also prevent creating PRs that don’t pass the lint rules.
It reduces churn on PR reviewers.
- beart 6y agoYou could use something like https://github.com/typicode/husky https://github.com/typicode/husky to prevent a push if the linter fails.
- iampims 6y agoMy (small) issue with git hooks, is that they need be installed everywhere for them to be 100% enforced. Works fine for small teams, but doesn’t scale that well beyond that.
- azemetre 6y agoYou make the hooks as part of the CI process. That's where something like husky can come in. We do this on my team. If you're trying to enforce something locally you can definitely enforce it on CI automatically. Once people realized their PRs were failing due to linting issues they started checking them locally as well.
- sorahn 6y agoThis is what we use. Husky runs linters on pre-commit to ensure everything is linted going into the repo.
- ccktlmazeltov 6y agothat's what github actions are for.
- ufo 6y agoWe added linter checks to our Travis CI config. It helps flag the PRs that don't pass the linter. The problem I've seen is that the error message isn't obvious. It just says that the "build failed", which sounds more like a compilation error than a lint problem.