rtk-ai/rtk

Add stripper for pnpm typecheck / tsc --noEmit output

Open

#1070 opened on Apr 7, 2026

View on GitHub
 (3 comments) (1 reaction) (0 assignees)Rust (48,085 stars) (2,914 forks)batch import
effort-mediumenhancementgood first issue

Description

Problem

pnpm typecheck (which runs tsc --noEmit) is a high-frequency command in Claude Code workflows — 135 calls observed in recent session logs — but has no RTK stripper. TypeScript compiler output has highly predictable, highly strippable structure.

On success: Outputs "Found 0 errors" or similar — can be stripped to a single status line.

On failure: Each error repeats the full absolute file path, includes blank separator lines between errors, and ends with a "Found X errors in Y files" summary footer. The signal is just file:line — error message per error.

Proposed behavior

Success case:

✓ typecheck passed (0 errors)

Failure case — strip to compact error list:

src/lib/worker.ts:42 — TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
src/commands/run.ts:18 — TS2304: Cannot find name 'WorkerConfig'.
Found 2 errors in 2 files.

Strip:

  • Redundant absolute path prefixes (keep relative from cwd)
  • Blank lines between errors
  • ANSI color codes
  • The verbose "The expected type comes from..." follow-up lines (keep only the primary error line)

Keep:

  • Every distinct error with file, line, and error code
  • The summary footer count (useful signal for "are we making progress")

Context

Discovered via rtk discover — 135 calls with no handler. Same structural pattern as the existing biome/lint stripper. Should be straightforward to implement since tsc output format is stable and well-known.

Contributor guide