Skip to content

perf: replace tsc with tsgo for ~3x faster type checking#29

Closed
vanceingalls wants to merge 4 commits intomainfrom
va-851/06-tsgo-typecheck
Closed

perf: replace tsc with tsgo for ~3x faster type checking#29
vanceingalls wants to merge 4 commits intomainfrom
va-851/06-tsgo-typecheck

Conversation

@vanceingalls
Copy link
Copy Markdown
Collaborator

@vanceingalls vanceingalls commented Mar 23, 2026

Summary

  • Replace tsc --noEmit with tsgo --noEmit in all 5 packages' typecheck scripts
  • tsgo is the TypeScript team's official Go port of the compiler, available via @typescript/native-preview
  • tsc stays for build steps that need JS/declaration emit

Benchmarks on this repo:

tsc tsgo Speedup
All packages typecheck 5.5s 1.9s 2.9x

Part 6/6 of VA-851

Test plan

  • tsgo --noEmit passes on all 5 packages with 0 errors
  • Output matches tsc --noEmit (no new or missing errors)
  • bun run build still works (uses tsc for emit, unaffected)

@linear
Copy link
Copy Markdown

linear Bot commented Mar 23, 2026

VA-851 [Pre-Migration] Configure ESLint, Prettier, and conventional commits

Context

The codebase currently has no linting or formatting enforcement. Code is clean by convention, but OSS contributors need automated guardrails. Team feedback: "I love when an open source repo has this."

What to do

  1. ESLint — add configuration at monorepo root with TypeScript rules. Extend from @typescript-eslint/recommended.
  2. Prettier — add .prettierrc at root. Configure for the existing code style (double quotes, no semicolons or with — match what's already there).
  3. Conventional commits — add commitlint config enforcing conventional commit format (feat:, fix:, refactor:, etc.). This enables automated changelog generation later.
  4. Run formatter across all source files to establish baseline (single "format" commit in internal repo before port).
  5. Add lint/format scripts to root package.json: pnpm lint, pnpm format, pnpm format:check
  6. Verify all existing code passes lint + format checks with zero errors

Why before port

We want the OSS repo's first commit to already have these configs in place and all code conforming. No "fix linting" commits in public history.

@vanceingalls vanceingalls changed the title perf: replace tsc with tsgo for type checking (~3x faster) perf: replace tsc with tsgo for ~3x faster type checking Mar 23, 2026
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from 44bcd24 to 89c1776 Compare March 23, 2026 21:57
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch from 301f1fb to 0941b21 Compare March 23, 2026 21:57
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from 89c1776 to 432910e Compare March 23, 2026 22:11
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch from 0941b21 to 4ccccd7 Compare March 23, 2026 22:11
@vanceingalls vanceingalls marked this pull request as ready for review March 23, 2026 22:22
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch 2 times, most recently from 69344f0 to f4dd394 Compare March 23, 2026 23:08
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch 2 times, most recently from 523866f to a3967aa Compare March 23, 2026 23:12
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from f4dd394 to 04ff518 Compare March 23, 2026 23:12
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch from a3967aa to 21db56a Compare March 23, 2026 23:15
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch 2 times, most recently from ed54754 to 5db2d37 Compare March 23, 2026 23:18
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch from 21db56a to 4786a1d Compare March 23, 2026 23:18
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from 5db2d37 to dd29d9c Compare March 23, 2026 23:43
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch from 4786a1d to a083c81 Compare March 23, 2026 23:43
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch from a083c81 to 9499de2 Compare March 24, 2026 01:43
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch 3 times, most recently from 5b8e57f to 0c5cc70 Compare March 24, 2026 01:50
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch from 9499de2 to 9d8bb8c Compare March 24, 2026 01:50
@vanceingalls vanceingalls changed the base branch from va-851/05-bun-package-manager to graphite-base/29 March 24, 2026 02:50
vanceingalls and others added 2 commits March 24, 2026 02:51
Keep pnpm for publish workflow only (publishConfig overrides + provenance).
Bun handles install, run, and exec for all other workflows.

- Add workspaces field to root package.json for bun workspace support
- Replace pnpm setup with oven-sh/setup-bun in CI and release workflows
- Update all scripts to use bun run / bun run --filter / bunx
- Replace npx with bunx in lefthook hooks
- Update CONTRIBUTING.md with bun commands
- Delete pnpm-lock.yaml, add bun.lock
- Keep pnpm-workspace.yaml for publish workflow compatibility

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch from 9d8bb8c to 88770d4 Compare March 24, 2026 02:51
@graphite-app graphite-app Bot changed the base branch from graphite-base/29 to main March 24, 2026 02:51
Use @typescript/native-preview (tsgo) for --noEmit type checking.
tsc remains for builds that need emit (.js, .d.ts).
@vanceingalls vanceingalls force-pushed the va-851/06-tsgo-typecheck branch from 88770d4 to 546598b Compare March 24, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants