chore(oxlint/lsp): respect RuleCustomization.autofix for "fix all" code actions#21781
Merged
graphite-app[bot] merged 1 commit intoMay 5, 2026
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. |
RuleCustomization.autofix for "fix all" code actionsRuleCustomization.autofix for "fix all" code actions
e1a8a4c to
5edede1
Compare
d97aff6 to
91eb4be
Compare
5edede1 to
82949ba
Compare
91eb4be to
cd4cbfd
Compare
82949ba to
75f2e3b
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the oxlint LSP “fix all” / “fix all dangerous” code actions to respect rulesCustomization.<rule>.autofix = false, so rules opted out of autofix aren’t included in fix-all edits.
Changes:
- Thread
rules_customizationinto fix-all code action generation and filter out edits for rules withautofix: false. - Carry the originating
OxcCodeinFixedContentKind::LintRuleso fix-all filtering can identify the rule per edit. - Add an LSP fixture + snapshot and a server test covering the
autofix: falsebehavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/oxlint/src/lsp/utils.rs | Adds get_full_rule_name helper and plugin-prefix conversion used for customization lookups. |
| apps/oxlint/src/lsp/code_actions.rs | Filters fix-all actions based on RulesCustomization.autofix and updates matching for LintRule(OxcCode). |
| apps/oxlint/src/lsp/error_with_position.rs | Plumbs OxcCode into FixedContentKind::LintRule and reuses get_full_rule_name for rule-name reconstruction. |
| apps/oxlint/src/lsp/server_linter.rs | Passes rules_customization into fix-all helpers and adds an integration-style test for autofix customization. |
| apps/oxlint/src/lsp/options.rs | Clarifies that RuleCustomization.autofix applies to both safe and dangerous fix-all actions. |
| apps/oxlint/src/lsp/snapshots/fixtures_lsp_rules_customization_autofix@test.ts.snap | Snapshot asserting fix-all is omitted when autofix is disabled for a rule. |
| apps/oxlint/fixtures/lsp/rules_customization/autofix/test.ts | Fixture input for the new autofix-disabled snapshot/test. |
cd4cbfd to
f32a579
Compare
75f2e3b to
b5bc74b
Compare
f32a579 to
095fc4f
Compare
b5bc74b to
06ce7f3
Compare
095fc4f to
0bb42d8
Compare
06ce7f3 to
bcd9cb9
Compare
db5bff5 to
1d5f179
Compare
bcd9cb9 to
41e8c45
Compare
1d5f179 to
692bab9
Compare
41e8c45 to
d6813a7
Compare
d6813a7 to
e41293a
Compare
camc314
approved these changes
May 5, 2026
Contributor
Merge activity
|
…code actions (#21781) > ## Pull request overview > Updates the oxlint LSP “fix all” / “fix all dangerous” code actions to respect `rulesCustomization.<rule>.autofix = false`, so rules opted out of autofix aren’t included in fix-all edits.
e41293a to
fd9510e
Compare
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.

Uh oh!
There was an error while loading. Please reload this page.