Last active
January 14, 2020 17:28
-
-
Save puttputt/8bc8ffd961b2546747edcec8d569fa55 to your computer and use it in GitHub Desktop.
Prettier Autoformat Git History
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## From Marcus Motill https://medium.com/millennial-falcon-technology/reformatting-your-code-base-using-prettier-or-eslint-without-destroying-git-history-35052f3d853e | |
git filter-branch --tree-filter '\ | |
prettier --no-config --single-quote --tab-width=4\ | |
--print-width=128 --arrow-parens=always --trailing-comma=all\ | |
--write "**/**.ts" "**/**.html" || \ | |
echo “Error formatting, possibly invalid JS“' -- --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment