rocketchat2matrix/.husky/pre-commit
Henrik Hüttemann e241fa7491
Add lint-staged
This prevents unstaged files and unstaged changes to staged files from being checked.
2023-05-23 13:40:40 +02:00

27 lines
671 B
Bash
Executable File

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
# THIS PART is generated by pre-commit: https://pre-commit.com
# start templated
INSTALL_PYTHON=/usr/bin/python
ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=pre-commit)
# end templated
HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")
if [ -x "$INSTALL_PYTHON" ]; then
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
elif command -v pre-commit > /dev/null; then
exec pre-commit "${ARGS[@]}"
else
echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2
exit 1
fi
### End of pre-commit py part
npx lint-staged
npm test
npm run compile