sudo-suhas / lint-staged-multi-pkg

Example repo to demonstrate use of `lint-staged` with multi-pkg projects
MIT License
188 stars 19 forks source link

Add Lerna filter option to limit precommit execution to only changed packages #26

Closed ThomasLamb closed 4 years ago

ThomasLamb commented 4 years ago

Resolves #4

Added the --since HEAD lerna filter to husky pre-commit on the root project.

Files changed:

For me --since HEAD is an adequate solution to #4, and so have tagged this with Resolves #4 but I'm open to changing that. Like maybe I should add something to the README.md mentioning @jogold other precommit.js option https://github.com/sudo-suhas/lint-staged-multi-pkg/issues/4#issuecomment-482492913???

Thanks for providing this sample repository, it's been very helpful! ❤️

sudo-suhas commented 4 years ago

The readme changes are good but we could mention that the option does not considers staged files. It will run if there are any files modified.

sudo-suhas commented 4 years ago

Thanks @ThomasLamb!