2
0

pre-commit 590 B

1234567891011121314
  1. #!/bin/bash
  2. # Called by "git commit" with no arguments. The hook should
  3. # exit with non-zero status after issuing an appropriate message if
  4. # it wants to stop the commit.
  5. # Invoke the "rush prettier" custom command to reformat files whenever they
  6. # are committed. The command is defined in common/config/rush/command-line.json
  7. # and uses the "rush-lint-staged" autoinstaller.
  8. # Force to update codeowners file if packasge.json changed.
  9. if [ "$PRE_LINT" != "1" ]; then
  10. node common/scripts/install-run-rush.js -q lint-staged || exit $?
  11. node common/scripts/install-run-rush.js check
  12. fi