summaryrefslogtreecommitdiff
path: root/pre-commit.sh
blob: d7c2a80d95504b0e9ff2f57b6b7c3e0f7e094dfd (plain)
1
2
3
4
5
6
7
8
#!/bin/sh
was_modified() {
	git diff --name-status HEAD -- $1 | grep -q 'M\s*'"$1"
}

if was_modified pub/blankplays.js; then
	npx eslint || exit 1
fi