Last active
September 22, 2020 20:41
-
-
Save patmigliaccio/55d2a1456a778a0076aff91957bcb89b to your computer and use it in GitHub Desktop.
updates entire git repo history with prettier based on .prettierrc
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
#!/bin/sh | |
# Reference: 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 --config ../../.prettierrc --write "src/{app,environments,assets}/**/*{.ts,.js,.json,.css,.scss}" || echo "formatting error"' -- --all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment