Build Validation Hook

Verify the project builds successfully before committing

Category:hooks-configs
Type:hook
Difficulty:intermediate
devops
pre-commit
automation
intermediate

Description

Pre-commit hook that validates the project builds without errors. Catches build-breaking changes before they're committed. Configurable for different build systems.

Content

Resource Content
{
  "hooks": {
    "pre-commit": [
      {
        "name": "build-check",
        "command": "npm run build",
        "description": "Verify project builds successfully",
        "timeout": 120000
      }
    ]
  }
}