diff --git a/docs/precommit.md b/docs/precommit.md index d755ce658..7bfa3c39d 100644 --- a/docs/precommit.md +++ b/docs/precommit.md @@ -119,11 +119,11 @@ Alternately you can save this script as `.git/hooks/pre-commit` and give it exec ```sh #!/bin/sh -FILES=$(git diff --cached --name-only --diff-filter=ACMR "*.js" "*.jsx" | sed 's| |\\ |g') +FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g') [ -z "$FILES" ] && exit 0 # Prettify all selected files -echo "$FILES" | xargs ./node_modules/.bin/prettier --write +echo "$FILES" | xargs ./node_modules/.bin/prettier --ignore-unknown --write # Add back the modified/prettified files to staging echo "$FILES" | xargs git add