5 ms·
You could use something like https://github.com/typicode/husky https://github.com/typicode/husky to prevent a push if the linter fails.
by beart 6y ago
You 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.