Skip to content

Conversation

@jaymarvelz
Copy link
Contributor

@jaymarvelz jaymarvelz commented Aug 28, 2025

Prerequisites checklist

What is the purpose of this pull request?

This PR adds a new allowLabels option to no-missing-label-refs, allowing users to intentionally permit specific labels without definitions.

What changes did you make? (Give an overview)

  • Updated the rule logic to skip reporting missing references whose labels are listed in allowLabels.
  • Documented the option with example configuration and usage.
  • Added tests to cover valid ignores and non-ignored labels still reporting.

Related Issues

Fixes #449

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

@lumirlumir
Copy link
Member

Thanks for working on it.

Just one thought: Would anyone be open to renaming the option to allowLabels here?

Since most rules in markdown use allow for array option names, I think this change would help make the option names more consistent.

allowDefinitions: ["//"],
allowFootnoteDefinitions: [],

allowDefinitions: ["//"],
allowFootnoteDefinitions: [],

allowed: [],

allowDefinitions: ["//"],
allowFootnoteDefinitions: [],

@jaymarvelz
Copy link
Contributor Author

Yeah, that makes sense 👍. I went ahead and updated the option name.

@jaymarvelz jaymarvelz changed the title feat: add ignoreLabels option to no-missing-label-refs feat: add allowLabels option to no-missing-label-refs Aug 29, 2025
@nzakas nzakas moved this from Needs Triage to Implementing in Triage Aug 29, 2025
lumirlumir
lumirlumir previously approved these changes Aug 30, 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.

Looks so good to me. Thanks 👍

Would like @nzakas to verify (including the option name) before merging.

@lumirlumir lumirlumir moved this from Implementing to Second Review Needed in Triage Aug 30, 2025
lumirlumir
lumirlumir previously approved these changes Sep 1, 2025
@nzakas
Copy link
Member

nzakas commented Sep 2, 2025

@jaymarvelz please check the merge conflict.

Copy link
Member

@mdjermanovic mdjermanovic 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 for @nzakas to verify, as requested.

Copy link
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 f6d6b76 into eslint:main Sep 3, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from Second Review Needed to Complete in Triage Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

Rule Change: new ignoredLabels option for no-missing-label-refs

5 participants