projects

Typecheck CI

2024·github

Overview

Typecheck CI is a zero-configuration GitHub Action that runs tsc --noEmit on pull requests and posts the results as a PR comment. It works with any TypeScript project without modification to your existing CI workflow.

The Problem

TypeScript errors in CI pipelines are usually buried in log output. Reviewers open the "Checks failed" notification, see a wall of build output, and have to search for the relevant errors.

Typecheck CI surfaces type errors directly in the pull request, formatted as a collapsible comment with file links. Errors are obvious, actionable, and dismissible.

Usage

Add this to .github/workflows/typecheck.yml:

name: Typecheck
on: [pull_request]
 
jobs:
  typecheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: yourusername/typecheck-ci@v1

That's it. No configuration required for standard TypeScript projects.

How It Works

The action:

  1. Detects your TypeScript configuration automatically
  2. Runs tsc --noEmit and captures the output
  3. Parses the error output into structured data
  4. Posts a formatted comment on the PR with error counts and details
  5. Updates the comment on subsequent pushes rather than creating new ones

The comment format shows a summary (e.g., "3 errors across 2 files") with an expandable section showing each error with its file, line, and message.

Stats

  • 2,400+ GitHub stars
  • Used in 800+ repositories
  • Handles monorepos, path aliases, and project references