Quality Commands

Run quality gates to ensure code meets standards.

Synopsis#

Loading code block...

Gates#

GateDescriptionWhen to Use
pre-commitFast checksBefore every commit
pre-pushThorough checksBefore pushing
pre-deployComprehensive checksBefore deployment
fullAll checksManual validation

bootspring quality pre-commit#

Fast checks suitable for every commit.

Usage#

Loading code block...

Checks Included#

  • Linting (ESLint) - Code quality rules
  • Formatting (Prettier) - Code style
  • Types (TypeScript) - Type checking
  • Import sorting - Consistent imports

Options#

OptionDescription
--fixAuto-fix issues when possible
--files <paths>Check specific files
--verboseShow detailed output
--jsonOutput as JSON

Examples#

Loading code block...

Output:

Pre-commit Quality Gate ═══════════════════════════════════════════════════════════════════ ✓ Lint passed (1.2s) ✓ Format passed (0.4s) ✓ Types passed (2.1s) ✓ Imports passed (0.3s) ─────────────────────────────────────────────────────────────────── All checks passed (4.0s)
Loading code block...

Output:

Pre-commit Quality Gate (auto-fix enabled) ═══════════════════════════════════════════════════════════════════ ✓ Lint passed (fixed 2 issues) ✓ Format passed (fixed 5 files) ✓ Types passed ✓ Imports passed (fixed 3 files) ─────────────────────────────────────────────────────────────────── All checks passed (4.2s) Fixed 10 issues automatically
Loading code block...

bootspring quality pre-push#

More thorough checks before pushing.

Usage#

Loading code block...

Checks Included#

  • All pre-commit checks
  • Unit tests - Run test suite
  • Coverage - Check coverage threshold
  • Build - Verify build succeeds
  • Bundle size - Check for regressions

Options#

OptionDescription
--skip-testsSkip test execution
--coverage <n>Override coverage threshold
--verboseShow detailed output

Examples#

Loading code block...

Output:

Pre-push Quality Gate ═══════════════════════════════════════════════════════════════════ ✓ Lint passed (1.2s) ✓ Format passed (0.4s) ✓ Types passed (2.1s) ✓ Tests passed (45 tests, 8.3s) ✓ Coverage 85% (threshold: 80%) ✓ Build passed (12.4s) ─────────────────────────────────────────────────────────────────── All checks passed (24.4s)
Loading code block...

bootspring quality pre-deploy#

Comprehensive checks before deployment.

Usage#

Loading code block...

Checks Included#

  • All pre-push checks
  • Integration tests - API and service tests
  • E2E tests - End-to-end tests
  • Security scan - Dependency vulnerabilities
  • Performance audit - Lighthouse metrics
  • Accessibility - a11y checks

Options#

OptionDescription
--skip-e2eSkip E2E tests
--skip-securitySkip security scan
--verboseShow detailed output

Examples#

Loading code block...

Output:

Pre-deploy Quality Gate ═══════════════════════════════════════════════════════════════════ ✓ Lint passed (1.2s) ✓ Format passed (0.4s) ✓ Types passed (2.1s) ✓ Unit Tests passed (45 tests) ✓ Coverage 85% ✓ Integration passed (12 tests) ✓ E2E Tests passed (8 scenarios) ✓ Security no vulnerabilities ✓ Performance score: 94/100 ✓ Accessibility passed (0 violations) ✓ Build passed ─────────────────────────────────────────────────────────────────── All checks passed (2m 34s) Ready for deployment

bootspring quality full#

Run all available checks.

Usage#

Loading code block...

Same as pre-deploy but includes additional checks like:

  • License compliance
  • Documentation coverage
  • Dead code detection
  • Complexity analysis

Handling Failures#

When checks fail:

Pre-commit Quality Gate ═══════════════════════════════════════════════════════════════════ ✓ Lint passed ✗ Format FAILED └── 3 files need formatting • src/components/Button.tsx • src/lib/utils.ts • src/hooks/useAuth.ts ✓ Types passed ─────────────────────────────────────────────────────────────────── Quality gate FAILED Fix with: bootspring quality pre-commit --fix

Auto-fix#

Loading code block...

Manual Fix#

For issues that can't be auto-fixed:

  1. Read the error details
  2. Fix the issues manually
  3. Re-run the check

Configuration#

Gate Settings#

Loading code block...

Custom Rules#

Loading code block...

Custom Checks#

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...