Repository navigation
feat(lint/no-misused-promises): add flagUnions option for checksConditionals - #988
Conversation
There was a problem hiding this comment.
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.
Codex Review Summary: β CompletedThis comment shows the latest Codex review activity on this pull request.
βΉοΈ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with π while any review is running, comments if it has suggestions, and reacts with π once all reviews finish with no findings. |
flagUnions option for checksConditionals
Performance change vs mainWorkflow run Β· main Clef gate: Running benchmarks because the decision was unavailable (crates/tsrs_lint/src/rules/no_misused_promises.rs: patch exceeds the Clef context limit (4792 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.
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)
tsrs-lintRelease
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)
|
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
Summary
Ports oxc-project/tsgolint#1353:
checksConditionalsnow accepts either a boolean or{ flagUnions?: "none" | "strict" | "all" }, matching typescript-eslint 8.69.0."none"(default) keeps reporting only values that are always thenable."strict"reports unions such asPromise<T> | T, where the non-Promise members match the Promise's awaited type. It reports the example above."all"reports any union with a thenable member.Details
null, or invalidflagUnionsfalls back to"none".checksConditionalsnow turns the check on. tsrs used to reject it with an error.1ae4bbd5and gains the 26 upstreamflagUnionscases. The rest of the corpus keeps its existing pins.tools/tsgolint/export.mtsgains--reference <sha>for one-rule refreshes. It also warns when an exported rule's checked-inREFERENCEis pinned to a different commit, so a full re-export can't silently undo such a refresh.