nrwl / precise-commits

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

precise-commit on save (vscode)? #30

Open bjornicus opened 5 years ago

bjornicus commented 5 years ago

I really like your end goal vision of "All developers on our team develop using consistent, automated formatting as they write their code" and then having the pre-commit hook to ensure formatting only on changed code. Installing precise-commits as a pre-commit hook gets part way there, but I'd really like to run the same thing on save in my IDE (which is currently VSCode). The vscode-prettier extension works good for format on save, but it formats the whole document; what I really want is to run precise-commit on save instead. Instructions on how to set that up, or a precise-commits vs code extension would be a really useful addition.