Skip to content

fix: Support legacy schema properties#128

Merged
nzakas merged 1 commit intomainfrom
issue127
Nov 4, 2024
Merged

fix: Support legacy schema properties#128
nzakas merged 1 commit intomainfrom
issue127

Conversation

@mdjermanovic
Copy link
Copy Markdown
Member

Prerequisites checklist

What is the purpose of this pull request?

Updates @eslint/compat utility to support legacy schema property of rules.

What changes did you make? (Give an overview)

Updated fixupRule() to copy top-level schema property into rule's meta object.

This covers:

  • Legacy function-style rules, which were allowed to specify schema as schema property of the function.
  • Object-style rules that were mistakenly specifying schema as top-level schema property, which was never officially supported but used to work in ESLint < 9.

Related Issues

Fixes #127

I tested this with eslint-plugin-fp and eslint-plugin-filenames rules mentioned in the original issue.

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot Bot added the bug Something isn't working label Nov 2, 2024
Copy link
Copy Markdown
Member

@fasttime fasttime left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Leaving open until Monday in case someone else wants to review.

Copy link
Copy Markdown
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@nzakas nzakas merged commit 3a87bbb into main Nov 4, 2024
@nzakas nzakas deleted the issue127 branch November 4, 2024 16:24
@github-actions github-actions Bot mentioned this pull request Nov 4, 2024
snitin315 pushed a commit that referenced this pull request Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted bug Something isn't working

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Bug: @eslint/compat fixupPluginRules() does not work with rule options

3 participants