Skip to content

Comments

fix(linter/plugins): Handle false as a technically-allowed value for rule.meta.fixable.#18011

Closed
connorshea wants to merge 3 commits intomainfrom
treat-false-as-null
Closed

fix(linter/plugins): Handle false as a technically-allowed value for rule.meta.fixable.#18011
connorshea wants to merge 3 commits intomainfrom
treat-false-as-null

Conversation

@connorshea
Copy link
Member

See #17967 for details. Basically, we need to allow false as equivalent to null here, because ESLint doesn't actually enforce the allowed values for fixable very well.

I have not added a test yet, as I want to make sure this is a fix we actually want to ship before spending time on that. I assume I should just add a new fixture with a dummy plugin that has bad values for some rules, probably?

…r `rule.meta.fixable`.

See #17967 for details. Basically, we need to allow `false` as equivalent to `null` here, because ESLint doesn't actually enforce the allowed values for `fixable` very well.
Copilot AI review requested due to automatic review settings January 14, 2026 23:50
@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins C-bug Category - Bug labels Jan 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a compatibility issue where ESLint plugins incorrectly use false as a value for rule.meta.fixable, even though it's not officially allowed. The fix treats false the same as null to accommodate these non-compliant plugins.

Changes:

  • Updated the registerPlugin function to accept false as a valid (though technically incorrect) value for rule.meta.fixable
  • Added documentation explaining the rationale for this workaround
  • Added a @throws JSDoc annotation documenting the error case for invalid meta.fixable values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

connorshea and others added 2 commits January 14, 2026 16:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Connor Shea <connor.james.shea@gmail.com>
Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@overlookmotel what do you think?

I had a look at eslint, and i can't see a time when they supported fixable: false, so I'm hesitant to add support for it

@connorshea
Copy link
Member Author

Closed in favor of #18772

graphite-app bot pushed a commit that referenced this pull request Jan 31, 2026
fixes #17967
fixes #18700
closes #18011

This PR allows boolean values as valid options for meta.fixable. While this technically doesn't align exactly with eslint, it reduces some friction about getting users to migrate from exlint to oxlint, by increasing the number of plugins that are compatible.
@camc314 camc314 deleted the treat-false-as-null branch January 31, 2026 16:34
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 A-linter-plugins Area - Linter JS plugins C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants