Skip to content
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

Rule: require a meta.docs.recommended #446

Closed
JoshuaKGoldberg opened this issue Feb 16, 2024 · 3 comments · Fixed by #447
Closed

Rule: require a meta.docs.recommended #446

JoshuaKGoldberg opened this issue Feb 16, 2024 · 3 comments · Fixed by #447

Comments

@JoshuaKGoldberg
Copy link
Contributor

JoshuaKGoldberg commented Feb 16, 2024

Similar to require-meta-docs-description and require-meta-docs-url: it's common for plugin rules to specify to specify a meta.docs.description value. For example, in eslint-plugin-eslint-plugin:

Not every plugin enforces a meta.docs.recommended & correspondingly named ruleset, so I'm not sure whether this should be enabled by default in this plugin's recommended ruleset. But it'd be nice to at least have the rule available, I think.

Filing this as a continuation of eslint/eslint#18005 (comment). At least ESLint core does this ad hoc.

@bmish
Copy link
Member

bmish commented Feb 16, 2024

Is this issue about meta.docs.description or meta.docs.recommended? Note we have this rule:

@JoshuaKGoldberg JoshuaKGoldberg changed the title Rule: require a meta.docs.description Rule: require a meta.docs.recommended Feb 16, 2024
@JoshuaKGoldberg
Copy link
Contributor Author

Sorry, copypasta issue on the title 😅

@bmish
Copy link
Member

bmish commented Feb 16, 2024

Regarding meta.docs.recommended, I'd welcome a rule for this for plugins that want to use it, but I don't think it should be recommended.

This property can be useful, as some plugins have scripts that generate their recommended config based on it, and having the flag readily accessible in the rule can be convenient. However, it can also be considered duplicative of the config itself, requiring extra tooling to keep the two in sync. And it doesn't really scale well to plugins that have multiple configs, don't have a recommended config, or simply prefer to keep the source of truth solely in the configs themselves rather than in the rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants