Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 8, 2025

Revert #15447. It's easy to allow Context#id to be accessed in createOnce when running rule in Oxlint, but not possible to do in ESLint compat mode with current API, because id isn't a property of the rule, so defineRule doesn't know it.

We could support it by making definePlugin compulsory for ESLint interop, and get it to set id property on Context objects properly.

But that's a bit tricky, so just disable access for now. It's probably not very useful anyway - a rule should know what its own name is!

Copy link
Member Author

overlookmotel commented Nov 8, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@overlookmotel overlookmotel marked this pull request as ready for review November 8, 2025 14:44
@overlookmotel overlookmotel self-assigned this Nov 8, 2025
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Nov 8, 2025
Copy link
Member Author

overlookmotel commented Nov 8, 2025

Merge activity

…ce` (#15489)

Revert #15447. It's easy to allow `Context#id` to be accessed in `createOnce` when running rule in Oxlint, but not possible to do in ESLint compat mode with current API, because `id` isn't a property of the rule, so `defineRule` doesn't know it.

We could support it by making `definePlugin` compulsory for ESLint interop, and get it to set `id` property on `Context` objects properly.

But that's a bit tricky, so just disable access for now. It's probably not very useful anyway - a rule should know what its own name is!
@graphite-app graphite-app bot force-pushed the 11-08-fix_linter_plugins_allow_access_to_cwd_in_createonce_in_eslint_interop_mode branch from ee9287b to 7409630 Compare November 8, 2025 14:46
@graphite-app graphite-app bot force-pushed the 11-08-fix_linter_plugins_do_not_allow_access_to_context_id_in_createonce_ branch from 34bd693 to 6957fb9 Compare November 8, 2025 14:47
Base automatically changed from 11-08-fix_linter_plugins_allow_access_to_cwd_in_createonce_in_eslint_interop_mode to main November 8, 2025 14:52
@graphite-app graphite-app bot merged commit 6957fb9 into main Nov 8, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 11-08-fix_linter_plugins_do_not_allow_access_to_context_id_in_createonce_ branch November 8, 2025 14:52
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants