Skip to content

Instantly share code, notes, and snippets.

View ikushlianski's full-sized avatar
🔨

Ilya Kushlianski ikushlianski

🔨
View GitHub Profile
@ikushlianski
ikushlianski / gist:72e41f07f43964b758c0e6e2d8ef9fe7
Created July 11, 2023 10:15
Manual pre-commit hook in a monorepo
#!/bin/bash
# avoid pre-commit hooks when fixing conflicts/merging
git rev-parse -q --verify MERGE_HEAD && exit 0
# list all staged JS and TS files
js_ts_files=$(git diff --diff-filter=d --name-only --cached | grep -E '\.(js|jsx|ts|tsx)$')
#############