Twitter0

Health Checks

Scan your codebase for issues. Automatically fix most of them.

The spartan CLI includes a health check tool that scans your components for common issues and outdated patterns. Run it after updating spartan packages to ensure your code stays current.

ng g @spartan-ng/cli:healthcheck

What it does

The health check tool identifies issues like:

  • Deprecated component APIs or import paths
  • Outdated helm directive usage
  • Missing dependencies or peer dependency conflicts
  • Breaking changes from recent updates

Most issues can be fixed automatically. The tool will update import paths, migrate deprecated APIs, and fix common configuration issues. For anything that requires manual intervention, it provides clear guidance on what needs to change.

When to run health checks

Run health checks:

  • After updating @spartan-ng packages
  • When migrating existing components to new patterns
  • Periodically to catch deprecated patterns early

See the update guide for version-specific migration instructions.

Update Guide Version Support