Skip to content

feat(lint): replace tsgolint with tsrs-lint - #3352

Draft
fengmk2 wants to merge 24 commits into
mainfrom
codex/tsrs-lint-bench
Draft

fengmk2 wants to merge 24 commits into
mainfrom
codex/tsrs-lint-bench

Conversation

@fengmk2

@fengmk2 fengmk2 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Upgrading vite-plus makes tsrs-lint the default backend for type-aware linting and type checking in vp lint and vp check. Users keep their commands and do not need a separate tsrs installation.

Production dependencies replace oxlint-tsgolint@7.0.2006 with tsrs@0.25.0-ts7.1.0-beta. Oxlint remains the linter frontend. The eight optional @tsrs/* packages cover all supported platforms, including Windows ARM64. The root package.json keeps oxlint-tsgolint as a development dependency for bench/tsrs-lint.ts.

The dependency updater tracks tsrs. Migration exempts its packages from pnpm's release-age gate, as it does for other bundled tools. With trustPolicy: no-downgrade in pnpm-workspace.yaml, migration adds only tsrs@0.25.0-ts7.1.0-beta to trustPolicyExclude. This reviewed exception addresses the bootstrap publication conflict. Other packages and future tsrs versions remain subject to the policy.

The compiler targets TypeScript 7.1.0-beta. With lint.options.typeCheck enabled, it checks whole TypeScript programs, including files omitted by lint ignore patterns. Projects can report additional errors and must use tsconfig.json to control compiler scope. Existing typescript dependencies and standalone tsc tasks do not change.

See the RFC for the design and dependency comparison.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 68eb840

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://codex-tsrs-lint-bench-viteplus-dev.voidzero-docs.workers.dev (commit 68eb840)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://5f908876-viteplus-dev.voidzero-docs.workers.dev 68eb840 2026-11-12T10:07:01.794Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://27693747-viteplus-dev.voidzero-docs.workers.dev 25a7c00 2026-11-12T09:03:30.192Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://d06b3a24-viteplus-dev.voidzero-docs.workers.dev 73d4b4f 2026-11-12T06:33:53.764Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c675ae29-viteplus-dev.voidzero-docs.workers.dev 6350fb7 2026-11-12T06:13:42.875Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://db62727a-viteplus-dev.voidzero-docs.workers.dev 8e76399 2026-11-11T08:30:35.975Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c7fc0ced-viteplus-dev.voidzero-docs.workers.dev 13f57cc 2026-11-11T06:57:06.074Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2ea8a968-viteplus-dev.voidzero-docs.workers.dev 4b06006 2026-11-11T06:52:42.372Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://74ec0322-viteplus-dev.voidzero-docs.workers.dev df4cfe1 2026-11-11T05:35:39.276Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9d2a2e8a-viteplus-dev.voidzero-docs.workers.dev 9d57edb 2026-11-11T03:32:16.971Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://1bad0d57-viteplus-dev.voidzero-docs.workers.dev ad176ec 2026-11-11T03:28:55.153Z Visit the dashboard ↗

View all previews: View all previews ↗

@fengmk2 fengmk2 closed this Nov 4, 2026
@fengmk2 fengmk2 changed the title perf(lint): benchmark the experimental tsrs-lint backend perf(lint): use tsrs as the experimental default backend Nov 5, 2026
@fengmk2 fengmk2 reopened this Nov 5, 2026
@socket-security

socket-security Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​tsrs@​0.25.0-ts7.1.0-beta1001001009490

View full report

@fengmk2 fengmk2 changed the title perf(lint): use tsrs as the experimental default backend feat(lint): use tsrs as the experimental default backend Nov 5, 2026
Comment thread docs/guide/lint.md Resolved
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

CLI artifact sizes (68eb840)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.34 MiB 2.34 MiB +1.43 KiB (+0.06%)
packages/core/dist Directory total 4.11 MiB 4.11 MiB 0 B (0.00%)
Combined package dist Directory total 6.45 MiB 6.45 MiB +1.43 KiB (+0.02%)
vp (Linux x64) Binary 8.35 MiB 8.35 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 3.82 MiB 3.82 MiB +91 B (+0.00%)
NAPI (Linux x64) Binary 36.78 MiB 36.78 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 14.70 MiB 14.70 MiB +81 B (+0.00%)
vp (macOS ARM64) Binary 5.46 MiB 5.46 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 3.25 MiB 3.25 MiB -330 B (-0.01%)
NAPI (macOS ARM64) Binary 43.43 MiB 43.43 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 18.86 MiB 18.86 MiB -3 B (-0.00%)
vp (Windows x64) Binary 6.19 MiB 6.19 MiB +512 B (+0.01%)
vp (Windows x64) gzip -9 2.86 MiB 2.86 MiB +448 B (+0.01%)
NAPI (Windows x64) Binary 32.81 MiB 32.81 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 13.45 MiB 13.45 MiB -58 B (-0.00%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.09 KiB 7.09 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.68 MiB 4.68 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.25 MiB 2.25 MiB +1 B (+0.00%)

@fengmk2
fengmk2 force-pushed the codex/tsrs-lint-bench branch 2 times, most recently from 15eb2bd to 4fcf99e Compare November 6, 2026 02:06
@fengmk2 fengmk2 added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests test: sfw labels Nov 6, 2026
@fengmk2 fengmk2 added the preview-build Publish this PR's commits to the registry bridge as preview builds label Nov 6, 2026 — with ChatGPT Codex Connector
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Preview binary sizes (25a7c00)

Compared with the latest stable release, v1.6.0. Preview build.
Each row measures one binary. Negative changes mean a smaller preview binary.

Binary Latest release Preview Change
vp (macOS ARM64) 5.46 MiB 5.46 MiB +32 B (+0.00%)
NAPI (macOS ARM64) 43.39 MiB 43.40 MiB +16.14 KiB (+0.04%)
vp (macOS x64) 6.92 MiB 6.92 MiB +4.03 KiB (+0.06%)
NAPI (macOS x64) 48.76 MiB 48.76 MiB +8 B (+0.00%)
vp (Linux ARM64 GNU) 6.90 MiB 6.91 MiB +4.05 KiB (+0.06%)
NAPI (Linux ARM64 GNU) 32.68 MiB 32.66 MiB -16.00 KiB (-0.05%)
vp (Linux ARM64 musl) 6.97 MiB 6.98 MiB +7.58 KiB (+0.11%)
NAPI (Linux ARM64 musl) 31.89 MiB 31.89 MiB -2.75 KiB (-0.01%)
vp (Linux x64 GNU) 8.33 MiB 8.35 MiB +16.05 KiB (+0.19%)
NAPI (Linux x64 GNU) 36.69 MiB 36.70 MiB +4.00 KiB (+0.01%)
vp (Linux x64 musl) 8.41 MiB 8.42 MiB +4.89 KiB (+0.06%)
NAPI (Linux x64 musl) 35.90 MiB 35.90 MiB +1.13 KiB (+0.00%)
vp (Windows x64) 6.19 MiB 6.20 MiB +5.50 KiB (+0.09%)
NAPI (Windows x64) 32.45 MiB 32.45 MiB +1.50 KiB (+0.00%)
Trampoline (Windows x64) 13.00 KiB 13.00 KiB 0 B (0.00%)
Installer (Windows x64) 4.69 MiB 4.69 MiB +4.00 KiB (+0.08%)
vp (Windows ARM64) 5.42 MiB 5.42 MiB +5.00 KiB (+0.09%)
NAPI (Windows ARM64) 28.66 MiB 28.66 MiB +2.00 KiB (+0.01%)
Trampoline (Windows ARM64) 13.00 KiB 13.00 KiB 0 B (0.00%)
Installer (Windows ARM64) 3.86 MiB 3.86 MiB +4.00 KiB (+0.10%)
gzip -9 sizes
Binary Latest release Preview Change
vp (macOS ARM64) 3.25 MiB 3.25 MiB +3.58 KiB (+0.11%)
NAPI (macOS ARM64) 18.85 MiB 18.85 MiB +3.22 KiB (+0.02%)
vp (macOS x64) 3.43 MiB 3.43 MiB +4.53 KiB (+0.13%)
NAPI (macOS x64) 20.12 MiB 20.12 MiB +1.57 KiB (+0.01%)
vp (Linux ARM64 GNU) 3.74 MiB 3.75 MiB +4.28 KiB (+0.11%)
NAPI (Linux ARM64 GNU) 13.93 MiB 13.93 MiB -176 B (-0.00%)
vp (Linux ARM64 musl) 3.77 MiB 3.77 MiB +2.53 KiB (+0.07%)
NAPI (Linux ARM64 musl) 13.64 MiB 13.63 MiB -3.90 KiB (-0.03%)
vp (Linux x64 GNU) 3.81 MiB 3.82 MiB +3.26 KiB (+0.08%)
NAPI (Linux x64 GNU) 14.65 MiB 14.65 MiB +341 B (+0.00%)
vp (Linux x64 musl) 3.84 MiB 3.84 MiB +3.92 KiB (+0.10%)
NAPI (Linux x64 musl) 14.33 MiB 14.33 MiB -156 B (-0.00%)
vp (Windows x64) 2.86 MiB 2.87 MiB +4.17 KiB (+0.14%)
NAPI (Windows x64) 13.31 MiB 13.31 MiB -1.32 KiB (-0.01%)
Trampoline (Windows x64) 7.14 KiB 7.14 KiB +1 B (+0.01%)
Installer (Windows x64) 2.25 MiB 2.25 MiB +1.94 KiB (+0.08%)
vp (Windows ARM64) 2.73 MiB 2.74 MiB +2.00 KiB (+0.07%)
NAPI (Windows ARM64) 12.62 MiB 12.62 MiB +403 B (+0.00%)
Trampoline (Windows ARM64) 6.93 KiB 6.92 KiB -2 B (-0.03%)
Installer (Windows ARM64) 2.14 MiB 2.14 MiB +2.49 KiB (+0.11%)

Raw sizes are uncompressed file sizes. gzip sizes recompress each binary at level 9; they are not package or download archive sizes.
The baseline uses published release files, including NAPI packages from npm at the same version. Build versions and toolchains can affect the difference.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Registry bridge build (25a7c00)

This commit build is published to the registry bridge, which serves these as ordinary npm versions (every other package proxies to npmjs):

Package Version
vite-plus 0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f
@voidzero-dev/vite-plus-core 0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f
create-vite-plus 0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f

Install the Vite+ CLI built from this commit, then migrate a project:

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/25a7c006af2db834bfc66f9689b02de1060f580f/packages/cli/install.sh | VP_PR_VERSION=3352 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/voidzero-dev/vite-plus/25a7c006af2db834bfc66f9689b02de1060f580f/packages/cli/install-legacy.sh bash
# Windows (PowerShell)
$env:VP_PR_VERSION="3352"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/voidzero-dev/vite-plus/25a7c006af2db834bfc66f9689b02de1060f580f/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/25a7c006af2db834bfc66f9689b02de1060f580f/packages/cli/install.ps1 | iex

Or install with Homebrew (macOS / glibc Linux):

These commands use the formula and binary from this published commit. Replace brew install with brew reinstall if the tap package is already installed.
If Homebrew Core’s vite-plus is installed, run brew uninstall vite-plus first. This keeps your user data; do not run vp implode to switch installations.

(
  set -eu
  export HOMEBREW_NO_AUTO_UPDATE=1
  export HOMEBREW_VP_PR_VERSION=25a7c006af2db834bfc66f9689b02de1060f580f
  brew tap voidzero-dev/vite-plus https://github.com/voidzero-dev/vite-plus
  preview_tap="$(brew --repository voidzero-dev/vite-plus)"
  git -C "$preview_tap" fetch --depth=1 https://github.com/voidzero-dev/vite-plus.git "$HOMEBREW_VP_PR_VERSION"
  git -C "$preview_tap" switch --detach "$HOMEBREW_VP_PR_VERSION"
  brew install voidzero-dev/vite-plus/vp
  brew test voidzero-dev/vite-plus/vp
  "$(brew --prefix)/bin/vp"
)

The tap stays at the tested commit. Return it to main after testing:

git -C "$(brew --repository voidzero-dev/vite-plus)" switch main

Or download the standalone Windows installer built from this commit:

Architecture Installer
x64 vp-setup-x86_64-pc-windows-msvc.exe
Arm64 vp-setup-aarch64-pc-windows-msvc.exe

GitHub requires you to sign in and downloads each installer as a ZIP artifact. Extract vp-setup.exe, then run it against this preview build:

.\vp-setup.exe --version "0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f" --registry "https://registry-bridge.viteplus.dev/"

After installing, upgrade the current project's vite-plus to this test build with:

vp migrate

Or create a new project from this commit without installing the CLI:

export npm_config_registry=https://registry-bridge.viteplus.dev/ pnpm_config_registry=https://registry-bridge.viteplus.dev/
pnpm create vite-plus@0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f # or: npm create vite-plus@0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f
$env:npm_config_registry="https://registry-bridge.viteplus.dev/"; $env:pnpm_config_registry="https://registry-bridge.viteplus.dev/"
pnpm create vite-plus@0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f # or: npm create vite-plus@0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f

pnpm 11+ reads pnpm_config_registry, npm and older pnpm read npm_config_registry. The new project pins this build, so keep the registry set for later installs, or configure it as below.

Or point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:

Package manager Registry config
npm / pnpm / Bun .npmrc: registry=https://registry-bridge.viteplus.dev/
Yarn (v2+) .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/"

Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):

{
  "devDependencies": {
    "vite-plus": "0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.25a7c006af2db834bfc66f9689b02de1060f580f"
  }
}

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🐳 Docker preview image

Built from this PR's registry bridge build:

Image Compressed size
ghcr.io/voidzero-dev/vite-plus:pr-3352 228MB
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-3352 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-3352

Quick check:

docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-3352 vp --version

See docs/guide/docker.md for usage.

fengmk2 commented Nov 8, 2026 •

Copy link
Copy Markdown
Member Author

Follow-up checklist for the TypeScript 7.1 compatibility changes exposed by this PR.

The exact-version audit compared tsrs@0.22.0-ts7.1.0-beta with TypeScript 7.1.0-beta at 3e9236361fa97a9e6c685f4833ac457ae2d8c50a. All seven reduced cases produced identical diagnostic output and exit codes. These cases show upstream compiler or library behavior, with no Rust-port divergence.

For the current tsgolint baseline tested in this PR, none of these four specific problems is reported by oxlint-tsgolint@7.0.2005. They appear after switching to the TypeScript 7.1.0-beta behavior bundled with tsrs.

Compiler/backend These four reproduced problems
oxlint-tsgolint@7.0.2005 Not reported
tsrs@0.22.0-ts7.1.0-beta Reported
Upstream TypeScript 7.1.0-beta (Go, same source commit) Identical errors to tsrs

In Vite+, these diagnostics require type checking to be enabled. Run vp lint --type-aware --type-check, or enable lint.options.typeAware and lint.options.typeCheck in the configuration used by vp lint / vp check. Type-aware lint rules alone do not expose these four TypeScript diagnostic patterns.

Hono and Vue Core do not enable type checking in their current lint configurations; the comparison used explicit flags to exercise it. OneSignal already enables it, so switching the backend exposes the new mock error in its existing lint workflow. Other errors existed under the Go baseline: the absence of these four problems does not mean every original repository command passed.

  • Hono / Vue: default destructuring reports TS7031. Hono’s Style and Vue’s applyTextModel lose contextual types for bindings in parameters with an = {} default. Track TypeScript #64974. Verify the reductions after a tsrs release adopts an upstream fix. An explicit parameter annotation is a verified workaround.

  • Vue: generic conditional return types report TS2322. toHandlerKey fails when assigning equivalent generic signatures. Investigate TypeScript #64673 and the related normalization fix #64307. The connection follows from source analysis; that patch has not been tested against our case. Validate both the reduced and original implementations before marking this resolved.

  • Vue: selector declarations report TS5115 and TS7006. postcss-selector-parser@7.1.6 uses Selector = _Selector<Selector> with a base type containing Diff<Node, Selector>. This encounters the newer compiler’s recursion checks; TypeScript #64372 explains the stricter inheritance behavior. Investigate an updated or revised declaration and verify that both the circular-type error and callback errors disappear without disabling checks.

  • OneSignal: the notification mock reports TS2741. MockNotification lacks the static maxActions member required by the newer DOM declarations. Both compilers ship byte-identical lib.dom.d.ts files. Adapt the mock to the updated constructor type; a mock with no supported actions can use static readonly maxActions = 0. Verify the original constructor assignment.

The report at 930d74132 contains the pinned repositories, reduced cases, source analysis, and coverage limits. After fixes or dependency updates, rerun the affected repository commands with the candidate preview. Exact-upstream parity covers the reduced cases only; it does not establish full ecosystem compatibility.

@fengmk2
fengmk2 force-pushed the codex/tsrs-lint-bench branch 2 times, most recently from f743686 to ad176ec Compare November 11, 2026 03:28
@fengmk2 fengmk2 removed the preview-build Publish this PR's commits to the registry bridge as preview builds label Nov 11, 2026
@fengmk2 fengmk2 added the preview-build Publish this PR's commits to the registry bridge as preview builds label Nov 11, 2026 — with ChatGPT Codex Connector
@fengmk2
fengmk2 force-pushed the codex/tsrs-lint-bench branch from 4b06006 to 13f57cc Compare November 11, 2026 06:56
@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Nov 11, 2026
@fengmk2 fengmk2 self-assigned this Nov 12, 2026
@fengmk2
fengmk2 force-pushed the codex/tsrs-lint-bench branch from 8e76399 to 6350fb7 Compare November 12, 2026 06:12
@fengmk2 fengmk2 changed the title feat(lint): use tsrs as the experimental default backend feat(lint): replace tsgolint with tsrs-lint Nov 12, 2026
@fengmk2 fengmk2 removed the preview-build Publish this PR's commits to the registry bridge as preview builds label Nov 12, 2026
@fengmk2 fengmk2 added the preview-build Publish this PR's commits to the registry bridge as preview builds label Nov 12, 2026 — with ChatGPT Codex Connector

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-build Publish this PR's commits to the registry bridge as preview builds test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: sfw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant