Skip to content

[devops] - Set Up Monorepo-Wide Type Coverage Reporting #121

Description

@dark-sarge

Location: .github/workflows/type-coverage.yml

Description

TypeScript's any type can silently erode type safety across the codebase. Tracking the percentage of type-covered code over time, and setting a minimum threshold, prevents gradual weakening of type safety as the codebase grows.

Acceptance Criteria

  • type-coverage npm package is installed as a root devDependency.
  • A pnpm type-coverage script runs type-coverage --detail --strict across all workspace packages and outputs a coverage percentage.
  • A minimum type coverage of 95% is enforced — the script exits non-zero if coverage falls below the threshold.
  • A type-coverage.yml GitHub Actions workflow runs the check on every PR and posts the coverage percentage as a PR comment showing the delta from the base branch.
  • All existing explicit any casts in server/ and frontend/ are audited; those that cannot be removed immediately are annotated with // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO #<issue> comments.
  • The type coverage percentage is added as a badge in the repository README.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions