-
-
Notifications
You must be signed in to change notification settings - Fork 163
Feature Request: Require single line JSDoc for short comments #724
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
Comments
Did you want this only when there were no tags or also for tags? (If the latter, I think we should at least allow tags like I suggest we combine this proposed rule into one which also allows optional support for the opposite--what is detailed at the end of #199 (comment) , namely forbidding single-line comments (except when accompanied by specific whitelisted tags like |
@brettz9 that makes sense to me. I'm usually working in TypeScript, where there's less need for tags, but I can see why you'd want Do you want me to comment on the other issue and close this out? |
Sure, as you like. I'll go ahead and summarize your idea in that same comment, as I've turned it into a kind of wiki. |
Great! Closing in favor of #199 (comment) |
Uh oh!
There was an error while loading. Please reload this page.
Motivation
There are two basic forms of JSDoc comment:
For short comments, I consider the multiline form a waste of space. For example, instead of:
I'd like to enforce that this be written using single line form:
Current behavior
I believe this would have to be a new rule.
Desired behavior
I'd like to be able to configure a maximum line length for JSDoc comments and have eslint-plugin-jsdoc enforce that JSDoc comments shorter than this use the single-line form, whereas JSDoc comments longer than this use the multiline form.
Configuration might be something like:
Alternatives considered
None
The text was updated successfully, but these errors were encountered: