Skip to content

Conversation

@Kenzo-Wada
Copy link
Contributor

fixes: #12026

Hi, oxc team!
I'm new to oxc, so if there are any rules or guidelines I should know about, please let me know.

@Kenzo-Wada Kenzo-Wada requested a review from camc314 as a code owner September 27, 2025 16:55
Copilot AI review requested due to automatic review settings September 27, 2025 16:55
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 27, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Sep 27, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a false positive in the require_post_message_target_origin linter rule where it was incorrectly flagging postMessage calls on MessagePort objects, which don't require a targetOrigin argument unlike window.postMessage.

  • Adds detection logic to identify MessagePort expressions and exclude them from the linter rule
  • Introduces a new helper function is_message_port_expression to check for various MessagePort patterns
  • Updates test cases to verify the fix works for different MessagePort usage patterns

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@overlookmotel overlookmotel changed the title fix(linter/plugins): postmessage is not called on window (#12026) fix(linter): postmessage is not called on window (#12026) Sep 28, 2025
@camc314 camc314 self-assigned this Oct 6, 2025
@camc314 camc314 changed the title fix(linter): postmessage is not called on window (#12026) fix(linter): postmessage is not called on window Oct 22, 2025
Kenzo-Wada and others added 3 commits October 22, 2025 12:09
…t_origin.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kenzo Wada <79452224+Kenzo-Wada@users.noreply.github.com>
@camc314 camc314 force-pushed the fix/unicorn-linter-postmessage branch from c921d4f to 8057875 Compare October 22, 2025 11:09
@camc314 camc314 merged commit 831974f into oxc-project:main Oct 22, 2025
19 checks passed
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 22, 2025

CodSpeed Performance Report

Merging #14192 will not alter performance

Comparing Kenzo-Wada:fix/unicorn-linter-postmessage (8057875) with main (3f1c3c7)

Summary

✅ 4 untouched
⏩ 33 skipped1

Footnotes

  1. 33 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.

@Kenzo-Wada Kenzo-Wada deleted the fix/unicorn-linter-postmessage branch October 22, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive for eslint-plugin-unicorn(require-post-message-target-origin)

2 participants