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
APA
Krasimir Tsonev - blog | Sciencx (2023-03-26T04:50:42+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 2023-03-26T04:50:42+00:00,<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 2023-03-26T04:50:42+00:00]. 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 2023-03-26T04:50:42+00:00. 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: 2023-03-26T04:50:42+00:00]
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/ | 2023-03-26T04:50:42+00:00
https://github.com/addpipe/simple-recorderjs-demo