Skip to content

docs: clarify that boolean is still allowed for rule meta.deprecated #19866

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

bmish
Copy link
Member

@bmish bmish commented Jun 16, 2025

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Clarify that the rule meta.deprecated property can be provided as either a boolean or an object.

The current documentation is conflicting:

The RFC which I started and @DMartens finished shows the property as a boolean or an object:

type RuleMeta = {
  deprecated?:
    | boolean // Existing boolean option, backwards compatible.
    | DeprecatedInfo // Proposed extension

My original intention in writing this RFC was that the boolean format would continue to be allowed. In my mind, the DeprecatedInfo object format is only necessary to use when additional information about the deprecation is available. That's why all of the new fields in DeprecatedInfo are optional and can be provided as the rule author sees fit or as additional information is available. Otherwise, simply providing the property as a boolean to indicate the deprecation is totally sufficient.

  • Let me know if there's any disagreement about that.

So I've updated the documentation to clarify that boolean or object is acceptable for rule meta.deprecated.

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

@bmish bmish requested a review from a team as a code owner June 16, 2025 20:43
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Jun 16, 2025
@eslint-github-bot
Copy link

Hi @bmish!, thanks for the Pull Request

The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.

  • The length of the commit message must be less than or equal to 72

To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.

Read more about contributing to ESLint here

Copy link

netlify bot commented Jun 16, 2025

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 0e54a83
🔍 Latest deploy log https://app.netlify.com/projects/docs-eslint/deploys/685081e2fe0e220008ba28be
😎 Deploy Preview https://deploy-preview-19866--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bmish bmish changed the title docs: clarify that boolean is still allowed for rule meta.deprecated property docs: clarify that boolean is still allowed for rule meta.deprecated Jun 16, 2025
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label Jun 16, 2025
Copy link
Member

@lumirlumir lumirlumir 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 for catching this!

Would like another review before merging.

@lumirlumir lumirlumir added the accepted There is consensus among the team that this change meets the criteria for inclusion label Jun 17, 2025
@lumirlumir lumirlumir moved this from Needs Triage to Second Review Needed in Triage Jun 17, 2025
Copy link
Member

@amareshsm amareshsm left a comment

Choose a reason for hiding this comment

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

LGTM

@amareshsm amareshsm merged commit 4112fd0 into eslint:main Jun 17, 2025
31 checks passed
@github-project-automation github-project-automation bot moved this from Second Review Needed to Complete in Triage Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

3 participants