fix(linter/plugins): Handle false as a technically-allowed value for rule.meta.fixable.#18011
Closed
connorshea wants to merge 3 commits intomainfrom
Closed
fix(linter/plugins): Handle false as a technically-allowed value for rule.meta.fixable.#18011connorshea wants to merge 3 commits intomainfrom
false as a technically-allowed value for rule.meta.fixable.#18011connorshea wants to merge 3 commits intomainfrom
Conversation
…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.
Contributor
There was a problem hiding this comment.
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
registerPluginfunction to acceptfalseas a valid (though technically incorrect) value forrule.meta.fixable - Added documentation explaining the rationale for this workaround
- Added a
@throwsJSDoc annotation documenting the error case for invalidmeta.fixablevalues
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Connor Shea <connor.james.shea@gmail.com>
camc314
reviewed
Jan 15, 2026
Contributor
camc314
left a comment
There was a problem hiding this comment.
@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
Member
Author
|
Closed in favor of #18772 |
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.
See #17967 for details. Basically, we need to allow
falseas equivalent tonullhere, because ESLint doesn't actually enforce the allowed values forfixablevery 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?