Last active
May 3, 2022 17:39
-
-
Save goququ/8a0bbec9a95507c19be944efb80f70f7 to your computer and use it in GitHub Desktop.
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
# Format staged js/ts files before commit | |
npx prettier --write $(git ls-files --modified -u | awk '{ print $4 }' | grep -E -i '.(t|j)sx?') | |
# variant 2 | |
prettier --write $(git diff --name-only --cached | grep -E -i '.(t|j)sx?') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment