Skip to content

Commit

Permalink
make sure the index.ts file doesn't change
Browse files Browse the repository at this point in the history
to ensure backwards compatibility

Signed-off-by: Erik Jan de Wit <[email protected]>
  • Loading branch information
edewit committed Dec 11, 2024
1 parent 45a6b5c commit 22cee0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/.husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 22cee0a

Please sign in to comment.