Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 30, 2025

Pure refactor. Move message placeholder replacement into its own function, so it can also be used by rule tester (#16206).

@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 Nov 30, 2025
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.

@overlookmotel overlookmotel marked this pull request as ready for review November 30, 2025 19:06
Copilot AI review requested due to automatic review settings November 30, 2025 19:06
@overlookmotel overlookmotel self-assigned this Nov 30, 2025
@overlookmotel overlookmotel marked this pull request as draft November 30, 2025 19:07
Copilot finished reviewing on behalf of overlookmotel November 30, 2025 19:08
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 performs a clean refactoring that extracts placeholder replacement logic into a dedicated function to enable reuse by the rule tester (issue #16206). The refactoring introduces a new exported DiagnosticData type and consolidates the placeholder interpolation logic.

Key changes:

  • Extracted inline placeholder replacement code into a separate replacePlaceholders() helper function
  • Introduced and exported DiagnosticData type alias for Record<string, string | number>
  • Updated type references in DiagnosticBase and SuggestionBase to use the new type alias

Reviewed changes

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

File Description
apps/oxlint/src-js/plugins/report.ts Extracts placeholder replacement into replacePlaceholders() function; introduces and exports DiagnosticData type; updates type references to use the new type alias
apps/oxlint/src-js/index.ts Exports the new DiagnosticData type alongside existing Diagnostic and Suggestion types

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

@overlookmotel overlookmotel force-pushed the 11-30-refactor_linter_plugins_move_placeholder_replacement_into_own_function branch from f0114a9 to 25da8e1 Compare November 30, 2025 23:16
@overlookmotel overlookmotel marked this pull request as ready for review November 30, 2025 23:17
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 30, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 30, 2025

Merge activity

…ion (#16302)

Pure refactor. Move placeholder replacement into it's own function, so it can also be used by rule tester (#16206).
@graphite-app graphite-app bot force-pushed the 11-30-refactor_linter_plugins_move_placeholder_replacement_into_own_function branch from 25da8e1 to 9de386d Compare November 30, 2025 23:51
@graphite-app graphite-app bot merged commit 9de386d into main Nov 30, 2025
18 checks passed
@graphite-app graphite-app bot deleted the 11-30-refactor_linter_plugins_move_placeholder_replacement_into_own_function branch November 30, 2025 23:56
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 30, 2025
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.

2 participants