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 June 20, 2024 23:01
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