mirror of
https://gitlab.com/mickie1/share-freedom-extension
synced 2024-12-28 23:30:25 +01:00
15 lines
341 B
Bash
Executable File
15 lines
341 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR "*.js" "*.jsx" "*.ts" "*.tsx" | sed 's| |\\ |g')
|
|
|
|
[[ -z "$CHANGED_FILES" ]] && exit 0
|
|
|
|
echo "Running prettier 🚀🚀"
|
|
echo "$CHANGED_FILES" | xargs ./node_modules/.bin/prettier --write
|
|
|
|
echo "$CHANGED_FILES" | xargs git add
|
|
echo "Done prettier ✨✨"
|
|
|
|
exit 0
|
|
|