From 4ba931c36c49be80ffea5345356ce8f3c2678ea4 Mon Sep 17 00:00:00 2001
From: David Tolnay <dtolnay@gmail.com>
Date: Sat, 2 May 2020 13:12:37 -0700
Subject: [PATCH] Fix ts file identification in pre-commit hook

---
 .githooks/pre-commit | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.githooks/pre-commit b/.githooks/pre-commit
index 89ecc22..ed686df 100755
--- a/.githooks/pre-commit
+++ b/.githooks/pre-commit
@@ -6,7 +6,7 @@
 # This script can yield false positives in cases where you only make stylistic changes to the TypeScript code that don't result in changes to the compiled JavaScript code.
 # It is your responsibility as a developer to then commit the changes with `git commit --no-verify` and simply skip this commit hook.
 
-TS_FILES=$(git diff --staged --name-only | grep -c '.ts')
+TS_FILES=$(git diff --staged --name-only | grep -c '\.ts$')
 DIST_MODIFIED=$(git diff --staged --name-only | grep -c dist/index.js)
 
 if [ $TS_FILES -gt 0 ] && [ $DIST_MODIFIED -eq 0 ] ; then