Skip to content

fix(lint): report type errors only for linted files - #998

Merged
camc314 merged 6 commits into
mainfrom
fix/lint-type-check-listed-files
Nov 16, 2026
Merged

camc314 merged 6 commits into
mainfrom
fix/lint-type-check-listed-files

Conversation

@camc314

@camc314 camc314 commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

oxlint --type-check now reports compiler diagnostics only for the files Oxlint selected for linting, as tsgolint does. Since #930, tsrs also reported diagnostics from other eligible files in each loaded TypeScript program, so files excluded by Oxlint ignore patterns, CLI path selection or tsconfig.exclude could still fail lint when they were part of the TypeScript program.

Other program files still provide type information. Listed files outside every tsconfig are still checked in an inferred program. Program-wide global diagnostics are no longer reported on the tsconfig because they do not belong to a linted file; this also matches tsgolint's file-level reporting.

The diagnostic-scope reproduction now matches tsgolint in all six cases.

Context: voidzero-dev/vite-plus#3352 (comment)

Copilot AI balanced review requested due to automatic review settings November 15, 2026 23:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: βœ… Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
πŸ“ Code Review βœ… Completed 2026-11-16T08:35:32.118858Z 138b08d New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab16c08d46

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Resolved
@camc314

camc314 commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

cc @maschwenk i need to change this else it's not really a drop-in releacement for tsgolint. I think users might want some more fine grained controls over this which we'll address as feedback comes in.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Performance change vs main

Workflow run Β· main e26d1ee626d7 β†’ PR merge 3b46f7425d27 (head 138b08d92df5)

Clef gate: Running benchmarks because the decision was unavailable (crates/tsrs_lint/src/engine.rs: patch exceeds the Clef context limit (10623 bytes)).

Release builds in fast mode (TSRS_FAST=1) with Hyperfine 2 hardware counters. After warming each binary, alternating main/PR pairs measure wall time at both the fast preset's default checker count and with --singleThreaded, with ten pairs per configuration by default. Instructions come from the single-threaded runs; peak RSS comes from the default-count runs.
Incremental runs start with fresh build info before every invocation; check runs disable incremental compilation.

Project Mode Single-thread wall time Ξ” Single-thread instructions Ξ” Default wall time Ξ” Default peak RSS Ξ”
vscode check -0.2% 0.000% -0.1% +0.1%
vscode incremental +0.2% +0.001% +0.2% 0.0%
xstate-main check -1.0% +0.001% -3.2% 0.0%
xstate-main incremental -2.2% -0.001% +0.8% -0.3%
webpack check +0.2% +0.003% -1.4% -0.5%
webpack incremental -0.2% +0.001% -0.2% 0.0%
mui-docs check -0.3% +0.008% -0.6% +0.3%
mui-docs incremental 0.0% +0.012% +0.5% -0.3%
Compiler check +0.3% -0.001% 0.0% -2.0%
Compiler incremental -1.1% 0.000% -0.5% -0.2%
Compiler-Unions check +0.3% -0.001% +1.4% +0.3%
Compiler-Unions incremental -0.5% 0.000% +0.5% 0.0%
cal-diy check +0.4% 0.000% -0.1% +0.5%
cal-diy incremental +0.8% +0.001% +0.4% 0.0%
formbricks-web check +0.1% +0.002% -0.1% -0.3%
formbricks-web incremental +2.7% -0.003% -1.6% 0.0%
supabase-studio check -0.1% +0.005% -0.9% 0.0%
supabase-studio incremental 0.0% +0.003% -0.7% -0.2%
t3code-server check -3.5% +0.002% -1.6% -0.5%
t3code-server incremental -0.2% +0.004% +0.5% -0.1%
mikro-orm check +0.2% 0.000% +0.2% +0.1%
mikro-orm incremental -1.1% 0.000% +0.6% +0.1%
next-packages-next check +0.4% 0.000% 0.0% +0.2%
next-packages-next incremental -1.2% +0.002% -1.3% +0.3%
next-root check 0.0% 0.000% -0.3% -0.3%
next-root incremental +0.9% +0.001% +0.9% +0.4%
storybook check +1.0% 0.000% -1.3% -0.4%
storybook incremental -4.1% -0.016% -0.6% 0.0%
nuxt check -0.7% +0.003% -0.6% -0.3%
nuxt incremental -0.4% +0.003% -0.4% -0.3%
playwright check +0.1% +0.002% +1.3% +0.6%
playwright incremental -0.2% 0.000% +1.1% +0.1%
drizzle-orm check +0.3% +0.004% -0.6% -0.1%
drizzle-orm incremental +0.5% 0.000% -0.1% -0.2%
typeorm check -3.8% -0.003% +3.3% +0.1%
typeorm incremental -1.0% +0.002% -2.1% -0.1%
date-fns check -0.5% -0.019% +1.2% +0.7%
date-fns incremental -0.5% +0.006% +0.9% +0.9%

Negative means the PR used less; positive means it used more. Deltas are medians of paired PR/main ratios for wall time and instructions. Single-threaded runs reduce scheduling noise; shared CI machines can still add noise to wall time.

Measured medians (main β†’ PR)
Project Mode Single-thread wall time (s) Single-thread instructions Default wall time (s) Default peak RSS (MiB)
vscode check 8.439 β†’ 8.405 82,390,742,928.5 β†’ 82,390,692,980 1.458 β†’ 1.456 1836.4 β†’ 1837.7
vscode incremental 10.194 β†’ 10.805 84,804,276,473 β†’ 84,804,825,334.5 1.654 β†’ 1.658 2161.8 β†’ 2162.8
xstate-main check 0.544 β†’ 0.543 5,569,094,531.5 β†’ 5,569,091,235 0.132 β†’ 0.129 242.1 β†’ 242.3
xstate-main incremental 0.558 β†’ 0.552 5,731,816,996.5 β†’ 5,731,774,655 0.165 β†’ 0.168 243.9 β†’ 243.1
webpack check 0.917 β†’ 0.918 10,897,615,645.5 β†’ 10,897,912,707 0.202 β†’ 0.195 406.2 β†’ 404.2
webpack incremental 0.962 β†’ 0.967 11,121,012,276.5 β†’ 11,121,396,303 0.241 β†’ 0.241 403.0 β†’ 403.0
mui-docs check 2.395 β†’ 2.389 33,115,536,768 β†’ 33,118,330,515 0.955 β†’ 0.946 1230.8 β†’ 1234.2
mui-docs incremental 2.544 β†’ 2.548 34,454,925,578 β†’ 34,457,610,798 1.117 β†’ 1.135 1163.3 β†’ 1159.5
Compiler check 0.162 β†’ 0.167 1,776,130,742.5 β†’ 1,776,116,206.5 0.073 β†’ 0.074 77.8 β†’ 76.3
Compiler incremental 0.141 β†’ 0.140 1,788,933,828 β†’ 1,788,930,250.5 0.064 β†’ 0.064 79.6 β†’ 79.4
Compiler-Unions check 0.197 β†’ 0.199 3,054,114,407 β†’ 3,054,108,684.5 0.094 β†’ 0.094 81.6 β†’ 81.8
Compiler-Unions incremental 0.199 β†’ 0.199 3,065,952,656 β†’ 3,065,958,403.5 0.094 β†’ 0.095 84.9 β†’ 84.9
cal-diy check 2.805 β†’ 2.818 28,966,503,439 β†’ 28,967,767,039.5 0.840 β†’ 0.836 1352.2 β†’ 1359.0
cal-diy incremental 3.150 β†’ 3.168 30,585,490,092 β†’ 30,586,826,877 1.036 β†’ 1.034 1266.4 β†’ 1266.5
formbricks-web check 3.536 β†’ 3.432 37,099,797,866.5 β†’ 37,100,951,238.5 0.873 β†’ 0.878 1583.3 β†’ 1578.9
formbricks-web incremental 4.746 β†’ 4.785 39,699,519,379 β†’ 39,698,492,174.5 1.312 β†’ 1.286 1623.5 β†’ 1623.4
supabase-studio check 3.663 β†’ 3.656 40,828,843,167.5 β†’ 40,829,220,077.5 0.927 β†’ 0.908 1307.8 β†’ 1307.7
supabase-studio incremental 3.924 β†’ 3.927 43,777,170,454.5 β†’ 43,777,232,007 1.053 β†’ 1.043 1365.4 β†’ 1362.2
t3code-server check 4.110 β†’ 3.958 41,099,920,289 β†’ 41,099,962,179 1.663 β†’ 1.640 1455.9 β†’ 1449.1
t3code-server incremental 3.592 β†’ 3.588 41,620,544,844.5 β†’ 41,622,418,265 1.387 β†’ 1.391 1307.5 β†’ 1305.8
mikro-orm check 4.056 β†’ 4.058 44,550,856,399 β†’ 44,550,849,790 0.868 β†’ 0.861 1282.4 β†’ 1284.1
mikro-orm incremental 5.196 β†’ 5.041 44,861,877,097.5 β†’ 44,862,451,331.5 1.152 β†’ 1.150 1258.6 β†’ 1260.2
next-packages-next check 1.479 β†’ 1.484 17,406,254,062 β†’ 17,406,137,452 0.373 β†’ 0.374 558.9 β†’ 560.1
next-packages-next incremental 1.585 β†’ 1.548 17,731,722,172.5 β†’ 17,731,657,972 0.437 β†’ 0.433 563.2 β†’ 564.8
next-root check 1.163 β†’ 1.167 13,965,410,482 β†’ 13,965,414,284 0.256 β†’ 0.258 432.0 β†’ 430.6
next-root incremental 1.459 β†’ 1.476 14,426,837,502 β†’ 14,427,118,858 0.315 β†’ 0.316 471.5 β†’ 473.6
storybook check 0.818 β†’ 0.809 8,872,830,964.5 β†’ 8,872,825,762 0.213 β†’ 0.209 398.4 β†’ 396.8
storybook incremental 0.907 β†’ 0.852 9,198,294,994.5 β†’ 9,197,191,301 0.260 β†’ 0.257 375.5 β†’ 375.5
nuxt check 0.827 β†’ 0.823 8,503,715,842.5 β†’ 8,503,843,263.5 0.208 β†’ 0.209 391.0 β†’ 389.9
nuxt incremental 0.870 β†’ 0.866 8,905,482,803 β†’ 8,905,454,250 0.235 β†’ 0.229 392.4 β†’ 391.4
playwright check 0.679 β†’ 0.680 7,406,385,343 β†’ 7,406,458,313.5 0.180 β†’ 0.183 361.7 β†’ 364.0
playwright incremental 0.693 β†’ 0.691 7,579,444,332.5 β†’ 7,579,445,965 0.189 β†’ 0.192 339.4 β†’ 339.7
drizzle-orm check 0.518 β†’ 0.518 5,950,561,304.5 β†’ 5,950,555,643 0.174 β†’ 0.173 378.7 β†’ 378.3
drizzle-orm incremental 0.541 β†’ 0.538 6,121,838,496.5 β†’ 6,121,898,662 0.176 β†’ 0.176 344.7 β†’ 344.0
typeorm check 0.697 β†’ 0.673 6,398,469,614.5 β†’ 6,398,374,747.5 0.153 β†’ 0.156 225.8 β†’ 226.0
typeorm incremental 0.664 β†’ 0.659 6,775,513,183 β†’ 6,775,521,618.5 0.189 β†’ 0.184 233.1 β†’ 233.0
date-fns check 0.331 β†’ 0.332 3,356,388,114 β†’ 3,355,648,962.5 0.142 β†’ 0.137 152.0 β†’ 153.0
date-fns incremental 0.309 β†’ 0.309 3,592,590,045 β†’ 3,592,413,869.5 0.146 β†’ 0.147 162.5 β†’ 163.9

tsrs-lint

Release tsrs-lint linting each project's source files with all 61 rules. After a warmup run of each binary, alternating main/PR pairs (10 per mode) measure wall time, CPU time and peak RSS with TSRS_FAST unset and with TSRS_FAST=1.

Project Mode Wall time Ξ” CPU time Ξ” Peak RSS Ξ” Diagnostics (main β†’ PR)
webpack default 0.0% -1.2% +0.2% 37258, identical
webpack TSRS_FAST=1 +1.7% +0.9% +0.2% 37258, identical
drizzle-orm default +2.5% +0.1% 0.0% 7057, identical
drizzle-orm TSRS_FAST=1 +3.2% +2.7% -0.1% 7057, identical
xstate-main default -1.3% +1.5% -1.1% 6489, identical
xstate-main TSRS_FAST=1 +2.2% -2.2% -0.9% 6489, identical

Negative means the PR used less. Wall and CPU time deltas are medians of paired PR/main ratios; peak RSS compares medians.

Measured lint medians (main β†’ PR)
Project Mode Wall time (s) CPU time (s) Peak RSS (MiB)
webpack default 0.414 β†’ 0.410 2.138 β†’ 2.067 467.4 β†’ 468.3
webpack TSRS_FAST=1 0.400 β†’ 0.419 2.071 β†’ 2.127 466.6 β†’ 467.6
drizzle-orm default 0.270 β†’ 0.266 1.356 β†’ 1.360 403.0 β†’ 403.0
drizzle-orm TSRS_FAST=1 0.253 β†’ 0.266 1.321 β†’ 1.337 404.3 β†’ 403.8
xstate-main default 0.360 β†’ 0.360 1.564 β†’ 1.597 344.9 β†’ 341.3
xstate-main TSRS_FAST=1 0.352 β†’ 0.351 1.565 β†’ 1.526 342.6 β†’ 339.6

@codspeed

codspeed Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 4.19%

1 warning

⚠️ 4 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

❌ 1 regressed benchmark
βœ… 7 untouched benchmarks
⏩ 8 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Memory drizzle-orm 97.1 MB 101.4 MB -4.19%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix/lint-type-check-listed-files (138b08d) with main (e26d1ee)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@camc314
camc314 force-pushed the fix/lint-type-check-listed-files branch from ab16c08 to 138b08d Compare November 16, 2026 08:34
@camc314
camc314 enabled auto-merge November 16, 2026 08:34
@camc314
camc314 added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit e38b23a Nov 16, 2026
20 checks passed
@camc314
camc314 deleted the fix/lint-type-check-listed-files branch November 16, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants