-
-
Notifications
You must be signed in to change notification settings - Fork 719
refactor(linter/plugins): move comments-related code into separate file #14753
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 comments-related code into separate file #14753
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 refactors the SourceCode implementation by extracting comment-related methods into a separate comments.ts file. The functionality remains unchanged - this is purely a code organization improvement.
Key changes:
- Created new
comments.tsfile to house all comment-related functions - Converted
SourceCodemethods to standalone exported functions - Updated
source_code.tsto import and re-export these functions
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/source_code.ts | Removed comment-related method implementations and replaced with imports/re-exports from new comments module |
| apps/oxlint/src-js/plugins/comments.ts | New file containing all comment-related functions extracted from SourceCode, including getAllComments, getCommentsBefore, getCommentsAfter, getCommentsInside, and commentsExistBetween |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Merge activity
|
8fdd1af to
ec816ba
Compare

Follow-on after #14715. Pure refactor. Move code for
SourceCode's comment-related methods into a separate file. Code is completely unchanged - it's just moved.