Run eslint --fix on last X commits before git push

Viewed 22

I'm using lint-staged to run some tasks before each commit. However, sometimes I just want to commit changes without actually fixing every warning. However, this poses a problem. As I committed files with mistakes, they won't be checked on the next commit.

Hence, it would be nice to have some sort of a pre-push hook that will run eslint --fix on files that are committed since the last push. Is it possible to implement? What would be the appropriate workflow in my case to avoid pushing files with mistakes?

0 Answers
Related