Running Prettier for specific Git branch

I’m working on a project in my own git branch. At the end of my working day I want to do one thing – run Prettier so my code is nicely formatted before I submit the PR for code review. Of course I know about the VSCode Prettier extension but right now my editor is kinda broken and I don’t want to mess with it. I’m still on my branch and I run Prettier from the terminal. All good but the amount of changes that happened is so big that my 50+ loc updates are like a needle in a haystack. It is like that because apparently there are already malformatted files in the project. It is definitely not possible to understand what I did because of so much noise. So … I want to run Prettier but only on the files that I touched in that particular branch.


This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog

I'm working on a project in my own git branch. At the end of my working day I want to do one thing - run Prettier so my code is nicely formatted before I submit the PR for code review. Of course I know about the VSCode Prettier extension but right now my editor is kinda broken and I don't want to mess with it. I'm still on my branch and I run Prettier from the terminal. All good but the amount of changes that happened is so big that my 50+ loc updates are like a needle in a haystack. It is like that because apparently there are already malformatted files in the project. It is definitely not possible to understand what I did because of so much noise. So ... I want to run Prettier but only on the files that I touched in that particular branch.


This content originally appeared on Krasimir Tsonev - blog and was authored by Krasimir Tsonev - blog


Print Share Comment Cite Upload Translate Updates
APA

Krasimir Tsonev - blog | Sciencx (2021-02-07T21:52:55+00:00) Running Prettier for specific Git branch. Retrieved from https://www.scien.cx/2021/02/07/running-prettier-for-specific-git-branch/

MLA
" » Running Prettier for specific Git branch." Krasimir Tsonev - blog | Sciencx - Sunday February 7, 2021, https://www.scien.cx/2021/02/07/running-prettier-for-specific-git-branch/
HARVARD
Krasimir Tsonev - blog | Sciencx Sunday February 7, 2021 » Running Prettier for specific Git branch., viewed ,<https://www.scien.cx/2021/02/07/running-prettier-for-specific-git-branch/>
VANCOUVER
Krasimir Tsonev - blog | Sciencx - » Running Prettier for specific Git branch. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/02/07/running-prettier-for-specific-git-branch/
CHICAGO
" » Running Prettier for specific Git branch." Krasimir Tsonev - blog | Sciencx - Accessed . https://www.scien.cx/2021/02/07/running-prettier-for-specific-git-branch/
IEEE
" » Running Prettier for specific Git branch." Krasimir Tsonev - blog | Sciencx [Online]. Available: https://www.scien.cx/2021/02/07/running-prettier-for-specific-git-branch/. [Accessed: ]
rf:citation
» Running Prettier for specific Git branch | Krasimir Tsonev - blog | Sciencx | https://www.scien.cx/2021/02/07/running-prettier-for-specific-git-branch/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.