Quality Gates Reference

Complete reference for Bootspring quality gates, checks, and configuration

Quality gates are automated checks that ensure code meets standards before committing, pushing, or deploying. This reference covers all available gates, checks, and configuration options.

Overview

Quality gates run at different stages of development:

GateWhenSpeedThoroughness
pre-commitBefore every commitFastBasic
pre-pushBefore pushing to remoteMediumModerate
pre-deployBefore deploymentSlowComprehensive
fullOn demandSlowestComplete

Gates

pre-commit

Fast checks that run on every commit. Designed to catch common issues quickly.

Loading code block...

Checks included:

CheckDescriptionAuto-fixable
lintESLint code analysisYes
formatPrettier formattingYes
typesTypeScript type checkingNo
importsImport sorting and organizationYes
namingFile naming conventionsNo

Typical duration: 5-15 seconds


pre-push

More thorough checks before pushing to a remote branch.

Loading code block...

Checks included:

CheckDescriptionAuto-fixable
All pre-commit checks--
testUnit testsNo
coverageTest coverage thresholdNo
buildBuild verificationNo
bundle-sizeBundle size checkNo

Typical duration: 30-120 seconds


pre-deploy

Comprehensive checks before deployment to production.

Loading code block...

Checks included:

CheckDescriptionAuto-fixable
All pre-push checks--
integrationIntegration testsNo
e2eEnd-to-end testsNo
securitySecurity vulnerability scanNo
performancePerformance auditNo
accessibilityAccessibility checkNo

Typical duration: 2-10 minutes


full

All available checks. Use for comprehensive audits.

Loading code block...

Checks included:

  • All pre-deploy checks
  • Additional deep analysis
  • Historical trend comparison

Available Checks

lint

Runs ESLint to identify code quality issues.

Loading code block...

Configuration:

Loading code block...

Common issues detected:

  • Unused variables
  • Missing dependencies in useEffect
  • Accessibility issues in JSX
  • Import order problems

format

Checks code formatting with Prettier.

Loading code block...

Configuration:

Loading code block...

types

Runs TypeScript compiler to check for type errors.

Loading code block...

Configuration:

Loading code block...

test

Runs the test suite.

Loading code block...

Configuration:

Loading code block...

coverage

Checks test coverage meets thresholds.

Loading code block...

Configuration:

Loading code block...

build

Verifies the project builds successfully.

Loading code block...

Configuration:

Loading code block...

bundle-size

Checks bundle size against limits.

Loading code block...

Configuration:

Loading code block...

security

Scans for security vulnerabilities.

Loading code block...

Configuration:

Loading code block...

Checks performed:

  • npm audit for dependency vulnerabilities
  • Secret detection in code
  • Hardcoded credentials
  • Insecure patterns

performance

Audits performance metrics.

Loading code block...

Configuration:

Loading code block...

accessibility

Checks accessibility compliance.

Loading code block...

Configuration:

Loading code block...

Configuration

Global Configuration

Loading code block...

Per-Gate Configuration

Loading code block...

CLI Usage

Basic Commands

Loading code block...

Options

Loading code block...

Git Hooks Integration

Using Husky

Loading code block...

Using lint-staged

Loading code block...

CI/CD Integration

GitHub Actions

Loading code block...

Vercel

Loading code block...

Custom Checks

Adding Custom Checks

Loading code block...

Output Formats

Default Output

Quality Gate: pre-commit ======================== [PASS] lint (1.2s) [PASS] format (0.4s) - Fixed 3 files [PASS] types (2.1s) Summary ------- Total: 3 checks Passed: 3 Failed: 0 Duration: 3.7s Result: PASSED

JSON Output

Loading code block...

Troubleshooting

Common Issues

IssueCauseSolution
Checks too slowToo many filesUse exclude patterns
Type errors in dependenciesMissing typesInstall @types/* packages
Coverage threshold not metInsufficient testsAdd more tests or lower threshold
Security audit failsVulnerable dependenciesRun npm audit fix

Debugging

Loading code block...

Best Practices

Gate Selection

StageRecommended GateRationale
Every commitpre-commitFast feedback
Before PRpre-pushThorough validation
Before deploypre-deployProduction safety

Threshold Guidelines

MetricRecommendedMinimum
Test coverage80%60%
Lighthouse performance9070
Bundle size<500kb<1MB
LCP<2.5s<4s

Team Conventions

  1. Never skip gates - Use --fix instead of bypassing
  2. Start strict, relax if needed - Easier than tightening later
  3. Document exceptions - If you lower a threshold, explain why
  4. Review regularly - Adjust thresholds as the project matures