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.
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.