You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the publicOnly option from require-jsdoc to other rules.
Personally I want to require jsdoc for all top-level functions for the types and only require descriptions when the functions are exported.
I am willing to create a PR for this functionality.
Current behavior
Currently only the rule require-jsdoc has the option publicOnly
Desired behavior
Add the same option to other rules. I would add them to require-description, require-param-description and require-returns-description.
Alternatives considered
This could also be a new rule as otherwise many other rules would be modified.
This new rule has a list of tag names requiring a description as an option.
Sounds good, though I would think adding to the existing rules would be a good idea--hopefully though as a call to some shared utility.
As far as listing tag names, this is somewhat related to #467 (which I need to review more carefully as it might have already been implemented with the recent comment AST option available to contexts; one can specify a particular JSDocTag for any context). Perhaps publicOnly could be implemented as a special context, and comment (pointing to such tags) would narrow down which publicOnly items would trigger the rule.
Motivation
Add the
publicOnly
option fromrequire-jsdoc
to other rules.Personally I want to require jsdoc for all top-level functions for the types and only require descriptions when the functions are exported.
I am willing to create a PR for this functionality.
Current behavior
Currently only the rule
require-jsdoc
has the optionpublicOnly
Desired behavior
Add the same option to other rules. I would add them to
require-description
,require-param-description
andrequire-returns-description
.Alternatives considered
This could also be a new rule as otherwise many other rules would be modified.
This new rule has a list of tag names requiring a description as an option.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: