lint-prepush
lint-prepush copied to clipboard
Allow for ignoring files like lint-staged
https://github.com/okonet/lint-staged#ignoring-files
This is more of a concern for lint-prepush than lint-staged, since there's more likelyhood that you'll want to run your tests, build, etc for your whole codebase on push rather than commit.
This would be very helpful not only for filtering but also, for example, when running tests and collecting coverage with and collectCoverageFrom
configured.
With Jest, you'd often want to have both --findRelatedTests
and --collectCoverageOnlyFrom
in order run test not only on changed files but also on related ones, and to satisfy the test coverage threshold. However, it is impossible without a callback that is passed files
as an argument, since both --findRelatedTests
and --collectCoverageOnlyFrom
require a list of files to be passed to them.