Skip to content

fix(lint/no-unnecessary-type-arguments): skip instantiation expressions - #1159

Merged
camc314 merged 1 commit into
fix/lint-no-unnecessary-type-arguments-1407from
fix/lint-no-unnecessary-type-arguments-1408
Nov 30, 2026
Merged

camc314 merged 1 commit into
fix/lint-no-unnecessary-type-arguments-1407from
fix/lint-no-unnecessary-type-arguments-1408

Conversation

@camc314

@camc314 camc314 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Ports oxc-project/tsgolint#1408 (c03595f3), including its baseline update.

Instantiation expressions such as Box<string> are ExpressionWithTypeArguments nodes, like heritage clause elements, so the rule removed type arguments that matched the defaults. That widens the result, because Box without type arguments is the generic value itself. typescript-eslint skips TSInstantiationExpression, and the rule now only checks ExpressionWithTypeArguments inside a heritage clause.

class Box<T = string> {
  constructor(readonly value: T) {}
}
export const StringBox = Box<string>; // was fixed to `Box`, which accepts any T

Copilot AI balanced review requested due to automatic review settings November 30, 2026 11:55

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.

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 30, 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-30T13:00:42.304370Z 11e3780 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.

@camc314
camc314 added this pull request to stack #1163 November 30, 2026 11:56
@camc314
camc314 enabled stacked auto-merge November 30, 2026 12:00
@camc314
camc314 added this pull request to the merge queue Nov 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because the pull requests in the stack were not ordered correctly in the queue Nov 30, 2026
@camc314
camc314 added this pull request to the merge queue Nov 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because the pull requests in the stack were not ordered correctly in the queue Nov 30, 2026
@camc314
camc314 added this pull request to the merge queue Nov 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because the pull requests in the stack were not ordered correctly in the queue Nov 30, 2026
@camc314
camc314 force-pushed the fix/lint-no-unnecessary-type-arguments-1408 branch from a5049b0 to 11e3780 Compare November 30, 2026 12:59
@codspeed

codspeed Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

Warning

oxc-project has exceeded the Hobby plan limit of 5 active contributors. Upgrade your plan or apply to the open source program by December 8, 2026 to keep using CodSpeed.

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

βœ… 8 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing fix/lint-no-unnecessary-type-arguments-1408 (11e3780) with fix/lint-no-unnecessary-type-arguments-1407 (dcfde86)

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. ↩

@github-actions

Copy link
Copy Markdown
Contributor

Performance change vs main

Workflow run Β· main dcfde86816cb β†’ PR merge 0fd03d75be4f (head 11e3780055df)

Clef gate: Clef estimated 17.8% default and single-threaded wall time, 11.8% peak RSS, 17.7% single-threaded instruction count impact probability.

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 failed β€” β€” β€”
vscode incremental +1.6% 0.000% +0.4% 0.0%
xstate-main check +0.6% +0.001% -1.0% +0.2%
xstate-main incremental -1.1% +0.002% -1.8% -0.4%
webpack check -0.5% -0.002% -1.2% +0.1%
webpack incremental -0.1% -0.001% -1.1% +0.1%
mui-docs check +1.1% +0.003% -7.2% -2.2%
mui-docs incremental -0.5% -0.010% -0.7% 0.0%
Compiler check +0.4% 0.000% -0.3% +2.0%
Compiler incremental +0.6% +0.001% +0.1% -2.4%
Compiler-Unions check -0.4% 0.000% +1.0% -0.3%
Compiler-Unions incremental +3.0% 0.000% +5.0% -0.4%
cal-diy check +3.0% 0.000% 0.0% -1.2%
cal-diy incremental +0.6% 0.000% -0.2% +0.1%
formbricks-web check +0.6% 0.000% -0.3% 0.0%
formbricks-web incremental +2.8% +0.003% +2.5% 0.0%
supabase-studio check +1.8% +0.003% -0.1% -0.2%
supabase-studio incremental -1.3% -0.002% +1.6% 0.0%
t3code-server check -0.7% -0.001% -0.3% -0.3%
t3code-server incremental -0.6% +0.005% -0.6% -0.1%
mikro-orm check -0.8% +0.002% 0.0% +0.3%
mikro-orm incremental +0.1% +0.003% -0.1% +0.1%
next-packages-next check -1.0% -0.001% -1.1% -0.4%
next-packages-next incremental +0.7% 0.000% -1.1% 0.0%
next-root check -1.9% -0.001% -0.8% -0.3%
next-root incremental failed β€” β€” β€”
storybook check -1.0% 0.000% +0.1% -1.2%
storybook incremental failed β€” β€” β€”
nuxt check failed β€” β€” β€”
nuxt incremental failed β€” β€” β€”
playwright check -0.4% +0.002% +6.0% +0.5%
playwright incremental failed β€” β€” β€”
drizzle-orm check -0.7% -0.002% -0.9% -0.5%
drizzle-orm incremental +0.8% +0.005% +0.3% +0.1%
typeorm check failed β€” β€” β€”
typeorm incremental -0.8% -0.003% +0.9% +0.5%
date-fns check failed β€” β€” β€”
date-fns incremental failed β€” β€” β€”
opencode-core check +0.6% -0.017% +0.8% +2.9%
opencode-core incremental -1.3% -0.003% 0.0% -0.1%
lobehub check failed β€” β€” β€”
lobehub incremental failed β€” β€” β€”
sentry check failed β€” β€” β€”
sentry incremental failed β€” β€” β€”

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.
Measurements missing or invalid on: vscode (check), next-root (incremental), storybook (incremental), nuxt (check), nuxt (incremental), playwright (incremental), typeorm (check), date-fns (check), date-fns (incremental), lobehub (check), lobehub (incremental), sentry (check), sentry (incremental). See the workflow run for errors.

Measured medians (main β†’ PR)
Project Mode Single-thread wall time (s) Single-thread instructions Default wall time (s) Default peak RSS (MiB)
vscode incremental 11.153 β†’ 11.407 84,217,532,503 β†’ 84,217,577,692 1.873 β†’ 1.859 2123.7 β†’ 2123.9
xstate-main check 0.572 β†’ 0.572 5,520,569,158 β†’ 5,520,608,782.5 0.137 β†’ 0.136 240.7 β†’ 241.1
xstate-main incremental 0.555 β†’ 0.551 5,679,390,042 β†’ 5,679,478,605 0.181 β†’ 0.179 241.3 β†’ 240.4
webpack check 0.918 β†’ 0.912 10,759,991,351 β†’ 10,759,927,050.5 0.199 β†’ 0.199 400.2 β†’ 400.6
webpack incremental 0.952 β†’ 0.953 10,980,438,400.5 β†’ 10,980,237,694.5 0.242 β†’ 0.241 399.7 β†’ 400.3
mui-docs check 2.799 β†’ 2.909 32,888,734,367.5 β†’ 32,889,723,148 1.091 β†’ 1.031 1210.6 β†’ 1184.5
mui-docs incremental 2.551 β†’ 2.532 34,223,366,100 β†’ 34,219,499,801 1.098 β†’ 1.093 1139.6 β†’ 1139.8
Compiler check 0.139 β†’ 0.140 1,745,218,053 β†’ 1,745,224,958 0.061 β†’ 0.062 75.9 β†’ 77.4
Compiler incremental 0.193 β†’ 0.195 1,759,507,462 β†’ 1,759,521,199.5 0.085 β†’ 0.085 80.3 β†’ 78.4
Compiler-Unions check 0.207 β†’ 0.207 3,014,345,694.5 β†’ 3,014,356,640 0.097 β†’ 0.099 80.4 β†’ 80.1
Compiler-Unions incremental 0.249 β†’ 0.256 3,026,962,044 β†’ 3,026,964,455.5 0.112 β†’ 0.119 83.6 β†’ 83.3
cal-diy check 4.607 β†’ 4.817 28,707,170,541.5 β†’ 28,706,866,652 0.935 β†’ 0.981 1341.6 β†’ 1325.2
cal-diy incremental 2.713 β†’ 2.732 30,308,747,156 β†’ 30,307,683,776 1.021 β†’ 1.022 1246.6 β†’ 1247.5
formbricks-web check 3.341 β†’ 3.363 36,892,144,116 β†’ 36,892,107,098.5 0.854 β†’ 0.850 1558.7 β†’ 1558.3
formbricks-web incremental 5.073 β†’ 5.081 39,474,780,873.5 β†’ 39,475,807,520.5 1.350 β†’ 1.386 1600.6 β†’ 1600.8
supabase-studio check 3.641 β†’ 3.872 40,540,200,627.5 β†’ 40,541,228,095 0.890 β†’ 0.885 1289.2 β†’ 1286.5
supabase-studio incremental 5.524 β†’ 5.469 43,471,508,530 β†’ 43,469,945,443.5 1.183 β†’ 1.231 1342.3 β†’ 1342.7
t3code-server check 4.976 β†’ 4.603 40,782,064,047 β†’ 40,781,278,661.5 1.236 β†’ 1.232 1303.2 β†’ 1299.3
t3code-server incremental 4.696 β†’ 4.473 41,288,178,771 β†’ 41,290,670,163 1.529 β†’ 1.537 1292.4 β†’ 1290.9
mikro-orm check 4.773 β†’ 4.641 44,047,607,218 β†’ 44,047,552,090.5 0.835 β†’ 0.839 1255.9 β†’ 1259.1
mikro-orm incremental 4.216 β†’ 4.157 44,355,580,810.5 β†’ 44,356,465,413 0.967 β†’ 0.963 1237.0 β†’ 1238.2
next-packages-next check 1.554 β†’ 1.547 17,278,088,837.5 β†’ 17,277,911,533.5 0.407 β†’ 0.402 552.6 β†’ 550.5
next-packages-next incremental 1.738 β†’ 1.725 17,589,128,129.5 β†’ 17,589,003,037.5 0.482 β†’ 0.476 555.2 β†’ 555.1
next-root check 1.871 β†’ 1.793 13,893,694,054.5 β†’ 13,893,502,168.5 0.371 β†’ 0.373 426.8 β†’ 425.7
storybook check 1.060 β†’ 1.128 8,812,965,070.5 β†’ 8,812,976,141 0.234 β†’ 0.239 391.9 β†’ 387.1
playwright check 0.951 β†’ 0.954 7,363,087,317.5 β†’ 7,363,237,904 0.231 β†’ 0.237 355.0 β†’ 356.8
drizzle-orm check 0.509 β†’ 0.507 5,907,125,353 β†’ 5,907,131,421.5 0.172 β†’ 0.170 377.2 β†’ 375.1
drizzle-orm incremental 0.673 β†’ 0.688 6,075,876,491.5 β†’ 6,076,097,121 0.196 β†’ 0.197 341.2 β†’ 341.5
typeorm incremental 0.709 β†’ 0.692 6,728,625,904 β†’ 6,728,639,899.5 0.176 β†’ 0.178 229.5 β†’ 230.6
opencode-core check 2.496 β†’ 2.484 25,113,335,666 β†’ 25,108,205,987 1.662 β†’ 1.648 1179.8 β†’ 1214.1
opencode-core incremental 2.302 β†’ 2.247 25,468,558,737.5 β†’ 25,467,942,952.5 1.101 β†’ 1.099 1090.9 β†’ 1090.3

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.2% -0.3% 0.0% 35406, identical
webpack TSRS_FAST=1 -1.5% -2.3% 0.0% 35406, identical
drizzle-orm default -1.7% -1.2% +0.1% 7055, identical
drizzle-orm TSRS_FAST=1 +0.9% +0.3% +0.1% 7055, identical
xstate-main default +0.8% -1.0% -0.1% 6489, identical
xstate-main TSRS_FAST=1 -1.0% +0.4% +0.7% 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.401 β†’ 0.403 2.077 β†’ 2.068 454.2 β†’ 454.1
webpack TSRS_FAST=1 0.396 β†’ 0.386 2.058 β†’ 1.975 454.4 β†’ 454.3
drizzle-orm default 0.230 β†’ 0.220 1.192 β†’ 1.184 392.4 β†’ 392.9
drizzle-orm TSRS_FAST=1 0.232 β†’ 0.234 1.230 β†’ 1.233 392.8 β†’ 393.2
xstate-main default 0.343 β†’ 0.344 1.526 β†’ 1.494 336.5 β†’ 336.1
xstate-main TSRS_FAST=1 0.350 β†’ 0.339 1.539 β†’ 1.514 336.1 β†’ 338.5

@camc314
camc314 added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 2bed5d1 Nov 30, 2026
64 of 77 checks passed
@camc314
camc314 deleted the fix/lint-no-unnecessary-type-arguments-1408 branch November 30, 2026 14:55
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