Skip to content

fix(linter/plugins): support legacy context.report(node, ...) calls#19193

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/02-09-fix_linter_plugins_support_legacy_context.report_node_._calls
Feb 10, 2026
Merged

fix(linter/plugins): support legacy context.report(node, ...) calls#19193
graphite-app[bot] merged 1 commit intomainfrom
c/02-09-fix_linter_plugins_support_legacy_context.report_node_._calls

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Feb 9, 2026

fixes #19192

Copy link
Contributor Author

camc314 commented Feb 9, 2026


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-bug Category - Bug labels Feb 9, 2026
@camc314 camc314 marked this pull request as ready for review February 9, 2026 22:21
Copilot AI review requested due to automatic review settings February 9, 2026 22:21
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 addresses ESLint-compatibility for JS plugins by supporting the legacy context.report(node, ...) positional call signature, fixing failures like “Either message or messageId is required” reported in #19192.

Changes:

  • Normalize context.report() arguments to support legacy positional signatures and forward a descriptor to the shared reporter.
  • Add a new CLI fixture to validate legacy positional context.report(node, message) behavior end-to-end via snapshots.

Reviewed changes

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

Show a summary per file
File Description
apps/oxlint/src-js/plugins/context.ts Adds argument normalization so Context#report can accept legacy positional args and still call the shared report() with a descriptor.
apps/oxlint/test/fixtures/report_legacy_positional_args/plugin.ts Fixture plugin that calls context.report(node, message) using the legacy signature.
apps/oxlint/test/fixtures/report_legacy_positional_args/.oxlintrc.json Fixture config enabling the legacy-report rule.
apps/oxlint/test/fixtures/report_legacy_positional_args/files/index.js Minimal input file that triggers a DebuggerStatement.
apps/oxlint/test/fixtures/report_legacy_positional_args/output.snap.md Snapshot asserting expected CLI output from both built-in and plugin diagnostics.

@camc314 camc314 force-pushed the c/02-09-fix_linter_plugins_support_legacy_context.report_node_._calls branch from ac3c716 to 3136acd Compare February 9, 2026 22:28
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Feb 10, 2026
Copy link
Member

overlookmotel commented Feb 10, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the c/02-09-fix_linter_plugins_support_legacy_context.report_node_._calls branch from 3136acd to d07059c Compare February 10, 2026 09:50
@graphite-app graphite-app bot merged commit d07059c into main Feb 10, 2026
19 checks passed
@graphite-app graphite-app bot deleted the c/02-09-fix_linter_plugins_support_legacy_context.report_node_._calls branch February 10, 2026 09:57
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 10, 2026
graphite-app bot pushed a commit that referenced this pull request Feb 10, 2026
…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.
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.
OskarLebuda pushed a commit to OskarLebuda/oxc that referenced this pull request Feb 17, 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-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: no-extraneous-dependencies doesn't work in js-plugins

2 participants

Comments