lint-prepush icon indicating copy to clipboard operation
lint-prepush copied to clipboard

Allow for ignoring files like lint-staged

Open saiichihashimoto opened this issue 4 years ago • 1 comments

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.

saiichihashimoto avatar Aug 19 '20 18:08 saiichihashimoto

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.

TxHawks avatar Aug 14 '22 15:08 TxHawks