Repository navigation
Type check with vp check - #2419
Merged
Merged
Conversation
kmcginnes
added this pull request to stack #2421
October 14, 2026 23:07
kmcginnes
added a commit
that referenced
this pull request
Oct 14, 2026
## Summary Before `tsc` can go, we need to know whether Vite+'s type check catches everything it does. This turns on `lint.options.typeCheck`, so `vp check` and `vp lint` also report TypeScript errors through tsgolint. `pnpm checks` still runs `tsc` afterwards, so CI runs both side by side until [Retire tsc now that vp check type checks (#2420)](#2420) lands. ```diff options: { typeAware: true, + typeCheck: true, }, ``` `AGENTS.md` and `docs/development.md` no longer say `vp check` skips type checks. ## Evidence I planted each error below in a new or existing file, then ran `vp lint` and `pnpm check:types`. Both exit 1, with the same TypeScript code, for: - **All 3 packages:** a plain type error (TS2322), an implicit `any` (TS7006), an unused parameter and an unused local (TS6133, even with `no-unused-vars` disabled) - **graph-explorer:** `Object.groupBy` outside `lib: ES2023` (TS2550), a bad `@/` or `@shared/` path (TS2307), a `.tsx` prop type error, and a type error in a `.test.ts` file - **shared:** `Promise.withResolvers` outside `lib` (TS2550), a `.ts` import without `allowImportingTsExtensions` (TS5097), a missing `override` (TS4114), an `enum` under `erasableSyntaxOnly` (TS1294), and unreachable code - **proxy server:** an extensionless relative import under `nodenext` (TS2835) - **Config files:** a type error in the root and graph-explorer `vite.config.ts` `vp check` also catches a type error in `packages/shared/vite.config.ts` and `packages/graph-explorer-proxy-server/vite.config.ts`. `tsc` misses both, because no tsconfig includes those files. **Timing:** `vp check` takes 12.8s for the whole repo, with lint and types together in 8.7s of that. `pnpm check:types` takes 3.4s. The pre-commit hook on a single file takes 3 to 6s whether `typeCheck` is on or off. ## Merge Danger **Door:** two-way **Impact:** contributors Type errors now also fail the pre-commit hook for the files being committed. ## Related - Related to #2305
kmcginnes
added a commit
that referenced
this pull request
Oct 14, 2026
## Summary Now that `vp check` type checks, the `tsc` scripts run the same check a second time. This removes them, so `pnpm checks` is `vp check`. ```diff - "check:types": "pnpm -r --include-workspace-root --parallel --stream run typecheck", - "typecheck": "tsc --noEmit", - "checks": "vp check && pnpm run check:types", + "checks": "vp check", ``` The `typecheck` script is also gone from all 3 packages. `AGENTS.md`, `REVIEW.md`, and `docs/agents/testing.md` now point at `pnpm checks` or the type check in `vp check` instead of `tsc`. The `typescript` dev dependency stays, because editors and tsgolint use it. Stacked on [Type check with vp check (#2419)](#2419), which has the parity evidence. ## Evidence **Before:** `pnpm checks` ran `vp check`, then `tsc --noEmit` in the root and each package. **After:** `pnpm checks` runs `vp check` only. A planted `const x: number = "s"` in `packages/shared` still fails it with TS2322, and a clean tree passes: `Found no warnings, lint errors, or type errors in 917 files`. ## Merge Danger **Door:** two-way **Impact:** contributors `pnpm check:types` and the package `typecheck` scripts no longer exist. Use `pnpm checks`. ## Related - Related to #2305
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Before
tsccan go, we need to know whether Vite+'s type check catches everything it does. This turns onlint.options.typeCheck, sovp checkandvp lintalso report TypeScript errors through tsgolint.pnpm checksstill runstscafterwards, so CI runs both side by side until Retire tsc now that vp check type checks (#2420) lands.options: { typeAware: true, + typeCheck: true, },AGENTS.mdanddocs/development.mdno longer sayvp checkskips type checks.Evidence
I planted each error below in a new or existing file, then ran
vp lintandpnpm check:types. Both exit 1, with the same TypeScript code, for:any(TS7006), an unused parameter and an unused local (TS6133, even withno-unused-varsdisabled)Object.groupByoutsidelib: ES2023(TS2550), a bad@/or@shared/path (TS2307), a.tsxprop type error, and a type error in a.test.tsfilePromise.withResolversoutsidelib(TS2550), a.tsimport withoutallowImportingTsExtensions(TS5097), a missingoverride(TS4114), anenumundererasableSyntaxOnly(TS1294), and unreachable codenodenext(TS2835)vite.config.tsvp checkalso catches a type error inpackages/shared/vite.config.tsandpackages/graph-explorer-proxy-server/vite.config.ts.tscmisses both, because no tsconfig includes those files.Timing:
vp checktakes 12.8s for the whole repo, with lint and types together in 8.7s of that.pnpm check:typestakes 3.4s. The pre-commit hook on a single file takes 3 to 6s whethertypeCheckis on or off.Merge Danger
Door: two-way
Impact: contributors
Type errors now also fail the pre-commit hook for the files being committed.
Related