Skip to content

build: lint on the tsrs Vite+ 1.7 bundles and drop the tsrs-lint shim - #756

Merged
ian-pascoe merged 2 commits into
mainfrom
chore/remove-oxlint-tsrs-workaround
Nov 18, 2026
Merged

ian-pascoe merged 2 commits into
mainfrom
chore/remove-oxlint-tsrs-workaround

Conversation

@ian-pascoe

Copy link
Copy Markdown
Owner

Summary

Vite+ 1.7.0 bundles tsrs and runs oxlint's type-aware lint and type-check on it (oxc blog, 2026-11-17), so the shim that swapped tsrs in for tsgolint goes.

 vite.config.ts
-process.env.OXLINT_TSGOLINT_PATH = …/tools/tsrs-lint-shim/bin/tsgolint.js
 pnpm-workspace.yaml (overrides)
-vite@*: npm:@voidzero-dev/vite-plus-core@1.4.0
+vite@*: npm:@voidzero-dev/vite-plus-core@8.3.8000
 vitest@*: 5.0.5
+"@vitest/browser-preview": 5.0.5
-oxlint-tsgolint: link:./tools/tsrs-lint-shim
 package.json, apps/web/package.json
-vite-plus 1.4.0, tsrs 0.25.0-ts7.1.0-beta (root)
+vite-plus 1.7.0
-tools/tsrs-lint-shim/bin/tsgolint.js
  • Vitest stays at 5.0.5 (the workerd timer bug under 5.1, docs/development/dependencies.md). Vite+ 1.7 asks for @vitest/browser-preview@5.1.0; that second copy gave vite-plus/test a second Vitest, so the workerd tests' ProvidedContext augmentation missed it (inject(...) → never) and the server's typecheck failed. Overriding it to 5.0.5 fixes that.
  • OXLINT_TSGOLINT_PATH is no longer touched in vite.config.ts. Vite+ sets it in its own process before loading the config, so deleting it there made oxlint fall back to a tsgolint on PATH (a global oxlint-tsgolint).
  • oxfmt 0.79 (Vite+ 1.7) reformats four files.
  • Docs: dependencies.md (vite-plus and tsrs rows), ADR-0055 (Versions, Consequences), ADR-0028 status.

Evidence

vp lint over the repo, 8-core Apple Silicon:

  • Before (shim, tsrs 0.25): 5–7 s wall, 1.2–1.6 GB peak
    After (Vite+ 1.7's tsrs 7.1.0-beta.tsrs2): 4.5 s wall, 16 s CPU, 1.47 GB peak; backend process @tsrs/darwin-arm64@7.1.0-beta.tsrs2 … tsrs --lint headless
  • A probe file with const n: number = "x" and an unawaited async call still reports typescript(TS2322) and typescript(no-floating-promises).
  • vp check passes; pnpm run typecheck 16/16; apps/web build passes; pnpm test 4832 passed, 2 failed in bash.workerd.test.ts (plus a files.workerd.test.ts load failure) under heavy machine load, all passing when rerun alone.

Merge Danger

Door: two-way

Revert restores the shim and Vite+ 1.4.0.

Blast Radius: tooling

Lint, format and the Vite core of every package's tests and the web build move to Vite+ 1.7 / Vite 8.3.8; CI runs the full suite.

Plan

Remove the hack used to run oxlint's type-aware lint on tsrs (the tools/tsrs-lint-shim, its oxlint-tsgolint override, the root tsrs and the OXLINT_TSGOLINT_PATH assignment) now that Vite+ 1.7.0 ships tsrs as its backend; upgrade Vite+ to 1.7.0, keep Vitest at 5.0.5, and update the docs that describe the setup.

Vite+ 1.7.0 runs oxlint's type-aware lint and type-check on its bundled tsrs,
so the oxlint-tsgolint override, tools/tsrs-lint-shim, the root tsrs and the
OXLINT_TSGOLINT_PATH assignment in vite.config.ts go. Vitest stays at 5.0.5,
with @vitest/browser-preview overridden too so vite-plus/test resolves a single
Vitest. oxfmt 0.79 reformats four files.
@ian-pascoe

Copy link
Copy Markdown
Owner Author

Review report — head 52c572a

Two-axis review (Standards, Spec) of git diff origin/main...HEAD, then a re-check after fixes.

Fixed: ADR-0055 still described the shim, OXLINT_TSGOLINT_PATH assignment and Vite+ 1.4.0 as current (Versions bullet, first Consequences bullet, two Considered Options) — rewritten in 52c572a; re-check cleared all of them. Added a note on when minimumReleaseAgeExclude entries can go.

Dismissed / advisory:

  • oxfmt 0.79 reformatting of four unrelated files — required by the new formatter (vp fmt --check fails otherwise); accepted in the spec.
  • Ten minimumReleaseAgeExclude entries for the day-old Vite+ 1.7.0 release — pnpm added them to install it; commented.
  • vite-plus-core@8.3.8000 repeated in overrides and apps/web — documented in dependencies.md as moving with vite-plus.
  • ADR-0055's 2026-11-12 measurement block left as dated history; the 1.7.0 figures are in Consequences.
  • dependencies.md's "still failing with vite-plus 1.6.0" for Vitest 5.1 not re-verified on 1.7 — Vitest stays at 5.0.5, so the claim's scope is unchanged.

No blockers remain.

@github-actions

Copy link
Copy Markdown

Preview deployed

URL: https://cloudpid-server-pr-756.ian-g-pascoe.workers.dev

Built from f44c5e3 (stage pr-756, behind Access). It is destroyed when the
pull request is closed.


This comment updates on each push.

@ian-pascoe
ian-pascoe merged commit 9e4f4a2 into main Nov 18, 2026
16 checks passed
@ian-pascoe
ian-pascoe deleted the chore/remove-oxlint-tsrs-workaround branch November 18, 2026 00:40

This branch was successfully deployed

1 active deployment
preview — 52c572ac Deployed Nov 18, 2026 by ian-pascoe via Preview #1400
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.

1 participant