Skip to content

Commit

Permalink
fix: Move .husky to correct directory
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio committed Mar 8, 2024
1 parent ade19be commit c9f01d9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions webapp/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx|json|yml|md|html|css)$' || true; })

if [ -z "$FILES" ]; then
exit 0
fi

TS_FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g' | { grep -E '(js|ts|tsx)$' || true; })

if [[ ! -z "$TS_FILES" ]];then
echo "Running lints"
npm run pre-commit:fix:code -- $TS_FILES
fi

0 comments on commit c9f01d9

Please sign in to comment.