Skip to content

Conversation

@arendjr
Copy link
Contributor

@arendjr arendjr commented May 19, 2025

Summary

Sometimes a statement resolves not just to Promise, but to Promise | undefined, or another union that includes a Promise. Such statements should be awaited too for proper handling, so noFloatingPromises will now trigger on those too.

Test Plan

Test case added.

@arendjr arendjr requested review from a team May 19, 2025 10:18
@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels May 19, 2025
Copy link
Member

@siketyan siketyan left a comment

Choose a reason for hiding this comment

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

Nice!

@arendjr arendjr moved this to In review in Type Inference May 19, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented May 19, 2025

CodSpeed Performance Report

Merging #6080 will not alter performance

Comparing arendjr:handle-maybe-promise (3f339ac) with main (64ca243)

Summary

✅ 94 untouched benchmarks
🆕 1 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 html_formatter[index_1033418810622582172.html] N/A 462.6 µs N/A

@arendjr arendjr merged commit ef0129e into biomejs:main May 19, 2025
13 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Type Inference May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter L-JavaScript Language: JavaScript and super languages

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants