-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Option for lines-before-block
to ignore single-line jsdoc comments
#1295
Comments
IMO this option would be best enabled by default. This succinct / one-line style is pretty common in projects, and it's surprising for many to see the linter report against it. |
Although, if it was a |
I'm not sure I would want to enforce it: function foo() {
/** @type { string[] | undefined } */
let myStringArray;
/** @type { number[] | undefined } */
let myNumberArray;
// ...
} (assuming also #1296) looks reasonable to me. |
I am not person to ask. @brettz9 has been maintaining this repo the past several years. |
Ah sorry! Same question on these two issues for @brettz9 then 🙂 |
@JoshuaKGoldberg : SGTM! |
Motivation
When documenting parameters, simple single-line descriptions can be enough. For example:
In this case, I don't think newlines before the jsdoc comments add any value.
Current behavior
The rule warns even with
ignoreSameLine: true
, as the jsdoc is on a separate line.Desired behavior
Don't warn if the jsdoc fits on a single line.
Alternatives considered
The text was updated successfully, but these errors were encountered: