feat(napi/oxlint): add filename property to Context#12497
Merged
graphite-app[bot] merged 1 commit intomainfrom Jul 24, 2025
Merged
feat(napi/oxlint): add filename property to Context#12497graphite-app[bot] merged 1 commit intomainfrom
filename property to Context#12497graphite-app[bot] merged 1 commit intomainfrom
Conversation
Member
Author
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. |
Member
Author
Contributor
Merge activity
|
Add `filename` property to `Context`, to match ESLint's API. [ESLint's docs](https://eslint.org/docs/latest/extend/custom-rules#the-context-object) do draw a distinction between `filename` and `physicalFilename`: > `filename`: (string) The filename associated with the source. > `physicalFilename`: (string) When linting a file, it provides the full path of the file on disk without any code block information. When linting text, it provides the value passed to `—stdin-filename` or `<text>` if not specified. However, it's unclear to me if that difference applies in the context of Oxlint. So just make them both absolute file path for now. Testing ESLint locally, that's what both properties contain.
1f7cfe9 to
8c8c8bc
Compare
1e097b1 to
2401976
Compare
Base automatically changed from
07-23-refactor_napi_oxlint_diagnostics_communicate_which_rule_via_rule_index_not_rule_id
to
main
July 24, 2025 11:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add
filenameproperty toContext, to match ESLint's API.ESLint's docs do draw a distinction between
filenameandphysicalFilename:However, it's unclear to me if that difference applies in the context of Oxlint. So just make them both absolute file path for now. Testing ESLint locally, that's what both properties contain.