Last active
January 11, 2024 08:48
-
-
Save davidtingsu/58eb10450d04528623d2fd40fc4ad8fc to your computer and use it in GitHub Desktop.
fix flles in git diff feature branch against main jsx|.tsx|.js$|.ts$ with prettier
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
# run prettier against the changed files between your branch and main | |
# tested on macosx | |
git diff --name-status `git merge-base HEAD main` HEAD | awk '{print $2}' | grep -E '.jsx|.tsx|.js$|.ts$' | xargs npx prettier --write |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment