@@ -50,6 +50,15 @@ line will be reported. (Text preceding a newline is not reported.)
50
50
If this is ` true ` , any single line blocks will be reported, except those which
51
51
are whitelisted in ` singleLineTags ` .
52
52
53
+ <a name =" user-content-options-requiresinglelineundercount-defaults-to-null " ></a >
54
+ <a name =" options-requiresinglelineundercount-defaults-to-null " ></a >
55
+ ### <code >requireSingleLineUnderCount</code > (defaults to <code >null</code >)
56
+
57
+ If this number is set, it indicates a minimum line width for a single line of
58
+ JSDoc content spread over a multi-line comment block. If a line is under the
59
+ minimum length, it will be reported so as to enforce single line JSDoc blocks
60
+ for such cases.
61
+
53
62
<a name =" user-content-options-singlelinetags-defaults-to-lends-type " ></a >
54
63
<a name =" options-singlelinetags-defaults-to-lends-type " ></a >
55
64
### <code >singleLineTags</code > (defaults to <code >[ ' ; lends' ; , ' ; type' ; ] </code >)
@@ -120,7 +129,7 @@ cannot be reliably added after the tag either).
120
129
| Tags| Any (though ` singleLineTags ` and ` multilineTags ` control the application)|
121
130
| Recommended| true|
122
131
| Settings||
123
- | Options| ` allowMultipleTags ` , ` minimumLengthForMultiline ` , ` multilineTags ` , ` noFinalLineText ` , ` noMultilineBlocks ` , ` noSingleLineBlocks ` , ` noZeroLineText ` , ` singleLineTags ` |
132
+ | Options| ` allowMultipleTags ` , ` minimumLengthForMultiline ` , ` multilineTags ` , ` noFinalLineText ` , ` noMultilineBlocks ` , ` noSingleLineBlocks ` , ` noZeroLineText ` , ` requireSingleLineUnderCount ` , ` singleLineTags ` |
124
133
125
134
<a name =" user-content-failing-examples " ></a >
126
135
<a name =" failing-examples " ></a >
@@ -283,6 +292,38 @@ The following patterns are considered problems:
283
292
* Description */
284
293
// "jsdoc/multiline-blocks": ["error"|"warn", {"noFinalLineText":true}]
285
294
// Message: Should have no text on the final line (before the `*/`).
295
+
296
+ /**
297
+ * Description too short
298
+ */
299
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
300
+ // Message: Description is too short to be multi-line.
301
+
302
+ /** Description too short
303
+ */
304
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
305
+ // Message: Description is too short to be multi-line.
306
+
307
+ /**
308
+ * Description too short */
309
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
310
+ // Message: Description is too short to be multi-line.
311
+
312
+ /**
313
+ * @someTag {someType} Description too short
314
+ */
315
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
316
+ // Message: Description is too short to be multi-line.
317
+
318
+ /** @someTag {someType} Description too short
319
+ */
320
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
321
+ // Message: Description is too short to be multi-line.
322
+
323
+ /**
324
+ * @someTag {someType} Description too short */
325
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
326
+ // Message: Description is too short to be multi-line.
286
327
````
287
328
288
329
@@ -394,5 +435,39 @@ The following patterns are not considered problems:
394
435
395
436
/** @someTag with Description */
396
437
// "jsdoc/multiline-blocks": ["error"|"warn", {"noFinalLineText":true}]
438
+
439
+ /**
440
+ * This description here is very much long enough, I'd say, wouldn't you?
441
+ */
442
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
443
+
444
+ /**
445
+ * This description here is
446
+ * on multiple lines.
447
+ */
448
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
449
+
450
+ /** This description here is on a single line, so it doesn't matter if it goes over. */
451
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
452
+
453
+ /**
454
+ * @someTag {someType} This description here is very much long enough, I'd say, wouldn't you?
455
+ */
456
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
457
+
458
+ /**
459
+ * @someTag {someType} This description here is
460
+ * on multiple lines.
461
+ */
462
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
463
+
464
+ /** @someTag {someTag} This description here is on a single line, so it doesn't matter if it goes over. */
465
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
466
+
467
+ /**
468
+ * Description short but has...
469
+ * @someTag
470
+ */
471
+ // "jsdoc/multiline-blocks": ["error"|"warn", {"requireSingleLineUnderCount":80}]
397
472
````
398
473
0 commit comments