tiktok-sparo/common/git-hooks/pre-commit
Pete Gonzalez c48b5c0cec Initial commit of files being released as open source
Based on GitLab commit b7d0c1d555c9358a7fb2141b14730bcdb85c0654
2024-02-20 21:42:28 -08:00

9 lines
433 B
Bash

#!/bin/sh
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
# Invoke the "rush prettier" custom command to reformat files whenever they
# are committed. The command is defined in common/config/rush/command-line.json
# and uses the "rush-prettier" autoinstaller.
node common/scripts/install-run-rush.js prettier || exit $?