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

informative-docs - Allow for excluded tags #1153

Closed
tetarchus opened this issue Sep 7, 2023 · 1 comment · Fixed by #1154
Closed

informative-docs - Allow for excluded tags #1153

tetarchus opened this issue Sep 7, 2023 · 1 comment · Fixed by #1154

Comments

@tetarchus
Copy link

Motivation

In setting an options object for a library, I would like to be able to record the default value in the comment for each option, to assist with documentation, including in-line hover docs in VSCode.

Currently informative-docs reports on all tags.

Current behavior

Using a 'simple' value for the @default tag causes this rule to report an issue:

/**
 * My option.
 * @default {} <-- Reports 'This tag description only repeats the name it describes.'
 */

This seems to be the case for {}, [], '' values that may wish to be defined as default values to indicate that the default is empty - especially in cases where the option accepts multiple different types being assigned to it.

Desired behavior

Introducing the option to exclude tags would allow ignoring these errors on parts of the documentation where we have a different preference - i.e. assigning a 'simple' default value - while also preserving the current behavior for other tags, and for those who want it for all tags (by default it would still apply to all tags).

Alternatives considered

Currently the only alternative is to disable the rule (either entirely, or for the file) which then removes this check on the description part of the doc comment.

brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Sep 8, 2023
Also:
- fix(`informative-docs`): proper `aliases` schema
- test(`informative-docs`): check `uselessWords`
- test(`require-jsdoc`): example for Vue components
brettz9 added a commit that referenced this issue Sep 10, 2023
Also:
- fix(`informative-docs`): proper `aliases` schema
- test(`informative-docs`): check `uselessWords`
- test(`require-jsdoc`): example for Vue components
@github-actions
Copy link

🎉 This issue has been resolved in version 46.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging a pull request may close this issue.

1 participant