We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 112cd52 commit 27a7970Copy full SHA for 27a7970
.husky/pre-push
@@ -9,12 +9,14 @@ if echo "$stdin" | grep -q "^(delete)"; then
9
exit 0
10
fi
11
12
-files_to_check=$(git diff --cached "$(git merge-base main HEAD)" --name-only --diff-filter=d)
13
-if [[ -n $files_to_check ]]; then
+raw_files_to_check="$(git diff main...HEAD --name-only --diff-filter=d)"
+if [[ -n "$raw_files_to_check" ]]; then
14
echo "*** Checking for lint violations in changed files ***************"
15
echo
16
17
- yarn prettier --check --ignore-unknown $files_to_check || exit $?
+ echo "$raw_files_to_check" | while IFS='\n' read -r line; do
18
+ printf '%s\0' "$line"
19
+ done | xargs -0 yarn prettier --check --ignore-unknown || exit $?
20
21
22
0 commit comments