Skip to content

Allows require-description to be turned off for specific rules#142

Open
mcongrove wants to merge 2 commits intoeslint-community:mainfrom
mcongrove:main
Open

Allows require-description to be turned off for specific rules#142
mcongrove wants to merge 2 commits intoeslint-community:mainfrom
mcongrove:main

Conversation

@mcongrove
Copy link

@mcongrove mcongrove commented Nov 8, 2023

Adds a new option to require-description, called disableForRules, which allows you to pass an array of rules that require-description will not apply to.

Example usage:

"@eslint-community/eslint-comments/require-description": [
	"error",
	{ disableForRules: ["no-unused-vars"] },
],

This can be especially helpful for overrides which are self-evident amongst users of the codebase.

Requested by #134.

@mcongrove mcongrove changed the title #134 Allows require-description to be turned off for specific rules Allows require-description to be turned off for specific rules Nov 8, 2023
@mcongrove
Copy link
Author

@ota-meshi @MichaelDeBoey

Hate to ping y'all, but I'm not sure if you were notified this PR was here because I can't request a reviewer.

@github-actions github-actions bot added the Stale label Feb 28, 2024
@brettz9
Copy link
Member

brettz9 commented Jan 7, 2026

While there were two thumbs-down, it looks like a potentially useful change to me, and one which fits in with the ESLint approach of allowing projects choice.

However, it looks like it will need to be rebased first unless the consensus of the team is against this.

Support might also be added for the case where there are multiple rules, e.g., /* eslint-disable no-unsed-var, no-undef */.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants