Git · Middle · Question 15 of 75
What is a pre-commit hook commonly used for?
- 1Sending a notification to the team chat
- 2Deploying the application to production
- ✓Correct answer: Running linters or formatters on staged files
Explanation
Combined with lint-staged it checks only the files being committed, so it stays fast. It can be skipped with --no-verify, so CI must still run the same checks.