Read-only mining plus an optional migration workflow for TypeScript strictness in any repository layout — monorepos (apps/, packages/, libs/, src/, etc.) or single-package projects.
Registry package:typescript-strictness-mining
Workflow
Modifies source?
Purpose
mining (default)
No — emits metrics only
Fast syntax + tsconfig scan; optional slow tsc pass
migration
Yes — rewrites files
tsc gate, conservative safe-fixes, optional strict enablement, AI cleanup (on by default)
Use mining for dashboards and prioritization. Use migration only when you intend to change code.
Default mining avoids a full tsc pass on every file for speed. Compiler findings are opt-in or use the migration workflow.
Migration (--workflow migration)
Compiler readiness — tsc blockers and package readiness rollups (skips or marks packages blocked when a project is too large or tsc fails).
Safe-fix — deterministic edits only when each change passes strict tsc (project-scoped when a tsconfig.json is found) and a syntax check:
removes stale// @ts-expect-error together with a paired eslint-disable-next-line @typescript-eslint/ban-ts-comment when present (never @ts-ignore / @ts-nocheck)
removes as any / <any> when safe (skips bracket-index casts and (x as any).prop member-access casts)
does not auto-remove ! (non-null assertions) — leave those to mining + AI/manual cleanup
Enable strict (optional, enableStrictIfReady=true) — sets strict: true when blockers are zero.
AI cleanup — runs by default (runAiCleanup=true); pass --param runAiCleanup=false for deterministic-only runs.
Migration may read files from disk (--allow-fs).
Examples
bash
# Read-only mining on the current directory
npx codemod run typescript-strictness-mining -t . --dry-run
# Mining on another repo
npx codemod run typescript-strictness-mining -t /path/to/repo --dry-run
# Include high-volume index-access findings
npx codemod run typescript-strictness-mining -t . \
--param includeUnsafeIndexAccess=true \
--dry-run
# Mining + compiler blockers + readiness rollups
npx codemod run typescript-strictness-mining -t . \
--param includeCompilerFindings=true \
--allow-fs \
--dry-run
# Migration — deterministic steps only (no AI)
npx codemod run typescript-strictness-mining --workflow migration -t . \
--param targetPackageGlob=packages/foo \
--param runAiCleanup=false \
--allow-fs \
--dry-run
# Migration — enable strict when ready
npx codemod run typescript-strictness-mining --workflow migration -t . \
--param enableStrictIfReady=true \
--param runAiCleanup=false \
--allow-fs \
--dry-run
Ready to evolve your codebase?
Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.