Skip to content

fix(no-meaningless-void-operator): align with typescript-eslint union handling#887

Merged
graphite-app[bot] merged 1 commit into
mainfrom
c/04-13-fix_no-meaningless-void-operator_align_with_typescript-eslint_union_handling
Apr 13, 2026
Merged

fix(no-meaningless-void-operator): align with typescript-eslint union handling#887
graphite-app[bot] merged 1 commit into
mainfrom
c/04-13-fix_no-meaningless-void-operator_align_with_typescript-eslint_union_handling

Conversation

@camc314

@camc314 camc314 commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

@camc314 camc314 marked this pull request as ready for review April 13, 2026 11:11
Copilot AI review requested due to automatic review settings April 13, 2026 11:11

camc314 commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

How to use the Graphite Merge Queue

Add the label 0-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

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.

Pull request overview

Adjusts no-meaningless-void-operator type analysis to match typescript-eslint behavior when the void operand has a union type, fixing a reported mismatch (oxc-project/oxc#21373).

Changes:

  • Replaces flag-intersection masking with explicit “all union constituents are void-like” / “all constituents are void-like or never” checks.
  • Adds a regression test covering optional chaining returning a void | undefined union.
  • Updates the corresponding rule-tester snapshot output.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/rules/no_meaningless_void_operator/no_meaningless_void_operator.go Updates union handling logic to use Every + IsTypeFlagSet checks instead of flag intersection.
internal/rules/no_meaningless_void_operator/no_meaningless_void_operator_test.go Adds an invalid case for void foo?.() where the call returns `void
internal/rule_tester/snapshots/no-meaningless-void-operator.snap Records the new expected diagnostic for the added test case.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

camc314 commented Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

@graphite-app graphite-app Bot force-pushed the c/04-13-fix_no-meaningless-void-operator_align_with_typescript-eslint_union_handling branch from 7951b2f to 6dcc81a Compare April 13, 2026 11:25
@graphite-app graphite-app Bot merged commit 6dcc81a into main Apr 13, 2026
8 checks passed
@graphite-app graphite-app Bot removed the 0-merge label Apr 13, 2026
@graphite-app graphite-app Bot deleted the c/04-13-fix_no-meaningless-void-operator_align_with_typescript-eslint_union_handling branch April 13, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: typescript/no-meaningless-void-operator doesn't check possibly undefined result

2 participants