Skip to content

Instantly share code, notes, and snippets.

View deepank411's full-sized avatar
🎯
Focusing

Deepank Agarwal deepank411

🎯
Focusing
View GitHub Profile
@linhmtran168
linhmtran168 / pre-commit-eslint
Last active February 6, 2024 12:28
Pre-commit hook to check for Javascript using ESLint
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true