eslint-plugin-jsdoc 40.3.0 → 41.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +608 -228
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/rules/checkTypes.js +26 -8
- package/dist/rules/checkTypes.js.map +1 -1
- package/dist/rules/informativeDocs.js +111 -0
- package/dist/rules/informativeDocs.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ JSDoc linting rules for ESLint.
|
|
|
38
38
|
* [`check-values`](#user-content-eslint-plugin-jsdoc-rules-check-values)
|
|
39
39
|
* [`empty-tags`](#user-content-eslint-plugin-jsdoc-rules-empty-tags)
|
|
40
40
|
* [`implements-on-classes`](#user-content-eslint-plugin-jsdoc-rules-implements-on-classes)
|
|
41
|
+
* [`informative-docs`](#user-content-eslint-plugin-jsdoc-rules-informative-docs)
|
|
41
42
|
* [`match-description`](#user-content-eslint-plugin-jsdoc-rules-match-description)
|
|
42
43
|
* [`match-name`](#user-content-eslint-plugin-jsdoc-rules-match-name)
|
|
43
44
|
* [`multiline-blocks`](#user-content-eslint-plugin-jsdoc-rules-multiline-blocks)
|
|
@@ -5442,7 +5443,8 @@ object.
|
|
|
5442
5443
|
|
|
5443
5444
|
However, `Object.create(null)` objects are not `instanceof Object`, however, so
|
|
5444
5445
|
in the case of such a plain object we lower-case to indicate possible support
|
|
5445
|
-
for these objects. Also, nowadays, TypeScript also discourages
|
|
5446
|
+
for these objects. Also, nowadays, TypeScript also [discourages](https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#:~:text=%E2%9D%8C%20Don't%20ever%20use,used%20appropriately%20in%20JavaScript%20code.)
|
|
5447
|
+
use of `Object`
|
|
5446
5448
|
as a lone type. However, one additional complexity is that TypeScript allows and
|
|
5447
5449
|
actually [currently requires](https://github.com/microsoft/TypeScript/issues/20555)
|
|
5448
5450
|
`Object` (with the initial upper-case) if used in the syntax
|
|
@@ -5451,8 +5453,14 @@ adhere to that which [JSDoc documents](https://jsdoc.app/tags-type.html).
|
|
|
5451
5453
|
|
|
5452
5454
|
So, for optimal compatibility with TypeScript (especially since TypeScript
|
|
5453
5455
|
tools can be used on plain JavaScript with JSDoc), we are now requiring this
|
|
5454
|
-
TypeScript approach by default (if you set
|
|
5455
|
-
TypeScript mode, the defaults will
|
|
5456
|
+
TypeScript approach by default in non-"typescript" mode (if you set
|
|
5457
|
+
`object` type `preferredTypes` in TypeScript mode, the defaults will
|
|
5458
|
+
not apply).
|
|
5459
|
+
|
|
5460
|
+
However, for "typescript" mode, a still better choice exists—using index signatures such as `{[key: string]: string}` or using a more precise
|
|
5461
|
+
shorthand object syntax (e.g., `{a: string, b: number}`). This is superior
|
|
5462
|
+
for TypeScript because the likes of `Object<string, number>` is not useable
|
|
5463
|
+
in native TypeScript syntax, even if it is allowed within JSDoc.
|
|
5456
5464
|
|
|
5457
5465
|
Basically, for primitives, we want to define the type as a primitive, because
|
|
5458
5466
|
that's what we use in 99.9% of cases. For everything else, we use the type
|
|
@@ -6132,7 +6140,7 @@ function quux (foo) {
|
|
|
6132
6140
|
|
|
6133
6141
|
}
|
|
6134
6142
|
// Settings: {"jsdoc":{"mode":"typescript"}}
|
|
6135
|
-
// Message:
|
|
6143
|
+
// Message: Use object shorthand or index signatures instead of `object`, e.g., `{[key: string]: string}`
|
|
6136
6144
|
|
|
6137
6145
|
/**
|
|
6138
6146
|
*
|
|
@@ -6414,7 +6422,7 @@ function b () {}
|
|
|
6414
6422
|
function a () {}
|
|
6415
6423
|
|
|
6416
6424
|
/**
|
|
6417
|
-
* @typedef {
|
|
6425
|
+
* @typedef {{[key: string]: number}} foo
|
|
6418
6426
|
*/
|
|
6419
6427
|
function b () {}
|
|
6420
6428
|
// Settings: {"jsdoc":{"mode":"typescript"}}
|
|
@@ -6443,7 +6451,7 @@ function quux (foo) {
|
|
|
6443
6451
|
}
|
|
6444
6452
|
|
|
6445
6453
|
/**
|
|
6446
|
-
* @param {
|
|
6454
|
+
* @param {{[key: string]: number}} foo
|
|
6447
6455
|
*/
|
|
6448
6456
|
function quux (foo) {
|
|
6449
6457
|
|
|
@@ -7272,6 +7280,378 @@ function quux () {
|
|
|
7272
7280
|
````
|
|
7273
7281
|
|
|
7274
7282
|
|
|
7283
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-informative-docs"></a>
|
|
7284
|
+
<a name="eslint-plugin-jsdoc-rules-informative-docs"></a>
|
|
7285
|
+
### <code>informative-docs</code>
|
|
7286
|
+
|
|
7287
|
+
Reports on JSDoc texts that serve only to restart their attached name.
|
|
7288
|
+
|
|
7289
|
+
Devs sometimes write JSDoc descriptions that add no additional information just to fill out the doc:
|
|
7290
|
+
|
|
7291
|
+
```js
|
|
7292
|
+
/** The user id. */
|
|
7293
|
+
let userId;
|
|
7294
|
+
```
|
|
7295
|
+
|
|
7296
|
+
Those "uninformative" docs comments take up space without being helpful.
|
|
7297
|
+
This rule requires all docs comments contain at least one word not already in the code.
|
|
7298
|
+
|
|
7299
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-informative-docs-options-11"></a>
|
|
7300
|
+
<a name="eslint-plugin-jsdoc-rules-informative-docs-options-11"></a>
|
|
7301
|
+
#### Options
|
|
7302
|
+
|
|
7303
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-informative-docs-options-11-aliases"></a>
|
|
7304
|
+
<a name="eslint-plugin-jsdoc-rules-informative-docs-options-11-aliases"></a>
|
|
7305
|
+
##### <code>aliases</code>
|
|
7306
|
+
|
|
7307
|
+
The `aliases` option allows indicating words as synonyms (aliases) of each other.
|
|
7308
|
+
|
|
7309
|
+
For example, with `{ aliases: { emoji: ["smiley", "winkey"] } }`, the following comment would be considered uninformative:
|
|
7310
|
+
|
|
7311
|
+
```js
|
|
7312
|
+
/** A smiley/winkey. */
|
|
7313
|
+
let emoji;
|
|
7314
|
+
```
|
|
7315
|
+
|
|
7316
|
+
The default `aliases` option is:
|
|
7317
|
+
|
|
7318
|
+
```json
|
|
7319
|
+
{
|
|
7320
|
+
"a": ["an", "our"]
|
|
7321
|
+
}
|
|
7322
|
+
```
|
|
7323
|
+
|
|
7324
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-informative-docs-options-11-uselesswords"></a>
|
|
7325
|
+
<a name="eslint-plugin-jsdoc-rules-informative-docs-options-11-uselesswords"></a>
|
|
7326
|
+
##### <code>uselessWords</code>
|
|
7327
|
+
|
|
7328
|
+
Words that are ignored when searching for one that adds meaning.
|
|
7329
|
+
|
|
7330
|
+
For example, with `{ uselessWords: ["our"] }`, the following comment would be considered uninformative:
|
|
7331
|
+
|
|
7332
|
+
```js
|
|
7333
|
+
/** Our text. */
|
|
7334
|
+
let text;
|
|
7335
|
+
```
|
|
7336
|
+
|
|
7337
|
+
The default `uselessWords` option is:
|
|
7338
|
+
|
|
7339
|
+
```json
|
|
7340
|
+
["a", "an", "i", "in", "of", "s", "the"]
|
|
7341
|
+
```
|
|
7342
|
+
|
|
7343
|
+
|||
|
|
7344
|
+
|---|---|
|
|
7345
|
+
|Context|everywhere|
|
|
7346
|
+
|Tags|any|
|
|
7347
|
+
|Recommended|false|
|
|
7348
|
+
|Settings||
|
|
7349
|
+
|Options|`aliases`, `uselessWords`|
|
|
7350
|
+
|
|
7351
|
+
The following patterns are considered problems:
|
|
7352
|
+
|
|
7353
|
+
````js
|
|
7354
|
+
/** the */
|
|
7355
|
+
let myValue = 3;
|
|
7356
|
+
// Message: This description only repeats the name it describes.
|
|
7357
|
+
|
|
7358
|
+
/** The user id. */
|
|
7359
|
+
let userId: string;
|
|
7360
|
+
// Message: This description only repeats the name it describes.
|
|
7361
|
+
|
|
7362
|
+
/** the my value */
|
|
7363
|
+
let myValue = 3;
|
|
7364
|
+
// Message: This description only repeats the name it describes.
|
|
7365
|
+
|
|
7366
|
+
/** value **/
|
|
7367
|
+
let myValue,
|
|
7368
|
+
count = 3;
|
|
7369
|
+
// Message: This description only repeats the name it describes.
|
|
7370
|
+
|
|
7371
|
+
let myValue,
|
|
7372
|
+
/** count **/
|
|
7373
|
+
count = 3;
|
|
7374
|
+
// Message: This description only repeats the name it describes.
|
|
7375
|
+
|
|
7376
|
+
/**
|
|
7377
|
+
* the foo.
|
|
7378
|
+
*/
|
|
7379
|
+
function foo() {}
|
|
7380
|
+
// Message: This description only repeats the name it describes.
|
|
7381
|
+
|
|
7382
|
+
/**
|
|
7383
|
+
* the value foo.
|
|
7384
|
+
*/
|
|
7385
|
+
const value = function foo() {}
|
|
7386
|
+
// Message: This description only repeats the name it describes.
|
|
7387
|
+
|
|
7388
|
+
const value = {
|
|
7389
|
+
/**
|
|
7390
|
+
* the prop.
|
|
7391
|
+
*/
|
|
7392
|
+
prop: true,
|
|
7393
|
+
}
|
|
7394
|
+
// Message: This description only repeats the name it describes.
|
|
7395
|
+
|
|
7396
|
+
/**
|
|
7397
|
+
* name
|
|
7398
|
+
*/
|
|
7399
|
+
class Name {}
|
|
7400
|
+
// Message: This description only repeats the name it describes.
|
|
7401
|
+
|
|
7402
|
+
/**
|
|
7403
|
+
* abc def
|
|
7404
|
+
*/
|
|
7405
|
+
const abc = class Def {}
|
|
7406
|
+
// Message: This description only repeats the name it describes.
|
|
7407
|
+
|
|
7408
|
+
class Abc {
|
|
7409
|
+
/** the abc def! */
|
|
7410
|
+
def;
|
|
7411
|
+
}
|
|
7412
|
+
// Message: This description only repeats the name it describes.
|
|
7413
|
+
|
|
7414
|
+
const _ = class Abc {
|
|
7415
|
+
/** the abc def! */
|
|
7416
|
+
def;
|
|
7417
|
+
}
|
|
7418
|
+
// Message: This description only repeats the name it describes.
|
|
7419
|
+
|
|
7420
|
+
class Abc {
|
|
7421
|
+
/** the abc def! */
|
|
7422
|
+
def() {};
|
|
7423
|
+
}
|
|
7424
|
+
// Message: This description only repeats the name it describes.
|
|
7425
|
+
|
|
7426
|
+
class Abc {
|
|
7427
|
+
/** def */
|
|
7428
|
+
accessor def;
|
|
7429
|
+
}
|
|
7430
|
+
// Message: This description only repeats the name it describes.
|
|
7431
|
+
|
|
7432
|
+
class Abc {
|
|
7433
|
+
/** def */
|
|
7434
|
+
def() {}
|
|
7435
|
+
}
|
|
7436
|
+
// Message: This description only repeats the name it describes.
|
|
7437
|
+
|
|
7438
|
+
class Abc {
|
|
7439
|
+
/** def */
|
|
7440
|
+
abstract accessor def;
|
|
7441
|
+
}
|
|
7442
|
+
// Message: This description only repeats the name it describes.
|
|
7443
|
+
|
|
7444
|
+
class Abc {
|
|
7445
|
+
/** def */
|
|
7446
|
+
abstract def();
|
|
7447
|
+
}
|
|
7448
|
+
// Message: This description only repeats the name it describes.
|
|
7449
|
+
|
|
7450
|
+
class Abc {
|
|
7451
|
+
/** def */
|
|
7452
|
+
abstract def;
|
|
7453
|
+
}
|
|
7454
|
+
// Message: This description only repeats the name it describes.
|
|
7455
|
+
|
|
7456
|
+
/** abc */
|
|
7457
|
+
namespace Abc {}
|
|
7458
|
+
// Message: This description only repeats the name it describes.
|
|
7459
|
+
|
|
7460
|
+
class Abc {
|
|
7461
|
+
/** def */
|
|
7462
|
+
def();
|
|
7463
|
+
def() {}
|
|
7464
|
+
}
|
|
7465
|
+
// Message: This description only repeats the name it describes.
|
|
7466
|
+
|
|
7467
|
+
/** abc */
|
|
7468
|
+
declare function abc();
|
|
7469
|
+
// Message: This description only repeats the name it describes.
|
|
7470
|
+
|
|
7471
|
+
/** abc */
|
|
7472
|
+
enum Abc {}
|
|
7473
|
+
// Message: This description only repeats the name it describes.
|
|
7474
|
+
|
|
7475
|
+
enum Abc {
|
|
7476
|
+
/** def */
|
|
7477
|
+
def,
|
|
7478
|
+
}
|
|
7479
|
+
// Message: This description only repeats the name it describes.
|
|
7480
|
+
|
|
7481
|
+
/** def */
|
|
7482
|
+
interface Def {}
|
|
7483
|
+
// Message: This description only repeats the name it describes.
|
|
7484
|
+
|
|
7485
|
+
/** def */
|
|
7486
|
+
type Def = {};
|
|
7487
|
+
// Message: This description only repeats the name it describes.
|
|
7488
|
+
|
|
7489
|
+
/**
|
|
7490
|
+
* count
|
|
7491
|
+
*
|
|
7492
|
+
* @description the value
|
|
7493
|
+
*/
|
|
7494
|
+
let value = 3;
|
|
7495
|
+
// Message: This tag description only repeats the name it describes.
|
|
7496
|
+
|
|
7497
|
+
/** @param {number} param - the param */
|
|
7498
|
+
function takesOne(param) {}
|
|
7499
|
+
// Message: This tag description only repeats the name it describes.
|
|
7500
|
+
|
|
7501
|
+
/** @other param - takes one */
|
|
7502
|
+
function takesOne(param) {}
|
|
7503
|
+
// Message: This tag description only repeats the name it describes.
|
|
7504
|
+
|
|
7505
|
+
/**
|
|
7506
|
+
* takes one
|
|
7507
|
+
* @other param - takes one
|
|
7508
|
+
*/
|
|
7509
|
+
function takesOne(param) {}
|
|
7510
|
+
// Message: This description only repeats the name it describes.
|
|
7511
|
+
|
|
7512
|
+
/**
|
|
7513
|
+
* - takes one
|
|
7514
|
+
* @other param - takes one
|
|
7515
|
+
*/
|
|
7516
|
+
function takesOne(param) {}
|
|
7517
|
+
// Message: This description only repeats the name it describes.
|
|
7518
|
+
````
|
|
7519
|
+
|
|
7520
|
+
The following patterns are not considered problems:
|
|
7521
|
+
|
|
7522
|
+
````js
|
|
7523
|
+
/** */
|
|
7524
|
+
let myValue = 3;
|
|
7525
|
+
|
|
7526
|
+
/** count */
|
|
7527
|
+
let myValue = 3;
|
|
7528
|
+
|
|
7529
|
+
/** Informative info user id. */
|
|
7530
|
+
let userId: string;
|
|
7531
|
+
|
|
7532
|
+
let myValue,
|
|
7533
|
+
/** count value **/
|
|
7534
|
+
count = 3;
|
|
7535
|
+
|
|
7536
|
+
/**
|
|
7537
|
+
* Does X Y Z work.
|
|
7538
|
+
*/
|
|
7539
|
+
function foo() {}
|
|
7540
|
+
|
|
7541
|
+
const value = {
|
|
7542
|
+
/**
|
|
7543
|
+
* the truthiness of the prop.
|
|
7544
|
+
*/
|
|
7545
|
+
prop: true,
|
|
7546
|
+
}
|
|
7547
|
+
|
|
7548
|
+
const value = {
|
|
7549
|
+
/**
|
|
7550
|
+
* the truthiness of the prop.
|
|
7551
|
+
*/
|
|
7552
|
+
['prop']: true,
|
|
7553
|
+
}
|
|
7554
|
+
|
|
7555
|
+
/**
|
|
7556
|
+
* abc def ghi
|
|
7557
|
+
*/
|
|
7558
|
+
const abc = function def() {}
|
|
7559
|
+
|
|
7560
|
+
/**
|
|
7561
|
+
* name extra
|
|
7562
|
+
*/
|
|
7563
|
+
class Name {}
|
|
7564
|
+
|
|
7565
|
+
/**
|
|
7566
|
+
* abc name extra
|
|
7567
|
+
*/
|
|
7568
|
+
const abc = class Name {}
|
|
7569
|
+
|
|
7570
|
+
class Abc {
|
|
7571
|
+
/** ghi */
|
|
7572
|
+
def;
|
|
7573
|
+
}
|
|
7574
|
+
|
|
7575
|
+
class Abc {
|
|
7576
|
+
/** ghi */
|
|
7577
|
+
accessor def;
|
|
7578
|
+
}
|
|
7579
|
+
|
|
7580
|
+
class Abc {
|
|
7581
|
+
/** ghi */
|
|
7582
|
+
def() {}
|
|
7583
|
+
}
|
|
7584
|
+
|
|
7585
|
+
class Abc {
|
|
7586
|
+
/** ghi */
|
|
7587
|
+
abstract accessor def;
|
|
7588
|
+
}
|
|
7589
|
+
|
|
7590
|
+
class Abc {
|
|
7591
|
+
/** ghi */
|
|
7592
|
+
abstract def();
|
|
7593
|
+
}
|
|
7594
|
+
|
|
7595
|
+
class Abc {
|
|
7596
|
+
/** ghi */
|
|
7597
|
+
abstract def;
|
|
7598
|
+
}
|
|
7599
|
+
|
|
7600
|
+
/** abc */
|
|
7601
|
+
namespace Def {}
|
|
7602
|
+
|
|
7603
|
+
class Abc {
|
|
7604
|
+
/** ghi */
|
|
7605
|
+
def();
|
|
7606
|
+
def() {}
|
|
7607
|
+
}
|
|
7608
|
+
|
|
7609
|
+
/** abc */
|
|
7610
|
+
declare function def();
|
|
7611
|
+
|
|
7612
|
+
/** abc */
|
|
7613
|
+
enum Def {}
|
|
7614
|
+
|
|
7615
|
+
enum Abc {
|
|
7616
|
+
/** def */
|
|
7617
|
+
ghi,
|
|
7618
|
+
}
|
|
7619
|
+
|
|
7620
|
+
/** abc */
|
|
7621
|
+
interface Def {}
|
|
7622
|
+
|
|
7623
|
+
/** abc */
|
|
7624
|
+
type Def = {};
|
|
7625
|
+
|
|
7626
|
+
/** abc */
|
|
7627
|
+
type Def = {};
|
|
7628
|
+
|
|
7629
|
+
/**
|
|
7630
|
+
* count
|
|
7631
|
+
*
|
|
7632
|
+
* @description increment value
|
|
7633
|
+
*/
|
|
7634
|
+
let value = 3;
|
|
7635
|
+
|
|
7636
|
+
/**
|
|
7637
|
+
* count
|
|
7638
|
+
*
|
|
7639
|
+
* @unknownTag - increment value
|
|
7640
|
+
*/
|
|
7641
|
+
let value = 3;
|
|
7642
|
+
|
|
7643
|
+
/**
|
|
7644
|
+
* @other param - takes one two
|
|
7645
|
+
*/
|
|
7646
|
+
function takesOne(param) {}
|
|
7647
|
+
|
|
7648
|
+
/**
|
|
7649
|
+
* takes abc param
|
|
7650
|
+
*/
|
|
7651
|
+
function takesOne(param) {}
|
|
7652
|
+
````
|
|
7653
|
+
|
|
7654
|
+
|
|
7275
7655
|
<a name="user-content-eslint-plugin-jsdoc-rules-match-description"></a>
|
|
7276
7656
|
<a name="eslint-plugin-jsdoc-rules-match-description"></a>
|
|
7277
7657
|
### <code>match-description</code>
|
|
@@ -7300,12 +7680,12 @@ case-insensitive unless one opts in to add the `i` flag.
|
|
|
7300
7680
|
You can add the `s` flag if you want `.` to match newlines. Note, however,
|
|
7301
7681
|
that the trailing newlines of a description will not be matched.
|
|
7302
7682
|
|
|
7303
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-
|
|
7304
|
-
<a name="eslint-plugin-jsdoc-rules-match-description-options-
|
|
7683
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-12"></a>
|
|
7684
|
+
<a name="eslint-plugin-jsdoc-rules-match-description-options-12"></a>
|
|
7305
7685
|
#### Options
|
|
7306
7686
|
|
|
7307
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-
|
|
7308
|
-
<a name="eslint-plugin-jsdoc-rules-match-description-options-
|
|
7687
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-12-matchdescription"></a>
|
|
7688
|
+
<a name="eslint-plugin-jsdoc-rules-match-description-options-12-matchdescription"></a>
|
|
7309
7689
|
##### <code>matchDescription</code>
|
|
7310
7690
|
|
|
7311
7691
|
You can supply your own expression to override the default, passing a
|
|
@@ -7317,8 +7697,8 @@ You can supply your own expression to override the default, passing a
|
|
|
7317
7697
|
}
|
|
7318
7698
|
```
|
|
7319
7699
|
|
|
7320
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-
|
|
7321
|
-
<a name="eslint-plugin-jsdoc-rules-match-description-options-
|
|
7700
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-12-message"></a>
|
|
7701
|
+
<a name="eslint-plugin-jsdoc-rules-match-description-options-12-message"></a>
|
|
7322
7702
|
##### <code>message</code>
|
|
7323
7703
|
|
|
7324
7704
|
You may provide a custom default message by using the following format:
|
|
@@ -7334,8 +7714,8 @@ You may provide a custom default message by using the following format:
|
|
|
7334
7714
|
This can be overridden per tag or for the main block description by setting
|
|
7335
7715
|
`message` within `tags` or `mainDescription`, respectively.
|
|
7336
7716
|
|
|
7337
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-
|
|
7338
|
-
<a name="eslint-plugin-jsdoc-rules-match-description-options-
|
|
7717
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-12-tags-2"></a>
|
|
7718
|
+
<a name="eslint-plugin-jsdoc-rules-match-description-options-12-tags-2"></a>
|
|
7339
7719
|
##### <code>tags</code>
|
|
7340
7720
|
|
|
7341
7721
|
If you want different regular expressions to apply to tags, you may use
|
|
@@ -7384,8 +7764,8 @@ its "description" (e.g., for `@returns {someType} some description`, the
|
|
|
7384
7764
|
description is `some description` while for `@some-tag xyz`, the description
|
|
7385
7765
|
is `xyz`).
|
|
7386
7766
|
|
|
7387
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-
|
|
7388
|
-
<a name="eslint-plugin-jsdoc-rules-match-description-options-
|
|
7767
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-12-maindescription"></a>
|
|
7768
|
+
<a name="eslint-plugin-jsdoc-rules-match-description-options-12-maindescription"></a>
|
|
7389
7769
|
##### <code>mainDescription</code>
|
|
7390
7770
|
|
|
7391
7771
|
If you wish to override the main block description without changing the
|
|
@@ -7425,8 +7805,8 @@ You may also provide an object with `message`:
|
|
|
7425
7805
|
}
|
|
7426
7806
|
```
|
|
7427
7807
|
|
|
7428
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-
|
|
7429
|
-
<a name="eslint-plugin-jsdoc-rules-match-description-options-
|
|
7808
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-12-contexts-2"></a>
|
|
7809
|
+
<a name="eslint-plugin-jsdoc-rules-match-description-options-12-contexts-2"></a>
|
|
7430
7810
|
##### <code>contexts</code>
|
|
7431
7811
|
|
|
7432
7812
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -8246,14 +8626,14 @@ that tag).
|
|
|
8246
8626
|
|
|
8247
8627
|
Will replace `disallowName` with `replacement` if these are provided.
|
|
8248
8628
|
|
|
8249
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-match-name-options-
|
|
8250
|
-
<a name="eslint-plugin-jsdoc-rules-match-name-options-
|
|
8629
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-name-options-13"></a>
|
|
8630
|
+
<a name="eslint-plugin-jsdoc-rules-match-name-options-13"></a>
|
|
8251
8631
|
#### Options
|
|
8252
8632
|
|
|
8253
8633
|
A single options object with the following properties:
|
|
8254
8634
|
|
|
8255
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-match-name-options-
|
|
8256
|
-
<a name="eslint-plugin-jsdoc-rules-match-name-options-
|
|
8635
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-name-options-13-match"></a>
|
|
8636
|
+
<a name="eslint-plugin-jsdoc-rules-match-name-options-13-match"></a>
|
|
8257
8637
|
##### <code>match</code>
|
|
8258
8638
|
|
|
8259
8639
|
`match` is a required option containing an array of objects which determine
|
|
@@ -8468,14 +8848,14 @@ all jsdoc blocks!
|
|
|
8468
8848
|
|
|
8469
8849
|
Also allows for preventing text at the very beginning or very end of blocks.
|
|
8470
8850
|
|
|
8471
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8472
|
-
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8851
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-14"></a>
|
|
8852
|
+
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-14"></a>
|
|
8473
8853
|
#### Options
|
|
8474
8854
|
|
|
8475
8855
|
A single options object with the following properties.
|
|
8476
8856
|
|
|
8477
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8478
|
-
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8857
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-14-nozerolinetext-defaults-to-true"></a>
|
|
8858
|
+
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-14-nozerolinetext-defaults-to-true"></a>
|
|
8479
8859
|
##### <code>noZeroLineText</code> (defaults to <code>true</code>)
|
|
8480
8860
|
|
|
8481
8861
|
For multiline blocks, any non-whitespace text immediately after the `/**` and
|
|
@@ -8483,8 +8863,8 @@ space will be reported. (Text after a newline is not reported.)
|
|
|
8483
8863
|
|
|
8484
8864
|
`noMultilineBlocks` will have priority over this rule if it applies.
|
|
8485
8865
|
|
|
8486
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8487
|
-
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8866
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-14-nofinallinetext-defaults-to-true"></a>
|
|
8867
|
+
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-14-nofinallinetext-defaults-to-true"></a>
|
|
8488
8868
|
##### <code>noFinalLineText</code> (defaults to <code>true</code>)
|
|
8489
8869
|
|
|
8490
8870
|
For multiline blocks, any non-whitespace text preceding the `*/` on the final
|
|
@@ -8492,15 +8872,15 @@ line will be reported. (Text preceding a newline is not reported.)
|
|
|
8492
8872
|
|
|
8493
8873
|
`noMultilineBlocks` will have priority over this rule if it applies.
|
|
8494
8874
|
|
|
8495
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8496
|
-
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8875
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-14-nosinglelineblocks-defaults-to-false"></a>
|
|
8876
|
+
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-14-nosinglelineblocks-defaults-to-false"></a>
|
|
8497
8877
|
##### <code>noSingleLineBlocks</code> (defaults to <code>false</code>)
|
|
8498
8878
|
|
|
8499
8879
|
If this is `true`, any single line blocks will be reported, except those which
|
|
8500
8880
|
are whitelisted in `singleLineTags`.
|
|
8501
8881
|
|
|
8502
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8503
|
-
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8882
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-14-singlelinetags-defaults-to-lends-type"></a>
|
|
8883
|
+
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-14-singlelinetags-defaults-to-lends-type"></a>
|
|
8504
8884
|
##### <code>singleLineTags</code> (defaults to <code>['lends', 'type']</code>)
|
|
8505
8885
|
|
|
8506
8886
|
An array of tags which can nevertheless be allowed as single line blocks when
|
|
@@ -8509,16 +8889,16 @@ cause all single line blocks to be reported. If `'*'` is present, then
|
|
|
8509
8889
|
the presence of a tag will allow single line blocks (but not if a tag is
|
|
8510
8890
|
missing).
|
|
8511
8891
|
|
|
8512
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8513
|
-
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8892
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-14-nomultilineblocks-defaults-to-false"></a>
|
|
8893
|
+
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-14-nomultilineblocks-defaults-to-false"></a>
|
|
8514
8894
|
##### <code>noMultilineBlocks</code> (defaults to <code>false</code>)
|
|
8515
8895
|
|
|
8516
8896
|
Requires that jsdoc blocks are restricted to single lines only unless impacted
|
|
8517
8897
|
by the options `minimumLengthForMultiline`, `multilineTags`, or
|
|
8518
8898
|
`allowMultipleTags`.
|
|
8519
8899
|
|
|
8520
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8521
|
-
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8900
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-14-minimumlengthformultiline-defaults-to-not-being-in-effect"></a>
|
|
8901
|
+
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-14-minimumlengthformultiline-defaults-to-not-being-in-effect"></a>
|
|
8522
8902
|
##### <code>minimumLengthForMultiline</code> (defaults to not being in effect)
|
|
8523
8903
|
|
|
8524
8904
|
If `noMultilineBlocks` is set with this numeric option, multiline blocks will
|
|
@@ -8527,8 +8907,8 @@ be permitted if containing at least the given amount of text.
|
|
|
8527
8907
|
If not set, multiline blocks will not be permitted regardless of length unless
|
|
8528
8908
|
a relevant tag is present and `multilineTags` is set.
|
|
8529
8909
|
|
|
8530
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8531
|
-
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8910
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-14-multilinetags-defaults-to"></a>
|
|
8911
|
+
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-14-multilinetags-defaults-to"></a>
|
|
8532
8912
|
##### <code>multilineTags</code> (defaults to <code>['*']</code>)
|
|
8533
8913
|
|
|
8534
8914
|
If `noMultilineBlocks` is set with this option, multiline blocks may be allowed
|
|
@@ -8544,8 +8924,8 @@ such a tag will cause multiline blocks to be allowed.
|
|
|
8544
8924
|
You may set this to an empty array to prevent any tag from permitting multiple
|
|
8545
8925
|
lines.
|
|
8546
8926
|
|
|
8547
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8548
|
-
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-
|
|
8927
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-14-allowmultipletags-defaults-to-true"></a>
|
|
8928
|
+
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-14-allowmultipletags-defaults-to-true"></a>
|
|
8549
8929
|
##### <code>allowMultipleTags</code> (defaults to <code>true</code>)
|
|
8550
8930
|
|
|
8551
8931
|
If `noMultilineBlocks` is set to `true` with this option and multiple tags are
|
|
@@ -8838,8 +9218,8 @@ The following patterns are not considered problems:
|
|
|
8838
9218
|
|
|
8839
9219
|
Enforces a consistent padding of the block description.
|
|
8840
9220
|
|
|
8841
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-newline-after-description-options-
|
|
8842
|
-
<a name="eslint-plugin-jsdoc-rules-newline-after-description-options-
|
|
9221
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-newline-after-description-options-15"></a>
|
|
9222
|
+
<a name="eslint-plugin-jsdoc-rules-newline-after-description-options-15"></a>
|
|
8843
9223
|
#### Options
|
|
8844
9224
|
|
|
8845
9225
|
This rule allows one optional string argument. If it is `"always"` then a
|
|
@@ -9083,14 +9463,14 @@ asterisks, but which appear to be intended as jsdoc blocks due to the presence
|
|
|
9083
9463
|
of whitespace followed by whitespace or asterisks, and
|
|
9084
9464
|
an at-sign (`@`) and some non-whitespace (as with a jsdoc block tag).
|
|
9085
9465
|
|
|
9086
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks-options-
|
|
9087
|
-
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks-options-
|
|
9466
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks-options-16"></a>
|
|
9467
|
+
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks-options-16"></a>
|
|
9088
9468
|
#### Options
|
|
9089
9469
|
|
|
9090
9470
|
Takes an optional options object with the following.
|
|
9091
9471
|
|
|
9092
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks-options-
|
|
9093
|
-
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks-options-
|
|
9472
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks-options-16-ignore"></a>
|
|
9473
|
+
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks-options-16-ignore"></a>
|
|
9094
9474
|
##### <code>ignore</code>
|
|
9095
9475
|
|
|
9096
9476
|
An array of directives that will not be reported if present at the beginning of
|
|
@@ -9099,8 +9479,8 @@ a multi-comment block and at-sign `/* @`.
|
|
|
9099
9479
|
Defaults to `['ts-check', 'ts-expect-error', 'ts-ignore', 'ts-nocheck']`
|
|
9100
9480
|
(some directives [used by TypeScript](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check)).
|
|
9101
9481
|
|
|
9102
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks-options-
|
|
9103
|
-
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks-options-
|
|
9482
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks-options-16-preventallmultiasteriskblocks"></a>
|
|
9483
|
+
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks-options-16-preventallmultiasteriskblocks"></a>
|
|
9104
9484
|
##### <code>preventAllMultiAsteriskBlocks</code>
|
|
9105
9485
|
|
|
9106
9486
|
A boolean (defaulting to `false`) which if `true` will prevent all
|
|
@@ -9312,12 +9692,12 @@ tag is attached).
|
|
|
9312
9692
|
Unless your `@default` is on a function, you will need to set `contexts`
|
|
9313
9693
|
to an appropriate context, including, if you wish, "any".
|
|
9314
9694
|
|
|
9315
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults-options-
|
|
9316
|
-
<a name="eslint-plugin-jsdoc-rules-no-defaults-options-
|
|
9695
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults-options-17"></a>
|
|
9696
|
+
<a name="eslint-plugin-jsdoc-rules-no-defaults-options-17"></a>
|
|
9317
9697
|
#### Options
|
|
9318
9698
|
|
|
9319
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults-options-
|
|
9320
|
-
<a name="eslint-plugin-jsdoc-rules-no-defaults-options-
|
|
9699
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults-options-17-nooptionalparamnames"></a>
|
|
9700
|
+
<a name="eslint-plugin-jsdoc-rules-no-defaults-options-17-nooptionalparamnames"></a>
|
|
9321
9701
|
##### <code>noOptionalParamNames</code>
|
|
9322
9702
|
|
|
9323
9703
|
Set this to `true` to report the presence of optional parameters. May be
|
|
@@ -9326,8 +9706,8 @@ the presence of ES6 default parameters (bearing in mind that such
|
|
|
9326
9706
|
"defaults" are only applied when the supplied value is missing or
|
|
9327
9707
|
`undefined` but not for `null` or other "falsey" values).
|
|
9328
9708
|
|
|
9329
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults-options-
|
|
9330
|
-
<a name="eslint-plugin-jsdoc-rules-no-defaults-options-
|
|
9709
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults-options-17-contexts-3"></a>
|
|
9710
|
+
<a name="eslint-plugin-jsdoc-rules-no-defaults-options-17-contexts-3"></a>
|
|
9331
9711
|
##### <code>contexts</code>
|
|
9332
9712
|
|
|
9333
9713
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -9513,12 +9893,12 @@ which are not adequate to satisfy a condition, e.g.,
|
|
|
9513
9893
|
not report if there were only a function declaration of the name "ignoreMe"
|
|
9514
9894
|
(though it would report by function declarations of other names).
|
|
9515
9895
|
|
|
9516
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-missing-syntax-options-
|
|
9517
|
-
<a name="eslint-plugin-jsdoc-rules-no-missing-syntax-options-
|
|
9896
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-missing-syntax-options-18"></a>
|
|
9897
|
+
<a name="eslint-plugin-jsdoc-rules-no-missing-syntax-options-18"></a>
|
|
9518
9898
|
#### Options
|
|
9519
9899
|
|
|
9520
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-missing-syntax-options-
|
|
9521
|
-
<a name="eslint-plugin-jsdoc-rules-no-missing-syntax-options-
|
|
9900
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-missing-syntax-options-18-contexts-4"></a>
|
|
9901
|
+
<a name="eslint-plugin-jsdoc-rules-no-missing-syntax-options-18-contexts-4"></a>
|
|
9522
9902
|
##### <code>contexts</code>
|
|
9523
9903
|
|
|
9524
9904
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -9734,12 +10114,12 @@ Note that if you wish to prevent multiple asterisks at the very beginning of
|
|
|
9734
10114
|
the jsdoc block, you should use `no-bad-blocks` (as that is not proper jsdoc
|
|
9735
10115
|
and that rule is for catching blocks which only seem like jsdoc).
|
|
9736
10116
|
|
|
9737
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-
|
|
9738
|
-
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-
|
|
10117
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-19"></a>
|
|
10118
|
+
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-19"></a>
|
|
9739
10119
|
#### Options
|
|
9740
10120
|
|
|
9741
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-
|
|
9742
|
-
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-
|
|
10121
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-19-allowwhitespace-defaults-to-false"></a>
|
|
10122
|
+
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-19-allowwhitespace-defaults-to-false"></a>
|
|
9743
10123
|
##### <code>allowWhitespace</code> (defaults to <code>false</code>)
|
|
9744
10124
|
|
|
9745
10125
|
Set to `true` if you wish to allow asterisks after a space (as with Markdown):
|
|
@@ -9750,8 +10130,8 @@ Set to `true` if you wish to allow asterisks after a space (as with Markdown):
|
|
|
9750
10130
|
*/
|
|
9751
10131
|
```
|
|
9752
10132
|
|
|
9753
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-
|
|
9754
|
-
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-
|
|
10133
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-19-preventatmiddlelines-defaults-to-true"></a>
|
|
10134
|
+
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-19-preventatmiddlelines-defaults-to-true"></a>
|
|
9755
10135
|
##### <code>preventAtMiddleLines</code> (defaults to <code>true</code>)
|
|
9756
10136
|
|
|
9757
10137
|
Prevent the likes of this:
|
|
@@ -9763,8 +10143,8 @@ Prevent the likes of this:
|
|
|
9763
10143
|
*/
|
|
9764
10144
|
```
|
|
9765
10145
|
|
|
9766
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-
|
|
9767
|
-
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-
|
|
10146
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-19-preventatend-defaults-to-true"></a>
|
|
10147
|
+
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-19-preventatend-defaults-to-true"></a>
|
|
9768
10148
|
##### <code>preventAtEnd</code> (defaults to <code>true</code>)
|
|
9769
10149
|
|
|
9770
10150
|
Prevent the likes of this:
|
|
@@ -9999,12 +10379,12 @@ structures, (whether or not you add a specific `comment` condition).
|
|
|
9999
10379
|
Note that if your parser supports comment AST (as [jsdoc-eslint-parser](https://github.com/brettz9/jsdoc-eslint-parser)
|
|
10000
10380
|
is designed to do), you can just use ESLint's rule.
|
|
10001
10381
|
|
|
10002
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-restricted-syntax-options-
|
|
10003
|
-
<a name="eslint-plugin-jsdoc-rules-no-restricted-syntax-options-
|
|
10382
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-restricted-syntax-options-20"></a>
|
|
10383
|
+
<a name="eslint-plugin-jsdoc-rules-no-restricted-syntax-options-20"></a>
|
|
10004
10384
|
#### Options
|
|
10005
10385
|
|
|
10006
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-restricted-syntax-options-
|
|
10007
|
-
<a name="eslint-plugin-jsdoc-rules-no-restricted-syntax-options-
|
|
10386
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-restricted-syntax-options-20-contexts-5"></a>
|
|
10387
|
+
<a name="eslint-plugin-jsdoc-rules-no-restricted-syntax-options-20-contexts-5"></a>
|
|
10008
10388
|
##### <code>contexts</code>
|
|
10009
10389
|
|
|
10010
10390
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -10329,12 +10709,12 @@ This rule reports types being used on `@param` or `@returns`.
|
|
|
10329
10709
|
The rule is intended to prevent the indication of types on tags where
|
|
10330
10710
|
the type information would be redundant with TypeScript.
|
|
10331
10711
|
|
|
10332
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-types-options-
|
|
10333
|
-
<a name="eslint-plugin-jsdoc-rules-no-types-options-
|
|
10712
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-types-options-21"></a>
|
|
10713
|
+
<a name="eslint-plugin-jsdoc-rules-no-types-options-21"></a>
|
|
10334
10714
|
#### Options
|
|
10335
10715
|
|
|
10336
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-types-options-
|
|
10337
|
-
<a name="eslint-plugin-jsdoc-rules-no-types-options-
|
|
10716
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-types-options-21-contexts-6"></a>
|
|
10717
|
+
<a name="eslint-plugin-jsdoc-rules-no-types-options-21-contexts-6"></a>
|
|
10338
10718
|
##### <code>contexts</code>
|
|
10339
10719
|
|
|
10340
10720
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -10508,8 +10888,8 @@ reporting on use of that namepath elsewhere) and/or that a tag's `type` is
|
|
|
10508
10888
|
`false` (and should not be checked for types). If the `type` is an array, that
|
|
10509
10889
|
array's items will be considered as defined for the purposes of that tag.
|
|
10510
10890
|
|
|
10511
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-no-undefined-types-options-
|
|
10512
|
-
<a name="eslint-plugin-jsdoc-rules-no-undefined-types-options-
|
|
10891
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-undefined-types-options-22"></a>
|
|
10892
|
+
<a name="eslint-plugin-jsdoc-rules-no-undefined-types-options-22"></a>
|
|
10513
10893
|
#### Options
|
|
10514
10894
|
|
|
10515
10895
|
An option object may have the following key:
|
|
@@ -11177,8 +11557,8 @@ class Foo {
|
|
|
11177
11557
|
|
|
11178
11558
|
Requires that each JSDoc line starts with an `*`.
|
|
11179
11559
|
|
|
11180
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-
|
|
11181
|
-
<a name="eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-
|
|
11560
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-23"></a>
|
|
11561
|
+
<a name="eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-23"></a>
|
|
11182
11562
|
#### Options
|
|
11183
11563
|
|
|
11184
11564
|
This rule allows an optional string argument. If it is `"always"` then a
|
|
@@ -11189,8 +11569,8 @@ and use the `tags` option to apply to specific tags only.
|
|
|
11189
11569
|
|
|
11190
11570
|
After the string option, one may add an object with the following.
|
|
11191
11571
|
|
|
11192
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-
|
|
11193
|
-
<a name="eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-
|
|
11572
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-23-tags-3"></a>
|
|
11573
|
+
<a name="eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-23-tags-3"></a>
|
|
11194
11574
|
##### <code>tags</code>
|
|
11195
11575
|
|
|
11196
11576
|
If you want different values to apply to specific tags, you may use
|
|
@@ -11474,12 +11854,12 @@ If sentences do not end with terminal punctuation, a period will be added.
|
|
|
11474
11854
|
If sentences do not start with an uppercase character, the initial
|
|
11475
11855
|
letter will be capitalized.
|
|
11476
11856
|
|
|
11477
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-
|
|
11478
|
-
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-
|
|
11857
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-24"></a>
|
|
11858
|
+
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-24"></a>
|
|
11479
11859
|
#### Options
|
|
11480
11860
|
|
|
11481
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-
|
|
11482
|
-
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-
|
|
11861
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-24-tags-4"></a>
|
|
11862
|
+
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-24-tags-4"></a>
|
|
11483
11863
|
##### <code>tags</code>
|
|
11484
11864
|
|
|
11485
11865
|
If you want additional tags to be checked for their descriptions, you may
|
|
@@ -11503,16 +11883,16 @@ its "description" (e.g., for `@returns {someType} some description`, the
|
|
|
11503
11883
|
description is `some description` while for `@some-tag xyz`, the description
|
|
11504
11884
|
is `xyz`).
|
|
11505
11885
|
|
|
11506
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-
|
|
11507
|
-
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-
|
|
11886
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-24-abbreviations"></a>
|
|
11887
|
+
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-24-abbreviations"></a>
|
|
11508
11888
|
##### <code>abbreviations</code>
|
|
11509
11889
|
|
|
11510
11890
|
You can provide an `abbreviations` options array to avoid such strings of text
|
|
11511
11891
|
being treated as sentence endings when followed by dots. The `.` is not
|
|
11512
11892
|
necessary at the end of the array items.
|
|
11513
11893
|
|
|
11514
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-
|
|
11515
|
-
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-
|
|
11894
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-24-newlinebeforecapsassumesbadsentenceend"></a>
|
|
11895
|
+
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-24-newlinebeforecapsassumesbadsentenceend"></a>
|
|
11516
11896
|
##### <code>newlineBeforeCapsAssumesBadSentenceEnd</code>
|
|
11517
11897
|
|
|
11518
11898
|
When `false` (the new default), we will not assume capital letters after
|
|
@@ -12253,8 +12633,8 @@ Requires that all functions have a description.
|
|
|
12253
12633
|
is `"tag"`) must have a non-empty description that explains the purpose of
|
|
12254
12634
|
the method.
|
|
12255
12635
|
|
|
12256
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-options-
|
|
12257
|
-
<a name="eslint-plugin-jsdoc-rules-require-description-options-
|
|
12636
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-options-25"></a>
|
|
12637
|
+
<a name="eslint-plugin-jsdoc-rules-require-description-options-25"></a>
|
|
12258
12638
|
#### Options
|
|
12259
12639
|
|
|
12260
12640
|
An options object may have any of the following properties:
|
|
@@ -12815,14 +13195,14 @@ Requires that all functions have examples.
|
|
|
12815
13195
|
* Every example tag must have a non-empty description that explains the
|
|
12816
13196
|
method's usage.
|
|
12817
13197
|
|
|
12818
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-
|
|
12819
|
-
<a name="eslint-plugin-jsdoc-rules-require-example-options-
|
|
13198
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-26"></a>
|
|
13199
|
+
<a name="eslint-plugin-jsdoc-rules-require-example-options-26"></a>
|
|
12820
13200
|
#### Options
|
|
12821
13201
|
|
|
12822
13202
|
This rule has an object option.
|
|
12823
13203
|
|
|
12824
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-
|
|
12825
|
-
<a name="eslint-plugin-jsdoc-rules-require-example-options-
|
|
13204
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-26-exemptedby"></a>
|
|
13205
|
+
<a name="eslint-plugin-jsdoc-rules-require-example-options-26-exemptedby"></a>
|
|
12826
13206
|
##### <code>exemptedBy</code>
|
|
12827
13207
|
|
|
12828
13208
|
Array of tags (e.g., `['type']`) whose presence on the document
|
|
@@ -12831,15 +13211,15 @@ block avoids the need for an `@example`. Defaults to an array with
|
|
|
12831
13211
|
so be sure to add back `inheritdoc` if you wish its presence to cause
|
|
12832
13212
|
exemption of the rule.
|
|
12833
13213
|
|
|
12834
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-
|
|
12835
|
-
<a name="eslint-plugin-jsdoc-rules-require-example-options-
|
|
13214
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-26-exemptnoarguments"></a>
|
|
13215
|
+
<a name="eslint-plugin-jsdoc-rules-require-example-options-26-exemptnoarguments"></a>
|
|
12836
13216
|
##### <code>exemptNoArguments</code>
|
|
12837
13217
|
|
|
12838
13218
|
Boolean to indicate that no-argument functions should not be reported for
|
|
12839
13219
|
missing `@example` declarations.
|
|
12840
13220
|
|
|
12841
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-
|
|
12842
|
-
<a name="eslint-plugin-jsdoc-rules-require-example-options-
|
|
13221
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-26-contexts-7"></a>
|
|
13222
|
+
<a name="eslint-plugin-jsdoc-rules-require-example-options-26-contexts-7"></a>
|
|
12843
13223
|
##### <code>contexts</code>
|
|
12844
13224
|
|
|
12845
13225
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -12851,27 +13231,27 @@ want the rule to apply to any jsdoc block throughout your files.
|
|
|
12851
13231
|
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
12852
13232
|
section of our README for more on the expected format.
|
|
12853
13233
|
|
|
12854
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-
|
|
12855
|
-
<a name="eslint-plugin-jsdoc-rules-require-example-options-
|
|
13234
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-26-checkconstructors"></a>
|
|
13235
|
+
<a name="eslint-plugin-jsdoc-rules-require-example-options-26-checkconstructors"></a>
|
|
12856
13236
|
##### <code>checkConstructors</code>
|
|
12857
13237
|
|
|
12858
13238
|
A value indicating whether `constructor`s should be checked.
|
|
12859
13239
|
Defaults to `true`.
|
|
12860
13240
|
|
|
12861
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-
|
|
12862
|
-
<a name="eslint-plugin-jsdoc-rules-require-example-options-
|
|
13241
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-26-checkgetters"></a>
|
|
13242
|
+
<a name="eslint-plugin-jsdoc-rules-require-example-options-26-checkgetters"></a>
|
|
12863
13243
|
##### <code>checkGetters</code>
|
|
12864
13244
|
|
|
12865
13245
|
A value indicating whether getters should be checked. Defaults to `false`.
|
|
12866
13246
|
|
|
12867
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-
|
|
12868
|
-
<a name="eslint-plugin-jsdoc-rules-require-example-options-
|
|
13247
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-26-checksetters"></a>
|
|
13248
|
+
<a name="eslint-plugin-jsdoc-rules-require-example-options-26-checksetters"></a>
|
|
12869
13249
|
##### <code>checkSetters</code>
|
|
12870
13250
|
|
|
12871
13251
|
A value indicating whether setters should be checked. Defaults to `false`.
|
|
12872
13252
|
|
|
12873
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-
|
|
12874
|
-
<a name="eslint-plugin-jsdoc-rules-require-example-options-
|
|
13253
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-26-enablefixer-3"></a>
|
|
13254
|
+
<a name="eslint-plugin-jsdoc-rules-require-example-options-26-enablefixer-3"></a>
|
|
12875
13255
|
##### <code>enableFixer</code>
|
|
12876
13256
|
|
|
12877
13257
|
A boolean on whether to enable the fixer (which adds an empty `@example` block).
|
|
@@ -13184,12 +13564,12 @@ Checks that:
|
|
|
13184
13564
|
as being when the overview tag is not preceded by anything other than
|
|
13185
13565
|
a comment.
|
|
13186
13566
|
|
|
13187
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-file-overview-options-
|
|
13188
|
-
<a name="eslint-plugin-jsdoc-rules-require-file-overview-options-
|
|
13567
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-file-overview-options-27"></a>
|
|
13568
|
+
<a name="eslint-plugin-jsdoc-rules-require-file-overview-options-27"></a>
|
|
13189
13569
|
#### Options
|
|
13190
13570
|
|
|
13191
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-file-overview-options-
|
|
13192
|
-
<a name="eslint-plugin-jsdoc-rules-require-file-overview-options-
|
|
13571
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-file-overview-options-27-tags-5"></a>
|
|
13572
|
+
<a name="eslint-plugin-jsdoc-rules-require-file-overview-options-27-tags-5"></a>
|
|
13193
13573
|
##### <code>tags</code>
|
|
13194
13574
|
|
|
13195
13575
|
The keys of this object are tag names, and the values are configuration
|
|
@@ -13473,8 +13853,8 @@ function quux () {
|
|
|
13473
13853
|
|
|
13474
13854
|
Requires (or disallows) a hyphen before the `@param` description.
|
|
13475
13855
|
|
|
13476
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-hyphen-before-param-description-options-
|
|
13477
|
-
<a name="eslint-plugin-jsdoc-rules-require-hyphen-before-param-description-options-
|
|
13856
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-hyphen-before-param-description-options-28"></a>
|
|
13857
|
+
<a name="eslint-plugin-jsdoc-rules-require-hyphen-before-param-description-options-28"></a>
|
|
13478
13858
|
#### Options
|
|
13479
13859
|
|
|
13480
13860
|
This rule takes one optional string argument and an optional options object.
|
|
@@ -13706,14 +14086,14 @@ function main(argv) {
|
|
|
13706
14086
|
Checks for presence of jsdoc comments, on class declarations as well as
|
|
13707
14087
|
functions.
|
|
13708
14088
|
|
|
13709
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13710
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14089
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29"></a>
|
|
14090
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29"></a>
|
|
13711
14091
|
#### Options
|
|
13712
14092
|
|
|
13713
14093
|
Accepts one optional options object with the following optional keys.
|
|
13714
14094
|
|
|
13715
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13716
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14095
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-publiconly"></a>
|
|
14096
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-publiconly"></a>
|
|
13717
14097
|
##### <code>publicOnly</code>
|
|
13718
14098
|
|
|
13719
14099
|
This option will insist that missing jsdoc blocks are only reported for
|
|
@@ -13729,8 +14109,8 @@ otherwise noted):
|
|
|
13729
14109
|
- `cjs` - CommonJS exports are checked for JSDoc comments (Defaults to `true`)
|
|
13730
14110
|
- `window` - Window global exports are checked for JSDoc comments
|
|
13731
14111
|
|
|
13732
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13733
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14112
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-require"></a>
|
|
14113
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-require"></a>
|
|
13734
14114
|
##### <code>require</code>
|
|
13735
14115
|
|
|
13736
14116
|
An object with the following optional boolean keys which all default to
|
|
@@ -13743,8 +14123,8 @@ An object with the following optional boolean keys which all default to
|
|
|
13743
14123
|
- `FunctionExpression`
|
|
13744
14124
|
- `MethodDefinition`
|
|
13745
14125
|
|
|
13746
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13747
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14126
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-contexts-8"></a>
|
|
14127
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-contexts-8"></a>
|
|
13748
14128
|
##### <code>contexts</code>
|
|
13749
14129
|
|
|
13750
14130
|
Set this to an array of strings or objects representing the additional AST
|
|
@@ -13761,8 +14141,8 @@ if you are specifying a more precise form in `contexts` (e.g., `MethodDefinition
|
|
|
13761
14141
|
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
13762
14142
|
section of our README for more on the expected format.
|
|
13763
14143
|
|
|
13764
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13765
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14144
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-exemptemptyconstructors"></a>
|
|
14145
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-exemptemptyconstructors"></a>
|
|
13766
14146
|
##### <code>exemptEmptyConstructors</code>
|
|
13767
14147
|
|
|
13768
14148
|
Default: true
|
|
@@ -13771,8 +14151,8 @@ When `true`, the rule will not report missing jsdoc blocks above constructors
|
|
|
13771
14151
|
with no parameters or return values (this is enabled by default as the class
|
|
13772
14152
|
name or description should be seen as sufficient to convey intent).
|
|
13773
14153
|
|
|
13774
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13775
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14154
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-exemptemptyfunctions"></a>
|
|
14155
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-exemptemptyfunctions"></a>
|
|
13776
14156
|
##### <code>exemptEmptyFunctions</code>
|
|
13777
14157
|
|
|
13778
14158
|
Default: false.
|
|
@@ -13781,16 +14161,16 @@ When `true`, the rule will not report missing jsdoc blocks above
|
|
|
13781
14161
|
functions/methods with no parameters or return values (intended where
|
|
13782
14162
|
function/method names are sufficient for themselves as documentation).
|
|
13783
14163
|
|
|
13784
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13785
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14164
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-checkconstructors-1"></a>
|
|
14165
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-checkconstructors-1"></a>
|
|
13786
14166
|
##### <code>checkConstructors</code>
|
|
13787
14167
|
|
|
13788
14168
|
A value indicating whether `constructor`s should be checked. Defaults to
|
|
13789
14169
|
`true`. When `true`, `exemptEmptyConstructors` may still avoid reporting when
|
|
13790
14170
|
no parameters or return values are found.
|
|
13791
14171
|
|
|
13792
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13793
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14172
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-checkgetters-1"></a>
|
|
14173
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-checkgetters-1"></a>
|
|
13794
14174
|
##### <code>checkGetters</code>
|
|
13795
14175
|
|
|
13796
14176
|
A value indicating whether getters should be checked. Besides setting as a
|
|
@@ -13799,8 +14179,8 @@ getters should be checked but only when there is no setter. This may be useful
|
|
|
13799
14179
|
if one only wishes documentation on one of the two accessors. Defaults to
|
|
13800
14180
|
`false`.
|
|
13801
14181
|
|
|
13802
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13803
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14182
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-checksetters-1"></a>
|
|
14183
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-checksetters-1"></a>
|
|
13804
14184
|
##### <code>checkSetters</code>
|
|
13805
14185
|
|
|
13806
14186
|
A value indicating whether setters should be checked. Besides setting as a
|
|
@@ -13809,15 +14189,15 @@ setters should be checked but only when there is no getter. This may be useful
|
|
|
13809
14189
|
if one only wishes documentation on one of the two accessors. Defaults to
|
|
13810
14190
|
`false`.
|
|
13811
14191
|
|
|
13812
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13813
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14192
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-enablefixer-4"></a>
|
|
14193
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-enablefixer-4"></a>
|
|
13814
14194
|
##### <code>enableFixer</code>
|
|
13815
14195
|
|
|
13816
14196
|
A boolean on whether to enable the fixer (which adds an empty jsdoc block).
|
|
13817
14197
|
Defaults to `true`.
|
|
13818
14198
|
|
|
13819
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
13820
|
-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-
|
|
14199
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-29-minlinecount"></a>
|
|
14200
|
+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-29-minlinecount"></a>
|
|
13821
14201
|
##### <code>minLineCount</code>
|
|
13822
14202
|
|
|
13823
14203
|
An integer to indicate a minimum number of lines expected for a node in order
|
|
@@ -15509,12 +15889,12 @@ Will exempt destructured roots and their children if
|
|
|
15509
15889
|
`@param {object} props` will be exempted from requiring a description given
|
|
15510
15890
|
`function someFunc ({child1, child2})`).
|
|
15511
15891
|
|
|
15512
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-
|
|
15513
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-
|
|
15892
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-30"></a>
|
|
15893
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-30"></a>
|
|
15514
15894
|
#### Options
|
|
15515
15895
|
|
|
15516
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-
|
|
15517
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-
|
|
15896
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-30-setdefaultdestructuredrootdescription"></a>
|
|
15897
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-30-setdefaultdestructuredrootdescription"></a>
|
|
15518
15898
|
##### <code>setDefaultDestructuredRootDescription</code>
|
|
15519
15899
|
|
|
15520
15900
|
Whether to set a default destructured root description. For example, you may
|
|
@@ -15523,15 +15903,15 @@ corresponding to a destructured root object as it should always be the same
|
|
|
15523
15903
|
type of object. Uses `defaultDestructuredRootDescription` for the description
|
|
15524
15904
|
string. Defaults to `false`.
|
|
15525
15905
|
|
|
15526
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-
|
|
15527
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-
|
|
15906
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-30-defaultdestructuredrootdescription"></a>
|
|
15907
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-30-defaultdestructuredrootdescription"></a>
|
|
15528
15908
|
##### <code>defaultDestructuredRootDescription</code>
|
|
15529
15909
|
|
|
15530
15910
|
The description string to set by default for destructured roots. Defaults to
|
|
15531
15911
|
"The root object".
|
|
15532
15912
|
|
|
15533
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-
|
|
15534
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-
|
|
15913
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-30-contexts-9"></a>
|
|
15914
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-30-contexts-9"></a>
|
|
15535
15915
|
##### <code>contexts</code>
|
|
15536
15916
|
|
|
15537
15917
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -15724,12 +16104,12 @@ Requires that all function parameters have names.
|
|
|
15724
16104
|
>
|
|
15725
16105
|
> [JSDoc](https://jsdoc.app/tags-param.html#overview)
|
|
15726
16106
|
|
|
15727
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-name-options-
|
|
15728
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-name-options-
|
|
16107
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-name-options-31"></a>
|
|
16108
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-name-options-31"></a>
|
|
15729
16109
|
#### Options
|
|
15730
16110
|
|
|
15731
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-name-options-
|
|
15732
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-name-options-
|
|
16111
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-name-options-31-contexts-10"></a>
|
|
16112
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-name-options-31-contexts-10"></a>
|
|
15733
16113
|
##### <code>contexts</code>
|
|
15734
16114
|
|
|
15735
16115
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -15868,12 +16248,12 @@ Will exempt destructured roots and their children if
|
|
|
15868
16248
|
`@param props` will be exempted from requiring a type given
|
|
15869
16249
|
`function someFunc ({child1, child2})`).
|
|
15870
16250
|
|
|
15871
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-
|
|
15872
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-
|
|
16251
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-32"></a>
|
|
16252
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-32"></a>
|
|
15873
16253
|
#### Options
|
|
15874
16254
|
|
|
15875
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-
|
|
15876
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-
|
|
16255
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-32-setdefaultdestructuredroottype"></a>
|
|
16256
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-32-setdefaultdestructuredroottype"></a>
|
|
15877
16257
|
##### <code>setDefaultDestructuredRootType</code>
|
|
15878
16258
|
|
|
15879
16259
|
Whether to set a default destructured root type. For example, you may wish
|
|
@@ -15882,14 +16262,14 @@ corresponding to a destructured root object as it is always going to be an
|
|
|
15882
16262
|
object. Uses `defaultDestructuredRootType` for the type string. Defaults to
|
|
15883
16263
|
`false`.
|
|
15884
16264
|
|
|
15885
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-
|
|
15886
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-
|
|
16265
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-32-defaultdestructuredroottype"></a>
|
|
16266
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-32-defaultdestructuredroottype"></a>
|
|
15887
16267
|
##### <code>defaultDestructuredRootType</code>
|
|
15888
16268
|
|
|
15889
16269
|
The type string to set by default for destructured roots. Defaults to "object".
|
|
15890
16270
|
|
|
15891
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-
|
|
15892
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-
|
|
16271
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-32-contexts-11"></a>
|
|
16272
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-32-contexts-11"></a>
|
|
15893
16273
|
##### <code>contexts</code>
|
|
15894
16274
|
|
|
15895
16275
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -16254,35 +16634,35 @@ other properties, so in looking at the docs alone without looking at the
|
|
|
16254
16634
|
function signature, it may appear that there is an actual property named
|
|
16255
16635
|
`extra`.
|
|
16256
16636
|
|
|
16257
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16258
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16637
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33"></a>
|
|
16638
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33"></a>
|
|
16259
16639
|
#### Options
|
|
16260
16640
|
|
|
16261
16641
|
An options object accepts the following optional properties:
|
|
16262
16642
|
|
|
16263
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16264
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16643
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-enablefixer-5"></a>
|
|
16644
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-enablefixer-5"></a>
|
|
16265
16645
|
##### <code>enableFixer</code>
|
|
16266
16646
|
|
|
16267
16647
|
Whether to enable the fixer. Defaults to `true`.
|
|
16268
16648
|
|
|
16269
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16270
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16649
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-enablerootfixer"></a>
|
|
16650
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-enablerootfixer"></a>
|
|
16271
16651
|
##### <code>enableRootFixer</code>
|
|
16272
16652
|
|
|
16273
16653
|
Whether to enable the auto-adding of incrementing roots (see the "Fixer"
|
|
16274
16654
|
section). Defaults to `true`. Has no effect if `enableFixer` is set to
|
|
16275
16655
|
`false`.
|
|
16276
16656
|
|
|
16277
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16278
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16657
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-enablerestelementfixer"></a>
|
|
16658
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-enablerestelementfixer"></a>
|
|
16279
16659
|
##### <code>enableRestElementFixer</code>
|
|
16280
16660
|
|
|
16281
16661
|
Whether to enable the rest element fixer (see
|
|
16282
16662
|
"Rest Element (`RestElement`) insertions"). Defaults to `true`.
|
|
16283
16663
|
|
|
16284
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16285
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16664
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-checkrestproperty-1"></a>
|
|
16665
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-checkrestproperty-1"></a>
|
|
16286
16666
|
##### <code>checkRestProperty</code>
|
|
16287
16667
|
|
|
16288
16668
|
If set to `true`, will report (and add fixer insertions) for missing rest
|
|
@@ -16336,15 +16716,15 @@ function quux ({num, ...extra}) {
|
|
|
16336
16716
|
}
|
|
16337
16717
|
```
|
|
16338
16718
|
|
|
16339
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16340
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16719
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-autoincrementbase"></a>
|
|
16720
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-autoincrementbase"></a>
|
|
16341
16721
|
##### <code>autoIncrementBase</code>
|
|
16342
16722
|
|
|
16343
16723
|
Numeric to indicate the number at which to begin auto-incrementing roots.
|
|
16344
16724
|
Defaults to `0`.
|
|
16345
16725
|
|
|
16346
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16347
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16726
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-unnamedrootbase"></a>
|
|
16727
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-unnamedrootbase"></a>
|
|
16348
16728
|
##### <code>unnamedRootBase</code>
|
|
16349
16729
|
|
|
16350
16730
|
An array of root names to use in the fixer when roots are missing. Defaults
|
|
@@ -16370,8 +16750,8 @@ function quux ({foo}, [bar], {baz}) {
|
|
|
16370
16750
|
*/
|
|
16371
16751
|
```
|
|
16372
16752
|
|
|
16373
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16374
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16753
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-exemptedby-1"></a>
|
|
16754
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-exemptedby-1"></a>
|
|
16375
16755
|
##### <code>exemptedBy</code>
|
|
16376
16756
|
|
|
16377
16757
|
Array of tags (e.g., `['type']`) whose presence on the document block
|
|
@@ -16380,8 +16760,8 @@ avoids the need for a `@param`. Defaults to an array with
|
|
|
16380
16760
|
so be sure to add back `inheritdoc` if you wish its presence to cause
|
|
16381
16761
|
exemption of the rule.
|
|
16382
16762
|
|
|
16383
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16384
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16763
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-checktypespattern-1"></a>
|
|
16764
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-checktypespattern-1"></a>
|
|
16385
16765
|
##### <code>checkTypesPattern</code>
|
|
16386
16766
|
|
|
16387
16767
|
When one specifies a type, unless it is of a generic type, like `object`
|
|
@@ -16416,8 +16796,8 @@ You could set this regular expression to a more expansive list, or you
|
|
|
16416
16796
|
could restrict it such that even types matching those strings would not
|
|
16417
16797
|
need destructuring.
|
|
16418
16798
|
|
|
16419
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16420
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16799
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-contexts-12"></a>
|
|
16800
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-contexts-12"></a>
|
|
16421
16801
|
##### <code>contexts</code>
|
|
16422
16802
|
|
|
16423
16803
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -16429,33 +16809,33 @@ which are checked.
|
|
|
16429
16809
|
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
16430
16810
|
section of our README for more on the expected format.
|
|
16431
16811
|
|
|
16432
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16433
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16812
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-checkconstructors-2"></a>
|
|
16813
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-checkconstructors-2"></a>
|
|
16434
16814
|
##### <code>checkConstructors</code>
|
|
16435
16815
|
|
|
16436
16816
|
A value indicating whether `constructor`s should be checked. Defaults to
|
|
16437
16817
|
`true`.
|
|
16438
16818
|
|
|
16439
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16440
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16819
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-checkgetters-2"></a>
|
|
16820
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-checkgetters-2"></a>
|
|
16441
16821
|
##### <code>checkGetters</code>
|
|
16442
16822
|
|
|
16443
16823
|
A value indicating whether getters should be checked. Defaults to `false`.
|
|
16444
16824
|
|
|
16445
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16446
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16825
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-checksetters-2"></a>
|
|
16826
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-checksetters-2"></a>
|
|
16447
16827
|
##### <code>checkSetters</code>
|
|
16448
16828
|
|
|
16449
16829
|
A value indicating whether setters should be checked. Defaults to `false`.
|
|
16450
16830
|
|
|
16451
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16452
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16831
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-checkdestructured-1"></a>
|
|
16832
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-checkdestructured-1"></a>
|
|
16453
16833
|
##### <code>checkDestructured</code>
|
|
16454
16834
|
|
|
16455
16835
|
Whether to require destructured properties. Defaults to `true`.
|
|
16456
16836
|
|
|
16457
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16458
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16837
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-checkdestructuredroots"></a>
|
|
16838
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-checkdestructuredroots"></a>
|
|
16459
16839
|
##### <code>checkDestructuredRoots</code>
|
|
16460
16840
|
|
|
16461
16841
|
Whether to check the existence of a corresponding `@param` for root objects
|
|
@@ -16468,8 +16848,8 @@ implied to be `false` (i.e., the inside of the roots will not be checked
|
|
|
16468
16848
|
either, e.g., it will also not complain if `a` or `b` do not have their own
|
|
16469
16849
|
documentation). Defaults to `true`.
|
|
16470
16850
|
|
|
16471
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-
|
|
16472
|
-
<a name="eslint-plugin-jsdoc-rules-require-param-options-
|
|
16851
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-33-usedefaultobjectproperties-1"></a>
|
|
16852
|
+
<a name="eslint-plugin-jsdoc-rules-require-param-options-33-usedefaultobjectproperties-1"></a>
|
|
16473
16853
|
##### <code>useDefaultObjectProperties</code>
|
|
16474
16854
|
|
|
16475
16855
|
Set to `true` if you wish to expect documentation of properties on objects
|
|
@@ -18154,8 +18534,8 @@ is found. Also reports if `@returns {never}` is discovered with a return value.
|
|
|
18154
18534
|
|
|
18155
18535
|
Will also report if multiple `@returns` tags are present.
|
|
18156
18536
|
|
|
18157
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-check-options-
|
|
18158
|
-
<a name="eslint-plugin-jsdoc-rules-require-returns-check-options-
|
|
18537
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-check-options-34"></a>
|
|
18538
|
+
<a name="eslint-plugin-jsdoc-rules-require-returns-check-options-34"></a>
|
|
18159
18539
|
#### Options
|
|
18160
18540
|
|
|
18161
18541
|
- `exemptGenerators`- Because a generator might be labeled as having a
|
|
@@ -19181,12 +19561,12 @@ Requires that the `@returns` tag has a `description` value. The error
|
|
|
19181
19561
|
will not be reported if the return value is `void` or `undefined`
|
|
19182
19562
|
or if it is `Promise<void>` or `Promise<undefined>`.
|
|
19183
19563
|
|
|
19184
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-description-options-
|
|
19185
|
-
<a name="eslint-plugin-jsdoc-rules-require-returns-description-options-
|
|
19564
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-description-options-35"></a>
|
|
19565
|
+
<a name="eslint-plugin-jsdoc-rules-require-returns-description-options-35"></a>
|
|
19186
19566
|
#### Options
|
|
19187
19567
|
|
|
19188
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-description-options-
|
|
19189
|
-
<a name="eslint-plugin-jsdoc-rules-require-returns-description-options-
|
|
19568
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-description-options-35-contexts-13"></a>
|
|
19569
|
+
<a name="eslint-plugin-jsdoc-rules-require-returns-description-options-35-contexts-13"></a>
|
|
19190
19570
|
##### <code>contexts</code>
|
|
19191
19571
|
|
|
19192
19572
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -19340,12 +19720,12 @@ function quux () {
|
|
|
19340
19720
|
|
|
19341
19721
|
Requires that `@returns` tag has `type` value.
|
|
19342
19722
|
|
|
19343
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-type-options-
|
|
19344
|
-
<a name="eslint-plugin-jsdoc-rules-require-returns-type-options-
|
|
19723
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-type-options-36"></a>
|
|
19724
|
+
<a name="eslint-plugin-jsdoc-rules-require-returns-type-options-36"></a>
|
|
19345
19725
|
#### Options
|
|
19346
19726
|
|
|
19347
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-type-options-
|
|
19348
|
-
<a name="eslint-plugin-jsdoc-rules-require-returns-type-options-
|
|
19727
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-type-options-36-contexts-14"></a>
|
|
19728
|
+
<a name="eslint-plugin-jsdoc-rules-require-returns-type-options-36-contexts-14"></a>
|
|
19349
19729
|
##### <code>contexts</code>
|
|
19350
19730
|
|
|
19351
19731
|
Set this to an array of strings representing the AST context (or an object with
|
|
@@ -19466,8 +19846,8 @@ Requires that returns are documented.
|
|
|
19466
19846
|
|
|
19467
19847
|
Will also report if multiple `@returns` tags are present.
|
|
19468
19848
|
|
|
19469
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-options-
|
|
19470
|
-
<a name="eslint-plugin-jsdoc-rules-require-returns-options-
|
|
19849
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-options-37"></a>
|
|
19850
|
+
<a name="eslint-plugin-jsdoc-rules-require-returns-options-37"></a>
|
|
19471
19851
|
#### Options
|
|
19472
19852
|
|
|
19473
19853
|
- `checkConstructors` - A value indicating whether `constructor`s should
|
|
@@ -20607,8 +20987,8 @@ for our desire for a separate tag to document rejection types and see
|
|
|
20607
20987
|
[this discussion](https://stackoverflow.com/questions/50071115/typescript-promise-rejection-type)
|
|
20608
20988
|
on why TypeScript doesn't offer such a feature.
|
|
20609
20989
|
|
|
20610
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-throws-options-
|
|
20611
|
-
<a name="eslint-plugin-jsdoc-rules-require-throws-options-
|
|
20990
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-throws-options-38"></a>
|
|
20991
|
+
<a name="eslint-plugin-jsdoc-rules-require-throws-options-38"></a>
|
|
20612
20992
|
#### Options
|
|
20613
20993
|
|
|
20614
20994
|
- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the
|
|
@@ -20912,8 +21292,8 @@ Will also report if multiple `@yields` tags are present.
|
|
|
20912
21292
|
See the `next`, `forceRequireNext`, and `nextWithGeneratorTag` options for an
|
|
20913
21293
|
option to expect a non-standard `@next` tag.
|
|
20914
21294
|
|
|
20915
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-yields-options-
|
|
20916
|
-
<a name="eslint-plugin-jsdoc-rules-require-yields-options-
|
|
21295
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-yields-options-39"></a>
|
|
21296
|
+
<a name="eslint-plugin-jsdoc-rules-require-yields-options-39"></a>
|
|
20917
21297
|
#### Options
|
|
20918
21298
|
|
|
20919
21299
|
- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the
|
|
@@ -21724,8 +22104,8 @@ function bodies.
|
|
|
21724
22104
|
|
|
21725
22105
|
Will also report if multiple `@yields` tags are present.
|
|
21726
22106
|
|
|
21727
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-require-yields-check-options-
|
|
21728
|
-
<a name="eslint-plugin-jsdoc-rules-require-yields-check-options-
|
|
22107
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-yields-check-options-40"></a>
|
|
22108
|
+
<a name="eslint-plugin-jsdoc-rules-require-yields-check-options-40"></a>
|
|
21729
22109
|
#### Options
|
|
21730
22110
|
|
|
21731
22111
|
- `checkGeneratorsOnly` - Avoids checking the function body and merely insists
|
|
@@ -22237,12 +22617,12 @@ Sorts tags by a specified sequence according to tag name.
|
|
|
22237
22617
|
|
|
22238
22618
|
(Default order originally inspired by [`@homer0/prettier-plugin-jsdoc`](https://github.com/homer0/packages/tree/main/packages/public/prettier-plugin-jsdoc).)
|
|
22239
22619
|
|
|
22240
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-
|
|
22241
|
-
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-
|
|
22620
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-41"></a>
|
|
22621
|
+
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-41"></a>
|
|
22242
22622
|
#### Options
|
|
22243
22623
|
|
|
22244
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-
|
|
22245
|
-
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-
|
|
22624
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-41-tagsequence"></a>
|
|
22625
|
+
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-41-tagsequence"></a>
|
|
22246
22626
|
##### <code>tagSequence</code>
|
|
22247
22627
|
|
|
22248
22628
|
An array of tag names indicating the preferred sequence for sorting tags.
|
|
@@ -22418,8 +22798,8 @@ a fixed order that doesn't change into the future, supply your own
|
|
|
22418
22798
|
];
|
|
22419
22799
|
```
|
|
22420
22800
|
|
|
22421
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-
|
|
22422
|
-
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-
|
|
22801
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-41-alphabetizeextras"></a>
|
|
22802
|
+
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-41-alphabetizeextras"></a>
|
|
22423
22803
|
##### <code>alphabetizeExtras</code>
|
|
22424
22804
|
|
|
22425
22805
|
Defaults to `false`. Alphabetizes any items not within `tagSequence` after any
|
|
@@ -22576,8 +22956,8 @@ function quux () {}
|
|
|
22576
22956
|
|
|
22577
22957
|
Enforces lines (or no lines) between tags.
|
|
22578
22958
|
|
|
22579
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22580
|
-
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22959
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-42"></a>
|
|
22960
|
+
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-42"></a>
|
|
22581
22961
|
#### Options
|
|
22582
22962
|
|
|
22583
22963
|
The first option is a single string set to "always", "never", or "any"
|
|
@@ -22588,27 +22968,27 @@ for particular tags) or with `dropEndLines`.
|
|
|
22588
22968
|
|
|
22589
22969
|
The second option is an object with the following optional properties.
|
|
22590
22970
|
|
|
22591
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22592
|
-
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22971
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-42-count-defaults-to-1"></a>
|
|
22972
|
+
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-42-count-defaults-to-1"></a>
|
|
22593
22973
|
##### <code>count</code> (defaults to 1)
|
|
22594
22974
|
|
|
22595
22975
|
Use with "always" to indicate the number of lines to require be present.
|
|
22596
22976
|
|
|
22597
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22598
|
-
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22977
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-42-noendlines-defaults-to-false"></a>
|
|
22978
|
+
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-42-noendlines-defaults-to-false"></a>
|
|
22599
22979
|
##### <code>noEndLines</code> (defaults to <code>false</code>)
|
|
22600
22980
|
|
|
22601
22981
|
Use with "always" to indicate the normal lines to be added after tags should
|
|
22602
22982
|
not be added after the final tag.
|
|
22603
22983
|
|
|
22604
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22605
|
-
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22984
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-42-dropendlines-defaults-to-false"></a>
|
|
22985
|
+
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-42-dropendlines-defaults-to-false"></a>
|
|
22606
22986
|
##### <code>dropEndLines</code> (defaults to <code>false</code>)
|
|
22607
22987
|
|
|
22608
22988
|
If defined, will drop end lines for the final tag only.
|
|
22609
22989
|
|
|
22610
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22611
|
-
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-
|
|
22990
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-42-tags-default-to-empty-object"></a>
|
|
22991
|
+
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-42-tags-default-to-empty-object"></a>
|
|
22612
22992
|
##### <code>tags</code> (default to empty object)
|
|
22613
22993
|
|
|
22614
22994
|
Overrides the default behavior depending on specific tags.
|
|
@@ -22962,19 +23342,19 @@ Markdown and you therefore do not wish for it to be accidentally interpreted
|
|
|
22962
23342
|
as such by the likes of Visual Studio Code or if you wish to view it escaped
|
|
22963
23343
|
within it or your documentation.
|
|
22964
23344
|
|
|
22965
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-text-escaping-options-
|
|
22966
|
-
<a name="eslint-plugin-jsdoc-rules-text-escaping-options-
|
|
23345
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-text-escaping-options-43"></a>
|
|
23346
|
+
<a name="eslint-plugin-jsdoc-rules-text-escaping-options-43"></a>
|
|
22967
23347
|
#### Options
|
|
22968
23348
|
|
|
22969
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-text-escaping-options-
|
|
22970
|
-
<a name="eslint-plugin-jsdoc-rules-text-escaping-options-
|
|
23349
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-text-escaping-options-43-escapehtml"></a>
|
|
23350
|
+
<a name="eslint-plugin-jsdoc-rules-text-escaping-options-43-escapehtml"></a>
|
|
22971
23351
|
##### <code>escapeHTML</code>
|
|
22972
23352
|
|
|
22973
23353
|
This option escapes all `<` and `&` characters (except those followed by
|
|
22974
23354
|
whitespace which are treated as literals by Visual Studio Code).
|
|
22975
23355
|
|
|
22976
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-text-escaping-options-
|
|
22977
|
-
<a name="eslint-plugin-jsdoc-rules-text-escaping-options-
|
|
23356
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-text-escaping-options-43-escapemarkdown"></a>
|
|
23357
|
+
<a name="eslint-plugin-jsdoc-rules-text-escaping-options-43-escapemarkdown"></a>
|
|
22978
23358
|
##### <code>escapeMarkdown</code>
|
|
22979
23359
|
|
|
22980
23360
|
This option escapes the first backtick (`` ` ``) in a paired sequence.
|
|
@@ -23181,8 +23561,8 @@ for valid types (based on the tag's `type` value), and either portion checked
|
|
|
23181
23561
|
for presence (based on `false` `name` or `type` values or their `required`
|
|
23182
23562
|
value). See the setting for more details.
|
|
23183
23563
|
|
|
23184
|
-
<a name="user-content-eslint-plugin-jsdoc-rules-valid-types-options-
|
|
23185
|
-
<a name="eslint-plugin-jsdoc-rules-valid-types-options-
|
|
23564
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-valid-types-options-44"></a>
|
|
23565
|
+
<a name="eslint-plugin-jsdoc-rules-valid-types-options-44"></a>
|
|
23186
23566
|
#### Options
|
|
23187
23567
|
|
|
23188
23568
|
- `allowEmptyNamepaths` (default: true) - Set to `false` to bulk disallow
|