refactor(linter/plugins): add comments on Context#extend#15604
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.
Pull Request Overview
This PR adds explanatory comments to the extend method in both apps/oxlint/src-js/plugins/context.ts and apps/oxlint/src-js/index.ts to clarify why this method is safe to use within the createOnce API. The comments explain that extend doesn't involve file-specific state, making it appropriate for use during the createOnce phase.
- Adds inline documentation explaining the safety of the
extendmethod increateOncecontext - Maintains consistency with similar explanatory comments for other safe-to-use methods like
cwd
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/context.ts | Adds comment explaining that extend is safe to call in createOnce because it doesn't involve file-specific state |
| apps/oxlint/src-js/index.ts | Adds the same explanatory comment for the extend method in the ESLint-compatible implementation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
Add comments on `extend` methods explaining why they're OK to use in `createContext`.
022e6ad to
2de35be
Compare

Add comments on
extendmethods explaining why they're OK to use increateContext.