Skip to content

refactor(linter/plugins): move and refactor handling legacy report call forms#19239

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/02-10-refactor_linter_plugins_move_and_refactor_handling_legacy_report_call_forms
Feb 11, 2026
Merged

refactor(linter/plugins): move and refactor handling legacy report call forms#19239
graphite-app[bot] merged 1 commit intomainfrom
om/02-10-refactor_linter_plugins_move_and_refactor_handling_legacy_report_call_forms

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 10, 2026

Follow on after #19193. Refactor.

That PR introduced support for legacy call styles for context.report.

Move that implementation into report.ts, shorten the code a little, and produce consistent object shapes. Avoid calling convertLegacyCallArgs in the common case that report is called in the modern way.

Copy link
Member Author


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.

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

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 10, 2026
@overlookmotel overlookmotel marked this pull request as ready for review February 10, 2026 21:45
Copilot AI review requested due to automatic review settings February 10, 2026 21:45
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

Refactors Oxlint’s JS plugin error reporting to centralize legacy context.report(...) positional-argument handling in plugins/report.ts, while keeping the modern single-descriptor call path fast.

Changes:

  • Moves legacy positional context.report(node, ...) argument normalization from context.ts into report.ts.
  • Updates Context#report to forward any extra positional args to the shared report(...) implementation.
  • Adds/updates inline documentation describing supported legacy call forms.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/oxlint/src-js/plugins/report.ts Adds legacy positional-args conversion and updates shared report(...) signature to accept extra args.
apps/oxlint/src-js/plugins/context.ts Simplifies context.report by forwarding extra args and removes the old normalization helper.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Feb 10, 2026
Copy link
Member Author

overlookmotel commented Feb 10, 2026

Merge activity

…call forms (#19239)

Follow on after #19193. Refactor.

That PR introduced support for legacy call styles for `context.report`.

Move that implementation into `report.ts`, shorten the code a little, and produce consistent object shapes. Avoid calling `convertLegacyCallArgs` in the common case that `report` is called in the modern way.
@graphite-app graphite-app bot force-pushed the om/02-10-refactor_linter_plugins_move_and_refactor_handling_legacy_report_call_forms branch from 7b19f2c to f33248d Compare February 10, 2026 23:55
@graphite-app graphite-app bot merged commit f33248d into main Feb 11, 2026
19 checks passed
@graphite-app graphite-app bot deleted the om/02-10-refactor_linter_plugins_move_and_refactor_handling_legacy_report_call_forms branch February 11, 2026 00:02
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 11, 2026
owjs3901 pushed a commit to owjs3901/oxc that referenced this pull request Feb 11, 2026
…call forms (oxc-project#19239)

Follow on after oxc-project#19193. Refactor.

That PR introduced support for legacy call styles for `context.report`.

Move that implementation into `report.ts`, shorten the code a little, and produce consistent object shapes. Avoid calling `convertLegacyCallArgs` in the common case that `report` is called in the modern way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants