feat(napi/oxlint): add getFilename + getPhysicalFilename methods to Context#12481
feat(napi/oxlint): add getFilename + getPhysicalFilename methods to Context#12481overlookmotel wants to merge 1 commit intomainfrom
getFilename + getPhysicalFilename methods to Context#12481Conversation
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. |
d2a9782 to
f503e4e
Compare
|
|
||
| /** | ||
| * Get the absolute path of the file being linted. | ||
| * @deprecated Use `filename` instead. |
There was a problem hiding this comment.
i don't think we should implement deprecated APIs, just for the sake of filling out the context object
There was a problem hiding this comment.
I figured these methods are part of ESLint's API, so we should include them, even though they're deprecated. An older ESLint plugin might otherwise work quite happily with Oxlint, but it'd break if it uses these APIs.
There was a problem hiding this comment.
Lets chat in a bit? I don't quite agree, especially since we don't have full compat with eslint, i don't think we should fill out deprecated APIs, we shuold instead push plugin maintainers to use the new APIs.
More of my reasoning is adding something deprecated, means that we definitly will remove it at some point which means a breaking change ect
There was a problem hiding this comment.
OK, we disagree here. I think we're aiming for ESLint compat, so we need to provide all ESLint's APIs, regardless of whether those APIs are deprecated or not.
But it's not important (yet). Feel free to close this if you disagree and we can always return to it later once we've confirmed that we are definitely going for ESLint compat.
There was a problem hiding this comment.
yeah sorry to be a pain. I think let's close for now and return once it's confirmed.
294ec37 to
bc54d3c
Compare
f503e4e to
8c4e05d
Compare
8c4e05d to
f49acdb
Compare
f49acdb to
e053438
Compare
ContextgetFilename + getPhysicalFilename methods to Context
CodSpeed Instrumentation Performance ReportMerging #12481 will not alter performanceComparing Summary
Footnotes |
e053438 to
edf72c3
Compare
1e097b1 to
2401976
Compare
edf72c3 to
77731f0
Compare
|
We may want to start opening issues in ESLint plugins still using getFilename/getPhysicalFilename if we intend to keep this decision (or maybe even start opening PRs to fix plugins where possible): Link to storybook eslint plugin source: https://github.com/storybookjs/storybook/blob/v10.0.5/code/lib/eslint-plugin/src/rules/default-exports.ts#L102 |
|
Personally, I think we should reverse the decision and implement these APIs. IMO it's no big deal - they're all just another access method for data that existing getters on Even if they disappear from ESLint in v10, there's no big problem I think with us supporting them indefinitely. Trying to get every ESLint plugin to update is going to be an impossible task. Let's just accept the world as it is, warts and all! Note: It's not just |
|
Lets chat monday? |

Add
getFilenameandgetPhysicalFilenamemethods toContext, to match ESLint's API.