Skip to content

Instantly share code, notes, and snippets.

View letehaha's full-sized avatar
🇺🇦

Dmytro Svyrydenko letehaha

🇺🇦
View GitHub Profile
@letehaha
letehaha / pre-commit-hook.sh
Last active October 21, 2020 09:22
Checks eslint errors/warnings in pre-commit hook. Disable commit if errors found
# !/bin/sh
files=$(git diff --cached --name-only --diff-filter=ACM | grep -E "(.js|.vue)$")
if [ "$files" == "" ]; then
exit 0
fi
lintfiles=""
errors="false"