Skip to content

fix(lint/no-floating-promises): skip parentheses around nested operands - #1144

Merged
camc314 merged 1 commit into
mainfrom
fix/lint-no-floating-promises-parenthesized
Nov 29, 2026
Merged

camc314 merged 1 commit into
mainfrom
fix/lint-no-floating-promises-parenthesized

Conversation

@camc314

@camc314 camc314 commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Ports oxc-project/tsgolint#1399 to tsrs.

is_unhandled_promise recursed into the operands of &&, ||, ??, comma and conditional expressions without stripping parentheses. A parenthesized operand was checked as a ParenthesizedExpression rather than the expression inside it. That gave a false positive for a handled promise and a false negative for a floating one:

declare const flag: boolean;
declare const p: Promise<void>;

flag && (p.catch(() => {})); // was reported, now valid

// with `ignoreVoid: false`
void (p, 0); // was not reported, now reported

Skip parentheses at the start of is_unhandled_promise, matching tsgolint 1696fe03. This refreshes the rule baseline to that commit and adds the upstream cases.

Copilot AI balanced review requested due to automatic review settings November 29, 2026 16: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 29, 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-29T16:59:36.055369Z ffeb822 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 force-pushed the fix/lint-no-floating-promises-parenthesized branch from 7f2f57e to ffeb822 Compare November 29, 2026 16:58
@camc314
camc314 enabled auto-merge November 29, 2026 16:59
@camc314
camc314 added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit c854fdd Nov 29, 2026
75 checks passed
@camc314
camc314 deleted the fix/lint-no-floating-promises-parenthesized branch November 29, 2026 17:18
@codspeed

codspeed Bot commented Nov 29, 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-floating-promises-parenthesized (ffeb822) with main (9288309)

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 928830964de5 → PR merge 92785193b5c3 (head ffeb8228dd6e)

Clef gate: Clef estimated 20.6% default and single-threaded wall time, 15.8% peak RSS, 26.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 0.0% 0.000% +0.5% +0.2%
vscode incremental -0.2% -0.002% -1.1% +0.2%
xstate-main check 0.0% -0.001% +0.1% +0.3%
xstate-main incremental -0.5% 0.000% +1.7% -0.7%
webpack check +0.4% 0.000% +0.1% -0.1%
webpack incremental -0.3% -0.002% -0.8% +0.1%
mui-docs check -0.1% 0.000% -0.7% 0.0%
mui-docs incremental -0.1% +0.004% -1.0% +0.2%
Compiler check -0.7% 0.000% +0.2% +0.1%
Compiler incremental +1.1% 0.000% -0.6% -0.2%
Compiler-Unions check -1.3% 0.000% -1.6% -0.2%
Compiler-Unions incremental 0.0% 0.000% -0.4% -0.1%
cal-diy check -0.2% 0.000% +0.6% +0.7%
cal-diy incremental -0.1% +0.004% -1.0% +0.1%
formbricks-web check -0.1% -0.001% -0.7% -0.2%
formbricks-web incremental 0.0% -0.001% 0.0% 0.0%
supabase-studio check +0.2% +0.004% +1.0% 0.0%
supabase-studio incremental -0.3% -0.003% +0.3% 0.0%
t3code-server check 0.0% 0.000% +0.5% -0.1%
t3code-server incremental +0.2% -0.005% +0.7% -0.2%
mikro-orm check -0.2% 0.000% -0.7% +0.3%
mikro-orm incremental +0.5% 0.000% +0.3% 0.0%
next-packages-next check +0.5% -0.002% -1.5% -0.1%
next-packages-next incremental -0.2% +0.001% -2.6% +0.1%
next-root check -0.1% 0.000% -0.5% -0.6%
next-root incremental -0.1% -0.001% -0.4% -0.2%
storybook check +0.2% +0.001% -2.3% -0.4%
storybook incremental -0.1% +0.001% -2.0% -0.3%
nuxt check -0.6% +0.001% -0.9% +0.2%
nuxt incremental +0.3% -0.001% -1.7% +0.2%
playwright check -0.2% -0.001% +0.8% +0.1%
playwright incremental +0.6% 0.000% +0.8% -0.4%
drizzle-orm check -0.8% +0.001% -3.8% -1.3%
drizzle-orm incremental -0.3% -0.001% -0.2% +0.2%
typeorm check -0.1% -0.002% +1.1% +0.4%
typeorm incremental -0.7% 0.000% +5.0% -0.4%
date-fns check +0.2% +0.003% -0.8% -0.9%
date-fns incremental -0.6% -0.001% -2.3% +0.2%
opencode-core check +0.3% -0.005% +0.1% -0.2%
opencode-core incremental +0.5% 0.000% -1.2% 0.0%
lobehub check -0.1% +0.003% +0.1% -0.1%
lobehub incremental -0.4% -0.004% 0.0% 0.0%
sentry check -0.1% -0.003% -0.6% +0.2%
sentry incremental +0.4% -0.005% -0.8% +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 9.133 → 9.142 81,815,613,840 → 81,815,445,298 1.584 → 1.593 1800.8 → 1804.9
vscode incremental 8.535 → 8.513 84,219,787,127.5 → 84,217,824,207.5 1.656 → 1.639 2121.6 → 2125.4
xstate-main check 0.507 → 0.506 5,520,624,314.5 → 5,520,590,934.5 0.126 → 0.125 240.0 → 240.6
xstate-main incremental 0.579 → 0.577 5,679,383,805.5 → 5,679,367,237 0.180 → 0.182 241.8 → 240.2
webpack check 0.902 → 0.907 10,759,945,427 → 10,759,845,122 0.195 → 0.199 401.3 → 401.0
webpack incremental 0.942 → 0.941 10,980,356,732.5 → 10,980,170,341.5 0.244 → 0.242 398.5 → 398.7
mui-docs check 2.370 → 2.369 32,890,311,656 → 32,889,846,277 0.946 → 0.929 1183.1 → 1183.4
mui-docs incremental 2.565 → 2.561 34,220,985,971 → 34,222,444,553.5 1.134 → 1.124 1140.3 → 1142.5
Compiler check 0.144 → 0.142 1,745,217,895 → 1,745,218,409.5 0.065 → 0.065 77.2 → 77.3
Compiler incremental 0.141 → 0.141 1,759,526,210.5 → 1,759,526,769 0.065 → 0.064 78.6 → 78.4
Compiler-Unions check 0.198 → 0.196 3,014,346,923.5 → 3,014,346,117 0.095 → 0.093 80.6 → 80.4
Compiler-Unions incremental 0.195 → 0.195 3,026,955,249.5 → 3,026,959,946.5 0.093 → 0.094 83.7 → 83.6
cal-diy check 2.567 → 2.562 28,707,214,898.5 → 28,707,020,267.5 0.811 → 0.815 1329.1 → 1337.8
cal-diy incremental 2.734 → 2.724 30,308,051,012 → 30,309,175,131 1.028 → 1.018 1245.7 → 1247.0
formbricks-web check 3.393 → 3.392 36,892,732,076.5 → 36,891,822,957.5 0.874 → 0.867 1559.3 → 1556.8
formbricks-web incremental 3.619 → 3.629 39,474,538,764.5 → 39,474,670,050.5 1.105 → 1.110 1601.4 → 1601.7
supabase-studio check 3.592 → 3.604 40,539,582,101.5 → 40,540,974,272 0.893 → 0.900 1287.2 → 1286.9
supabase-studio incremental 3.871 → 3.859 43,471,370,633.5 → 43,470,980,703.5 1.043 → 1.051 1342.5 → 1342.8
t3code-server check 3.811 → 3.809 40,781,784,835 → 40,781,641,739 1.247 → 1.251 1301.2 → 1300.4
t3code-server incremental 3.547 → 3.551 41,291,184,364 → 41,289,505,639 1.380 → 1.396 1295.0 → 1292.8
mikro-orm check 4.423 → 4.415 44,047,492,982 → 44,047,435,806.5 0.835 → 0.833 1255.1 → 1258.5
mikro-orm incremental 3.979 → 3.993 44,355,988,512.5 → 44,356,158,531 0.936 → 0.935 1237.5 → 1237.2
next-packages-next check 1.450 → 1.457 17,278,105,420 → 17,277,773,097.5 0.363 → 0.360 552.0 → 551.4
next-packages-next incremental 1.479 → 1.475 17,588,962,884.5 → 17,589,296,242 0.441 → 0.427 555.5 → 555.9
next-root check 1.179 → 1.179 13,893,397,408.5 → 13,893,528,837.5 0.260 → 0.261 428.9 → 426.5
next-root incremental 1.206 → 1.208 14,350,331,089.5 → 14,350,158,843.5 0.310 → 0.308 467.9 → 467.0
storybook check 0.763 → 0.765 8,812,886,248.5 → 8,812,976,600.5 0.198 → 0.196 391.2 → 389.6
storybook incremental 0.794 → 0.792 9,132,240,660.5 → 9,132,357,521.5 0.240 → 0.234 368.7 → 367.7
nuxt check 0.866 → 0.860 8,428,859,088.5 → 8,428,861,486.5 0.232 → 0.234 384.2 → 384.9
nuxt incremental 0.859 → 0.860 8,824,851,718.5 → 8,824,772,945.5 0.231 → 0.224 383.6 → 384.5
playwright check 0.669 → 0.668 7,363,134,681.5 → 7,363,133,137.5 0.173 → 0.173 357.2 → 357.7
playwright incremental 0.699 → 0.706 7,539,500,264 → 7,539,525,204.5 0.197 → 0.196 337.9 → 336.5
drizzle-orm check 0.519 → 0.516 5,907,159,296.5 → 5,907,201,530 0.173 → 0.169 376.1 → 371.1
drizzle-orm incremental 0.534 → 0.533 6,075,883,800.5 → 6,075,911,941 0.178 → 0.176 340.3 → 340.9
typeorm check 0.580 → 0.578 6,344,466,374 → 6,344,360,754 0.131 → 0.134 223.4 → 224.3
typeorm incremental 0.640 → 0.639 6,728,627,715.5 → 6,728,597,092.5 0.171 → 0.183 230.8 → 229.9
date-fns check 0.266 → 0.267 3,297,181,562.5 → 3,297,276,850.5 0.084 → 0.080 151.0 → 149.6
date-fns incremental 0.303 → 0.302 3,530,280,285 → 3,530,180,575.5 0.101 → 0.099 161.6 → 161.9
opencode-core check 2.070 → 2.077 25,110,058,089.5 → 25,109,008,111 1.059 → 1.071 1184.7 → 1182.8
opencode-core incremental 2.125 → 2.135 25,468,319,933 → 25,468,274,799.5 1.075 → 1.066 1091.1 → 1091.0
lobehub check 16.627 → 16.618 185,331,680,739 → 185,338,165,413 5.576 → 5.567 4383.2 → 4377.6
lobehub incremental 17.526 → 17.445 188,896,050,319.5 → 188,890,828,085.5 7.165 → 7.154 4430.5 → 4429.1
sentry check 7.670 → 7.670 91,311,385,019.5 → 91,307,529,046.5 1.710 → 1.700 1751.1 → 1754.9
sentry incremental 7.941 → 7.962 93,274,365,063 → 93,268,307,676 2.074 → 2.063 1894.3 → 1896.5

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 +1.2% +0.2% -0.1% 35405, identical
webpack TSRS_FAST=1 +2.2% +0.8% 0.0% 35405, identical
drizzle-orm default +0.7% 0.0% 0.0% 7057, identical
drizzle-orm TSRS_FAST=1 +0.4% +0.1% +0.1% 7057, identical
xstate-main default +1.0% +1.1% 0.0% 6489, identical
xstate-main TSRS_FAST=1 -0.3% -0.9% +0.6% 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.355 → 0.359 1.838 → 1.852 454.8 → 454.4
webpack TSRS_FAST=1 0.355 → 0.359 1.839 → 1.855 454.9 → 454.8
drizzle-orm default 0.216 → 0.218 1.174 → 1.168 392.8 → 392.8
drizzle-orm TSRS_FAST=1 0.217 → 0.219 1.167 → 1.165 392.7 → 393.1
xstate-main default 0.312 → 0.312 1.365 → 1.377 338.4 → 338.3
xstate-main TSRS_FAST=1 0.314 → 0.312 1.384 → 1.369 335.7 → 337.7

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