From 22cee0a443e06bdbf0b78598a48c2fbecdd7f799 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Wed, 11 Dec 2024 14:50:19 +0100 Subject: [PATCH] make sure the `index.ts` file doesn't change to ensure backwards compatibility Signed-off-by: Erik Jan de Wit --- js/.husky/pre-commit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/.husky/pre-commit b/js/.husky/pre-commit index b9731090b30e..1c24fed6e0ab 100755 --- a/js/.husky/pre-commit +++ b/js/.husky/pre-commit @@ -28,5 +28,11 @@ pnpm install --reporter=silent || { exit 0; } +if git diff --name-only --cached | grep 'index.ts$' +then + echo "pre-commit: Aborting you can't change the index.ts file" + exit 1 +fi + # Run lint-staged. pnpm exec lint-staged