Closed mattcollier closed 4 years ago
I've tried to add a package.json "lint" script when missing. Having that script everywhere is a start. There are npm and git hooks that could run that, but sometimes that's heavyweight and perhaps tricky to override when appropriate (WIP commits, aggressive wildcards linting non-tracked files, etc). There are some tools that help. Like just linting changed files in precommit hooks. For things that use travis we can add "npm run lint" as a test. github actions is another route which would also cover the many non-travis repos we have. Splitting between travis and gh actions is probably a pain.
We've got this covered now!
We recently accepted a PR from a helpful non-DB contributor which introduced a handful of linting errors. We have no way to know if devs are linting their own code.
Is github actions a good route to go for failing commits that introduce linting errors? Are there better solutions?
https://www.reactjunkie.com/github-actions-eslint-typescript