nrwl / precise-commits

:sparkles: Painlessly apply Prettier by only formatting lines you have modified anyway!
MIT License
471 stars 20 forks source link

Please archive this repo if it is no longer maintained #58

Open solimant opened 4 years ago

djcsdy commented 2 years ago

For anyone who is still interested (@mannyhagman?), I am maintaining a fork at @softwareventures/precise-commits.

Compared to this project, it fixes a bunch of bugs, and adds support for Windows and CRLF line breaks.

I've been using it for a couple of months on my projects and it works well. There are still some pathological cases where it does something weird, but I've never seen it break my code. If you use it on a project where the existing indentation is consistently different to the indentation you configure for prettier, then you are going to have a bad time, but otherwise it is suitable for general use.

You can install it from npm @softwareventures/precise-commits.