Skip to content

fix(lint/no-meaningless-void-operator): report void on non-call expressions - #1071

Merged
camc314 merged 1 commit into
mainfrom
codex/no-meaningless-void-operator-non-call
Nov 23, 2026
Merged

camc314 merged 1 commit into
mainfrom
codex/no-meaningless-void-operator-non-call

Conversation

@camc314

@camc314 camc314 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Ports oxc-project/tsgolint#1375, which follows typescript-eslint/typescript-eslint#12727.

no-meaningless-void-operator now reports meaninglessVoidOnNonCall when void is applied to something other than a call:

function handler(): void {}
void handler;

This was previously accepted. Standalone expression statements get an autofix that removes void; assignments, void 0 and thenables remain allowed.

void removal fixes now keep the statement's syntax. Operands such as object literals and function expressions are wrapped, and a semicolon is inserted when ASI would join the result to the previous statement.

The rule baseline is refreshed from tsgolint bcdea900 with tools/tsgolint/export.mts --reference bcdea9002b3b5655d90e84b8fdb89d43305fabed. Unchanged cases keep their existing JSON layout to avoid churn from Go map-key ordering. A headless build of the same tsgolint commit also matches tsrs across all eight checkNever and fix-flag combinations for extra template, regex, decorator, async function, block and switch-clause removals.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 13:51

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 23, 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-23T13:53:19.395297Z 66bc126 PR opened
ℹ️ 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.

@codspeed

codspeed Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 3.6%

2 warnings

⚠️ 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 benchmark with a significant change ran on different hardware

Its base and head results were measured on machines with a different CPU, core count or memory, so the change might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

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.8 MB 101.4 MB -3.6%

Tip

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


Comparing codex/no-meaningless-void-operator-non-call (66bc126) with main (df951ec)

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 df951ec92d40 β†’ PR merge 9193be9a7cbc (head 66bc1267b417)

Clef gate: Running benchmarks because the decision was unavailable (crates/tsrs_lint/src/rules/no_meaningless_void_operator.rs: patch exceeds the Clef context limit (6535 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 +1.4% -0.001% +1.1% -0.3%
vscode incremental +0.1% 0.000% -2.6% 0.0%
xstate-main check -3.2% +0.001% -2.0% -0.5%
xstate-main incremental -0.9% +0.001% -1.4% +0.2%
webpack check +3.4% -0.001% -0.9% +0.5%
webpack incremental -0.4% +0.003% -4.1% -0.1%
mui-docs check -4.2% -0.006% -5.0% -0.9%
mui-docs incremental +0.1% -0.010% +1.5% -0.3%
Compiler check -4.0% 0.000% -1.5% +2.4%
Compiler incremental -3.7% +0.001% -2.8% -0.3%
Compiler-Unions check -6.5% -0.001% +1.6% +0.6%
Compiler-Unions incremental +6.1% 0.000% -0.9% 0.0%
cal-diy check -1.0% +0.001% -0.1% +0.2%
cal-diy incremental -0.7% +0.001% -0.5% 0.0%
formbricks-web check -0.1% 0.000% +1.2% -0.3%
formbricks-web incremental -0.7% +0.001% -1.5% 0.0%
supabase-studio check -1.1% +0.001% -1.4% -0.2%
supabase-studio incremental +2.7% -0.002% -1.2% -0.2%
t3code-server check -1.4% -0.005% +4.2% -0.8%
t3code-server incremental -0.4% 0.000% +0.7% +0.2%
mikro-orm check 0.0% 0.000% -0.6% -0.2%
mikro-orm incremental +0.1% 0.000% +1.0% +0.1%
next-packages-next check +0.9% +0.001% -1.6% -0.6%
next-packages-next incremental -0.5% +0.003% -2.5% -0.1%
next-root check -0.5% +0.002% -2.9% +0.8%
next-root incremental -7.0% -0.003% +11.9% +0.2%
storybook check -0.2% 0.000% -3.3% -0.1%
storybook incremental -2.9% +0.002% -1.3% 0.0%
nuxt check -0.2% 0.000% -1.2% -0.2%
nuxt incremental +0.2% -0.003% -2.1% -0.1%
playwright check +8.9% -0.001% -2.8% -0.4%
playwright incremental +0.8% 0.000% -0.1% 0.0%
drizzle-orm check +1.9% -0.006% +5.5% +0.7%
drizzle-orm incremental -1.3% +0.001% +2.9% +0.1%
typeorm check -0.4% +0.002% -3.5% +0.4%
typeorm incremental +4.6% -0.002% -0.1% -0.5%
date-fns check +2.0% +0.008% +0.4% -1.2%
date-fns incremental +4.5% +0.004% -2.3% +0.1%

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 11.609 β†’ 11.792 82,259,422,555 β†’ 82,258,902,256.5 1.788 β†’ 1.767 1844.6 β†’ 1838.5
vscode incremental 16.108 β†’ 15.766 84,675,503,362 β†’ 84,675,799,253 3.070 β†’ 2.938 2160.6 β†’ 2161.0
xstate-main check 0.950 β†’ 0.959 5,566,657,927.5 β†’ 5,566,696,557.5 0.276 β†’ 0.268 243.4 β†’ 242.1
xstate-main incremental 0.572 β†’ 0.574 5,728,361,311 β†’ 5,728,364,988 0.161 β†’ 0.160 244.7 β†’ 245.1
webpack check 1.293 β†’ 1.299 10,885,155,058 β†’ 10,884,856,444.5 0.217 β†’ 0.210 404.0 β†’ 406.2
webpack incremental 1.165 β†’ 1.198 11,108,616,279.5 β†’ 11,108,731,832 0.301 β†’ 0.283 403.0 β†’ 402.6
mui-docs check 4.125 β†’ 3.970 33,109,460,291 β†’ 33,105,150,708 1.676 β†’ 1.659 1231.2 β†’ 1219.6
mui-docs incremental 2.559 β†’ 2.565 34,463,092,615.5 β†’ 34,459,959,141 1.104 β†’ 1.119 1164.3 β†’ 1161.3
Compiler check 0.165 β†’ 0.159 1,775,528,169.5 β†’ 1,775,530,851 0.080 β†’ 0.078 76.0 β†’ 77.8
Compiler incremental 0.194 β†’ 0.190 1,789,924,419.5 β†’ 1,789,927,279.5 0.079 β†’ 0.078 79.9 β†’ 79.7
Compiler-Unions check 0.406 β†’ 0.408 3,053,242,647 β†’ 3,053,230,005 0.139 β†’ 0.145 81.5 β†’ 82.0
Compiler-Unions incremental 0.326 β†’ 0.344 3,064,767,851.5 β†’ 3,064,791,378 0.166 β†’ 0.169 85.0 β†’ 85.0
cal-diy check 3.298 β†’ 3.311 28,974,186,510.5 β†’ 28,974,498,595 0.971 β†’ 0.915 1360.2 β†’ 1363.6
cal-diy incremental 2.950 β†’ 2.929 30,594,644,885.5 β†’ 30,595,648,962 1.203 β†’ 1.210 1266.5 β†’ 1266.1
formbricks-web check 3.746 β†’ 3.953 37,085,620,192.5 β†’ 37,085,617,183 0.914 β†’ 0.914 1584.1 β†’ 1579.2
formbricks-web incremental 4.537 β†’ 4.596 39,690,324,414 β†’ 39,690,190,885 1.216 β†’ 1.207 1621.6 β†’ 1621.0
supabase-studio check 3.777 β†’ 3.722 40,822,248,678 β†’ 40,823,107,595 0.916 β†’ 0.912 1310.6 β†’ 1308.1
supabase-studio incremental 5.349 β†’ 5.226 43,769,491,847.5 β†’ 43,769,077,307 1.147 β†’ 1.123 1367.4 β†’ 1365.2
t3code-server check 4.928 β†’ 4.996 41,059,555,236.5 β†’ 41,058,692,406 1.839 β†’ 1.981 1458.3 β†’ 1447.2
t3code-server incremental 4.360 β†’ 4.339 41,581,239,377 β†’ 41,583,924,647.5 1.553 β†’ 1.555 1304.9 β†’ 1307.2
mikro-orm check 4.179 β†’ 4.160 44,485,757,837 β†’ 44,485,467,421.5 0.857 β†’ 0.856 1285.7 β†’ 1283.7
mikro-orm incremental 5.794 β†’ 5.613 44,796,057,888.5 β†’ 44,796,085,000 1.772 β†’ 1.778 1256.3 β†’ 1257.3
next-packages-next check 2.133 β†’ 2.098 17,404,874,215 β†’ 17,404,948,377.5 0.496 β†’ 0.470 560.8 β†’ 557.6
next-packages-next incremental 2.020 β†’ 2.004 17,731,291,139.5 β†’ 17,731,819,514 0.587 β†’ 0.594 564.5 β†’ 563.7
next-root check 1.731 β†’ 1.597 13,963,168,625 β†’ 13,963,369,642 0.326 β†’ 0.321 429.0 β†’ 432.3
next-root incremental 1.977 β†’ 1.598 14,425,971,156.5 β†’ 14,425,688,063 0.394 β†’ 0.442 473.6 β†’ 474.4
storybook check 1.023 β†’ 1.037 8,867,568,944.5 β†’ 8,867,606,061.5 0.227 β†’ 0.230 397.7 β†’ 397.3
storybook incremental 1.289 β†’ 1.307 9,192,758,986 β†’ 9,194,850,932.5 0.392 β†’ 0.380 374.6 β†’ 374.7
nuxt check 0.816 β†’ 0.817 8,501,690,263.5 β†’ 8,501,621,899 0.210 β†’ 0.211 390.5 β†’ 389.8
nuxt incremental 0.887 β†’ 0.891 8,904,204,789 β†’ 8,904,117,037 0.239 β†’ 0.235 392.0 β†’ 391.6
playwright check 0.840 β†’ 0.892 7,403,076,291 β†’ 7,402,933,369 0.246 β†’ 0.277 363.1 β†’ 361.8
playwright incremental 0.815 β†’ 0.828 7,576,422,297 β†’ 7,576,545,529.5 0.206 β†’ 0.212 339.5 β†’ 339.5
drizzle-orm check 0.673 β†’ 0.678 5,948,722,685.5 β†’ 5,948,471,552 0.201 β†’ 0.213 377.9 β†’ 380.7
drizzle-orm incremental 0.902 β†’ 0.867 6,120,083,746 β†’ 6,120,276,742 0.323 β†’ 0.336 346.4 β†’ 346.7
typeorm check 0.724 β†’ 0.726 6,392,818,355.5 β†’ 6,392,878,754.5 0.166 β†’ 0.165 225.9 β†’ 226.7
typeorm incremental 0.874 β†’ 0.882 6,770,578,767.5 β†’ 6,770,491,402 0.239 β†’ 0.233 233.8 β†’ 232.6
date-fns check 0.355 β†’ 0.358 3,348,678,405 β†’ 3,348,987,594 0.108 β†’ 0.110 153.2 β†’ 151.4
date-fns incremental 0.338 β†’ 0.346 3,586,558,470.5 β†’ 3,586,561,757 0.171 β†’ 0.165 163.6 β†’ 163.7

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 +5.4% +4.1% +0.1% 37258, identical
webpack TSRS_FAST=1 -0.1% +0.5% +0.4% 37258, identical
drizzle-orm default -1.2% -1.0% +0.1% 7057, identical
drizzle-orm TSRS_FAST=1 -2.2% +0.2% -0.1% 7057, identical
xstate-main default +2.3% +3.9% +1.0% 6489, identical
xstate-main TSRS_FAST=1 +6.7% +5.3% -0.2% 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.388 β†’ 0.418 2.004 β†’ 2.131 467.1 β†’ 467.5
webpack TSRS_FAST=1 0.390 β†’ 0.396 2.016 β†’ 2.030 466.9 β†’ 468.8
drizzle-orm default 0.245 β†’ 0.250 1.308 β†’ 1.290 403.9 β†’ 404.1
drizzle-orm TSRS_FAST=1 0.254 β†’ 0.246 1.342 β†’ 1.327 404.5 β†’ 404.0
xstate-main default 0.392 β†’ 0.393 1.727 β†’ 1.757 341.6 β†’ 345.0
xstate-main TSRS_FAST=1 0.384 β†’ 0.404 1.670 β†’ 1.716 345.3 β†’ 344.5

@camc314
camc314 added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit b3b1efc Nov 23, 2026
71 checks passed
@camc314
camc314 deleted the codex/no-meaningless-void-operator-non-call branch November 23, 2026 14:31
rjdellecese added a commit to rjdellecese/confect that referenced this pull request Dec 1, 2026
These versions complete the toolchain set in Effect's 0.74.1 support
table. tsrs5 changes two type-aware rules:

- `no-meaningless-void-operator` now rejects `void` on anything but a
  call (oxc-project/tsrs#1071). That flagged the `void x;` markers our
  type tests used to keep compile-time-only values "used".
- `no-unsafe-class-instance-assignment` is new (oxc-project/tsrs#1059).
  It rejects object literals cast to Convex validator classes and the
  `IndexRange` recording fixture.

Rewrite each marker in a form every rule accepts, without weakening the
check. Dropping `void` leaves bare expressions that
`no-unused-expressions` rejects. Bare QueryStream calls trip
`floating-effect`. `_`-prefixed bindings fail `noUnusedLocals`, and on
`@ts-expect-error` lines that unused-local error would satisfy the
directive by itself.

- A binding that existed only to hold an erroring call becomes
  `void call()`, with the directive still on the same line.
- `@ts-expect-error` property accesses become
  `expectTypeOf(…).not.toHaveProperty(…)`.
- Annotated assignability bindings become `toExtend`.
- The constructor check asserts `toBeInstanceOf`, and forced getters
  assert `toBeDefined`.
- Benchmark baseline expressions move into attest's `bench.baseline`.

Breaking each new type assertion fails typecheck, so they still
enforce their conditions.

Class-typed benchmark values and the fixture now cast through `unknown`.
That removes the `{}`-to-class comparison from the 32
`SchemaToValidator` type benchmarks, so their instantiation baselines are
re-recorded. Core baselines and the other server suites are unchanged.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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