-
-
Notifications
You must be signed in to change notification settings - Fork 733
refactor(linter/plugins): move placeholder replacement into own function #16302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(linter/plugins): move placeholder replacement into own function #16302
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
There was a problem hiding this 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
DiagnosticDatatype alias forRecord<string, string | number> - Updated type references in
DiagnosticBaseandSuggestionBaseto 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.
f0114a9 to
25da8e1
Compare
Merge activity
|
25da8e1 to
9de386d
Compare

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