eslint-plugin-jsdoc 37.9.3 → 37.9.6
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 +349 -90
- package/dist/exportParser.js +3 -3
- package/dist/exportParser.js.map +1 -1
- package/dist/jsdocUtils.js +11 -1
- package/dist/jsdocUtils.js.map +1 -1
- package/dist/rules/requireReturns.js +1 -1
- package/dist/rules/requireReturns.js.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<a name="user-content-eslint-plugin-jsdoc"></a>
|
|
1
2
|
<a name="eslint-plugin-jsdoc"></a>
|
|
2
3
|
# eslint-plugin-jsdoc
|
|
3
4
|
|
|
@@ -9,72 +10,73 @@
|
|
|
9
10
|
|
|
10
11
|
JSDoc linting rules for ESLint.
|
|
11
12
|
|
|
12
|
-
* [eslint-plugin-jsdoc](#eslint-plugin-jsdoc)
|
|
13
|
-
* [Installation](#eslint-plugin-jsdoc-installation)
|
|
14
|
-
* [Configuration](#eslint-plugin-jsdoc-configuration)
|
|
15
|
-
* [Options](#eslint-plugin-jsdoc-options)
|
|
16
|
-
* [Settings](#eslint-plugin-jsdoc-settings)
|
|
17
|
-
* [Allow tags (`@private` or `@internal`) to disable rules for that comment block](#eslint-plugin-jsdoc-settings-allow-tags-private-or-internal-to-disable-rules-for-that-comment-block)
|
|
18
|
-
* [`maxLines` and `minLines`](#eslint-plugin-jsdoc-settings-maxlines-and-minlines)
|
|
19
|
-
* [Mode](#eslint-plugin-jsdoc-settings-mode)
|
|
20
|
-
* [Alias Preference](#eslint-plugin-jsdoc-settings-alias-preference)
|
|
21
|
-
* [`@override`/`@augments`/`@extends`/`@implements`/`@ignore` Without Accompanying `@param`/`@description`/`@example`/`@returns`/`@throws`/`@yields`](#eslint-plugin-jsdoc-settings-override-augments-extends-implements-ignore-without-accompanying-param-description-example-returns-throws-yields)
|
|
22
|
-
* [Settings to Configure `check-types` and `no-undefined-types`](#eslint-plugin-jsdoc-settings-settings-to-configure-check-types-and-no-undefined-types)
|
|
23
|
-
* [`structuredTags`](#eslint-plugin-jsdoc-settings-structuredtags)
|
|
24
|
-
* [Advanced](#eslint-plugin-jsdoc-advanced)
|
|
25
|
-
* [AST and Selectors](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
26
|
-
* [Rules](#eslint-plugin-jsdoc-rules)
|
|
27
|
-
* [`check-access`](#eslint-plugin-jsdoc-rules-check-access)
|
|
28
|
-
* [`check-alignment`](#eslint-plugin-jsdoc-rules-check-alignment)
|
|
29
|
-
* [`check-examples`](#eslint-plugin-jsdoc-rules-check-examples)
|
|
30
|
-
* [`check-indentation`](#eslint-plugin-jsdoc-rules-check-indentation)
|
|
31
|
-
* [`check-line-alignment`](#eslint-plugin-jsdoc-rules-check-line-alignment)
|
|
32
|
-
* [`check-param-names`](#eslint-plugin-jsdoc-rules-check-param-names)
|
|
33
|
-
* [`check-property-names`](#eslint-plugin-jsdoc-rules-check-property-names)
|
|
34
|
-
* [`check-syntax`](#eslint-plugin-jsdoc-rules-check-syntax)
|
|
35
|
-
* [`check-tag-names`](#eslint-plugin-jsdoc-rules-check-tag-names)
|
|
36
|
-
* [`check-types`](#eslint-plugin-jsdoc-rules-check-types)
|
|
37
|
-
* [`check-values`](#eslint-plugin-jsdoc-rules-check-values)
|
|
38
|
-
* [`empty-tags`](#eslint-plugin-jsdoc-rules-empty-tags)
|
|
39
|
-
* [`implements-on-classes`](#eslint-plugin-jsdoc-rules-implements-on-classes)
|
|
40
|
-
* [`match-description`](#eslint-plugin-jsdoc-rules-match-description)
|
|
41
|
-
* [`match-name`](#eslint-plugin-jsdoc-rules-match-name)
|
|
42
|
-
* [`multiline-blocks`](#eslint-plugin-jsdoc-rules-multiline-blocks)
|
|
43
|
-
* [`newline-after-description`](#eslint-plugin-jsdoc-rules-newline-after-description)
|
|
44
|
-
* [`no-bad-blocks`](#eslint-plugin-jsdoc-rules-no-bad-blocks)
|
|
45
|
-
* [`no-defaults`](#eslint-plugin-jsdoc-rules-no-defaults)
|
|
46
|
-
* [`no-missing-syntax`](#eslint-plugin-jsdoc-rules-no-missing-syntax)
|
|
47
|
-
* [`no-multi-asterisks`](#eslint-plugin-jsdoc-rules-no-multi-asterisks)
|
|
48
|
-
* [`no-restricted-syntax`](#eslint-plugin-jsdoc-rules-no-restricted-syntax)
|
|
49
|
-
* [`no-types`](#eslint-plugin-jsdoc-rules-no-types)
|
|
50
|
-
* [`no-undefined-types`](#eslint-plugin-jsdoc-rules-no-undefined-types)
|
|
51
|
-
* [`require-asterisk-prefix`](#eslint-plugin-jsdoc-rules-require-asterisk-prefix)
|
|
52
|
-
* [`require-description-complete-sentence`](#eslint-plugin-jsdoc-rules-require-description-complete-sentence)
|
|
53
|
-
* [`require-description`](#eslint-plugin-jsdoc-rules-require-description)
|
|
54
|
-
* [`require-example`](#eslint-plugin-jsdoc-rules-require-example)
|
|
55
|
-
* [`require-file-overview`](#eslint-plugin-jsdoc-rules-require-file-overview)
|
|
56
|
-
* [`require-hyphen-before-param-description`](#eslint-plugin-jsdoc-rules-require-hyphen-before-param-description)
|
|
57
|
-
* [`require-jsdoc`](#eslint-plugin-jsdoc-rules-require-jsdoc)
|
|
58
|
-
* [`require-param-description`](#eslint-plugin-jsdoc-rules-require-param-description)
|
|
59
|
-
* [`require-param-name`](#eslint-plugin-jsdoc-rules-require-param-name)
|
|
60
|
-
* [`require-param-type`](#eslint-plugin-jsdoc-rules-require-param-type)
|
|
61
|
-
* [`require-param`](#eslint-plugin-jsdoc-rules-require-param)
|
|
62
|
-
* [`require-property`](#eslint-plugin-jsdoc-rules-require-property)
|
|
63
|
-
* [`require-property-description`](#eslint-plugin-jsdoc-rules-require-property-description)
|
|
64
|
-
* [`require-property-name`](#eslint-plugin-jsdoc-rules-require-property-name)
|
|
65
|
-
* [`require-property-type`](#eslint-plugin-jsdoc-rules-require-property-type)
|
|
66
|
-
* [`require-returns-check`](#eslint-plugin-jsdoc-rules-require-returns-check)
|
|
67
|
-
* [`require-returns-description`](#eslint-plugin-jsdoc-rules-require-returns-description)
|
|
68
|
-
* [`require-returns-type`](#eslint-plugin-jsdoc-rules-require-returns-type)
|
|
69
|
-
* [`require-returns`](#eslint-plugin-jsdoc-rules-require-returns)
|
|
70
|
-
* [`require-throws`](#eslint-plugin-jsdoc-rules-require-throws)
|
|
71
|
-
* [`require-yields`](#eslint-plugin-jsdoc-rules-require-yields)
|
|
72
|
-
* [`require-yields-check`](#eslint-plugin-jsdoc-rules-require-yields-check)
|
|
73
|
-
* [`sort-tags`](#eslint-plugin-jsdoc-rules-sort-tags)
|
|
74
|
-
* [`tag-lines`](#eslint-plugin-jsdoc-rules-tag-lines)
|
|
75
|
-
* [`valid-types`](#eslint-plugin-jsdoc-rules-valid-types)
|
|
76
|
-
|
|
77
|
-
|
|
13
|
+
* [eslint-plugin-jsdoc](#user-content-eslint-plugin-jsdoc)
|
|
14
|
+
* [Installation](#user-content-eslint-plugin-jsdoc-installation)
|
|
15
|
+
* [Configuration](#user-content-eslint-plugin-jsdoc-configuration)
|
|
16
|
+
* [Options](#user-content-eslint-plugin-jsdoc-options)
|
|
17
|
+
* [Settings](#user-content-eslint-plugin-jsdoc-settings)
|
|
18
|
+
* [Allow tags (`@private` or `@internal`) to disable rules for that comment block](#user-content-eslint-plugin-jsdoc-settings-allow-tags-private-or-internal-to-disable-rules-for-that-comment-block)
|
|
19
|
+
* [`maxLines` and `minLines`](#user-content-eslint-plugin-jsdoc-settings-maxlines-and-minlines)
|
|
20
|
+
* [Mode](#user-content-eslint-plugin-jsdoc-settings-mode)
|
|
21
|
+
* [Alias Preference](#user-content-eslint-plugin-jsdoc-settings-alias-preference)
|
|
22
|
+
* [`@override`/`@augments`/`@extends`/`@implements`/`@ignore` Without Accompanying `@param`/`@description`/`@example`/`@returns`/`@throws`/`@yields`](#user-content-eslint-plugin-jsdoc-settings-override-augments-extends-implements-ignore-without-accompanying-param-description-example-returns-throws-yields)
|
|
23
|
+
* [Settings to Configure `check-types` and `no-undefined-types`](#user-content-eslint-plugin-jsdoc-settings-settings-to-configure-check-types-and-no-undefined-types)
|
|
24
|
+
* [`structuredTags`](#user-content-eslint-plugin-jsdoc-settings-structuredtags)
|
|
25
|
+
* [Advanced](#user-content-eslint-plugin-jsdoc-advanced)
|
|
26
|
+
* [AST and Selectors](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
27
|
+
* [Rules](#user-content-eslint-plugin-jsdoc-rules)
|
|
28
|
+
* [`check-access`](#user-content-eslint-plugin-jsdoc-rules-check-access)
|
|
29
|
+
* [`check-alignment`](#user-content-eslint-plugin-jsdoc-rules-check-alignment)
|
|
30
|
+
* [`check-examples`](#user-content-eslint-plugin-jsdoc-rules-check-examples)
|
|
31
|
+
* [`check-indentation`](#user-content-eslint-plugin-jsdoc-rules-check-indentation)
|
|
32
|
+
* [`check-line-alignment`](#user-content-eslint-plugin-jsdoc-rules-check-line-alignment)
|
|
33
|
+
* [`check-param-names`](#user-content-eslint-plugin-jsdoc-rules-check-param-names)
|
|
34
|
+
* [`check-property-names`](#user-content-eslint-plugin-jsdoc-rules-check-property-names)
|
|
35
|
+
* [`check-syntax`](#user-content-eslint-plugin-jsdoc-rules-check-syntax)
|
|
36
|
+
* [`check-tag-names`](#user-content-eslint-plugin-jsdoc-rules-check-tag-names)
|
|
37
|
+
* [`check-types`](#user-content-eslint-plugin-jsdoc-rules-check-types)
|
|
38
|
+
* [`check-values`](#user-content-eslint-plugin-jsdoc-rules-check-values)
|
|
39
|
+
* [`empty-tags`](#user-content-eslint-plugin-jsdoc-rules-empty-tags)
|
|
40
|
+
* [`implements-on-classes`](#user-content-eslint-plugin-jsdoc-rules-implements-on-classes)
|
|
41
|
+
* [`match-description`](#user-content-eslint-plugin-jsdoc-rules-match-description)
|
|
42
|
+
* [`match-name`](#user-content-eslint-plugin-jsdoc-rules-match-name)
|
|
43
|
+
* [`multiline-blocks`](#user-content-eslint-plugin-jsdoc-rules-multiline-blocks)
|
|
44
|
+
* [`newline-after-description`](#user-content-eslint-plugin-jsdoc-rules-newline-after-description)
|
|
45
|
+
* [`no-bad-blocks`](#user-content-eslint-plugin-jsdoc-rules-no-bad-blocks)
|
|
46
|
+
* [`no-defaults`](#user-content-eslint-plugin-jsdoc-rules-no-defaults)
|
|
47
|
+
* [`no-missing-syntax`](#user-content-eslint-plugin-jsdoc-rules-no-missing-syntax)
|
|
48
|
+
* [`no-multi-asterisks`](#user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks)
|
|
49
|
+
* [`no-restricted-syntax`](#user-content-eslint-plugin-jsdoc-rules-no-restricted-syntax)
|
|
50
|
+
* [`no-types`](#user-content-eslint-plugin-jsdoc-rules-no-types)
|
|
51
|
+
* [`no-undefined-types`](#user-content-eslint-plugin-jsdoc-rules-no-undefined-types)
|
|
52
|
+
* [`require-asterisk-prefix`](#user-content-eslint-plugin-jsdoc-rules-require-asterisk-prefix)
|
|
53
|
+
* [`require-description-complete-sentence`](#user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence)
|
|
54
|
+
* [`require-description`](#user-content-eslint-plugin-jsdoc-rules-require-description)
|
|
55
|
+
* [`require-example`](#user-content-eslint-plugin-jsdoc-rules-require-example)
|
|
56
|
+
* [`require-file-overview`](#user-content-eslint-plugin-jsdoc-rules-require-file-overview)
|
|
57
|
+
* [`require-hyphen-before-param-description`](#user-content-eslint-plugin-jsdoc-rules-require-hyphen-before-param-description)
|
|
58
|
+
* [`require-jsdoc`](#user-content-eslint-plugin-jsdoc-rules-require-jsdoc)
|
|
59
|
+
* [`require-param-description`](#user-content-eslint-plugin-jsdoc-rules-require-param-description)
|
|
60
|
+
* [`require-param-name`](#user-content-eslint-plugin-jsdoc-rules-require-param-name)
|
|
61
|
+
* [`require-param-type`](#user-content-eslint-plugin-jsdoc-rules-require-param-type)
|
|
62
|
+
* [`require-param`](#user-content-eslint-plugin-jsdoc-rules-require-param)
|
|
63
|
+
* [`require-property`](#user-content-eslint-plugin-jsdoc-rules-require-property)
|
|
64
|
+
* [`require-property-description`](#user-content-eslint-plugin-jsdoc-rules-require-property-description)
|
|
65
|
+
* [`require-property-name`](#user-content-eslint-plugin-jsdoc-rules-require-property-name)
|
|
66
|
+
* [`require-property-type`](#user-content-eslint-plugin-jsdoc-rules-require-property-type)
|
|
67
|
+
* [`require-returns-check`](#user-content-eslint-plugin-jsdoc-rules-require-returns-check)
|
|
68
|
+
* [`require-returns-description`](#user-content-eslint-plugin-jsdoc-rules-require-returns-description)
|
|
69
|
+
* [`require-returns-type`](#user-content-eslint-plugin-jsdoc-rules-require-returns-type)
|
|
70
|
+
* [`require-returns`](#user-content-eslint-plugin-jsdoc-rules-require-returns)
|
|
71
|
+
* [`require-throws`](#user-content-eslint-plugin-jsdoc-rules-require-throws)
|
|
72
|
+
* [`require-yields`](#user-content-eslint-plugin-jsdoc-rules-require-yields)
|
|
73
|
+
* [`require-yields-check`](#user-content-eslint-plugin-jsdoc-rules-require-yields-check)
|
|
74
|
+
* [`sort-tags`](#user-content-eslint-plugin-jsdoc-rules-sort-tags)
|
|
75
|
+
* [`tag-lines`](#user-content-eslint-plugin-jsdoc-rules-tag-lines)
|
|
76
|
+
* [`valid-types`](#user-content-eslint-plugin-jsdoc-rules-valid-types)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<a name="user-content-eslint-plugin-jsdoc-installation"></a>
|
|
78
80
|
<a name="eslint-plugin-jsdoc-installation"></a>
|
|
79
81
|
## Installation
|
|
80
82
|
|
|
@@ -92,6 +94,7 @@ globally too. Otherwise, install it locally.
|
|
|
92
94
|
npm install --save-dev eslint-plugin-jsdoc
|
|
93
95
|
```
|
|
94
96
|
|
|
97
|
+
<a name="user-content-eslint-plugin-jsdoc-configuration"></a>
|
|
95
98
|
<a name="eslint-plugin-jsdoc-configuration"></a>
|
|
96
99
|
## Configuration
|
|
97
100
|
|
|
@@ -174,6 +177,7 @@ which enables the rules commented above as "recommended":
|
|
|
174
177
|
|
|
175
178
|
You can then selectively add to or override the recommended rules.
|
|
176
179
|
|
|
180
|
+
<a name="user-content-eslint-plugin-jsdoc-options"></a>
|
|
177
181
|
<a name="eslint-plugin-jsdoc-options"></a>
|
|
178
182
|
## Options
|
|
179
183
|
|
|
@@ -202,9 +206,11 @@ object supplied as the second argument in an array after the error level
|
|
|
202
206
|
}
|
|
203
207
|
```
|
|
204
208
|
|
|
209
|
+
<a name="user-content-eslint-plugin-jsdoc-settings"></a>
|
|
205
210
|
<a name="eslint-plugin-jsdoc-settings"></a>
|
|
206
211
|
## Settings
|
|
207
212
|
|
|
213
|
+
<a name="user-content-eslint-plugin-jsdoc-settings-allow-tags-private-or-internal-to-disable-rules-for-that-comment-block"></a>
|
|
208
214
|
<a name="eslint-plugin-jsdoc-settings-allow-tags-private-or-internal-to-disable-rules-for-that-comment-block"></a>
|
|
209
215
|
### Allow tags (<code>@private</code> or <code>@internal</code>) to disable rules for that comment block
|
|
210
216
|
|
|
@@ -217,6 +223,7 @@ object supplied as the second argument in an array after the error level
|
|
|
217
223
|
on which a `@internal` tag occurs. Defaults to `false`. Note: This has no
|
|
218
224
|
effect with the rule `empty-tags` (which checks `@internal` itself).
|
|
219
225
|
|
|
226
|
+
<a name="user-content-eslint-plugin-jsdoc-settings-maxlines-and-minlines"></a>
|
|
220
227
|
<a name="eslint-plugin-jsdoc-settings-maxlines-and-minlines"></a>
|
|
221
228
|
### <code>maxLines</code> and <code>minLines</code>
|
|
222
229
|
|
|
@@ -229,6 +236,7 @@ be enforced so as to report problems if a jsdoc block is not found within
|
|
|
229
236
|
the specified boundaries. The settings are also used in the fixer to determine
|
|
230
237
|
how many line breaks to add when a block is missing.
|
|
231
238
|
|
|
239
|
+
<a name="user-content-eslint-plugin-jsdoc-settings-mode"></a>
|
|
232
240
|
<a name="eslint-plugin-jsdoc-settings-mode"></a>
|
|
233
241
|
### Mode
|
|
234
242
|
|
|
@@ -257,6 +265,7 @@ how many line breaks to add when a block is missing.
|
|
|
257
265
|
- Disallows namepath on `@interface` for "closure" mode in `valid-types` (and
|
|
258
266
|
avoids checking in other rules)
|
|
259
267
|
|
|
268
|
+
<a name="user-content-eslint-plugin-jsdoc-settings-alias-preference"></a>
|
|
260
269
|
<a name="eslint-plugin-jsdoc-settings-alias-preference"></a>
|
|
261
270
|
### Alias Preference
|
|
262
271
|
|
|
@@ -349,6 +358,7 @@ See `check-tag-names` for how that fact can be used to set an alias to itself
|
|
|
349
358
|
to allow both the alias and the default (since aliases are otherwise not
|
|
350
359
|
permitted unless used in `tagNamePreference`).
|
|
351
360
|
|
|
361
|
+
<a name="user-content-eslint-plugin-jsdoc-settings-alias-preference-default-preferred-aliases"></a>
|
|
352
362
|
<a name="eslint-plugin-jsdoc-settings-alias-preference-default-preferred-aliases"></a>
|
|
353
363
|
#### Default Preferred Aliases
|
|
354
364
|
|
|
@@ -388,6 +398,7 @@ This setting is utilized by the the rule for tag name checking
|
|
|
388
398
|
- `require-returns-description`
|
|
389
399
|
- `require-returns-type`
|
|
390
400
|
|
|
401
|
+
<a name="user-content-eslint-plugin-jsdoc-settings-override-augments-extends-implements-ignore-without-accompanying-param-description-example-returns-throws-yields"></a>
|
|
391
402
|
<a name="eslint-plugin-jsdoc-settings-override-augments-extends-implements-ignore-without-accompanying-param-description-example-returns-throws-yields"></a>
|
|
392
403
|
### <code>@override</code>/<code>@augments</code>/<code>@extends</code>/<code>@implements</code>/<code>@ignore</code> Without Accompanying <code>@param</code>/<code>@description</code>/<code>@example</code>/<code>@returns</code>/<code>@throws</code>/<code>@yields</code>
|
|
393
404
|
|
|
@@ -418,6 +429,7 @@ The format of the configuration is as follows:
|
|
|
418
429
|
}
|
|
419
430
|
```
|
|
420
431
|
|
|
432
|
+
<a name="user-content-eslint-plugin-jsdoc-settings-settings-to-configure-check-types-and-no-undefined-types"></a>
|
|
421
433
|
<a name="eslint-plugin-jsdoc-settings-settings-to-configure-check-types-and-no-undefined-types"></a>
|
|
422
434
|
### Settings to Configure <code>check-types</code> and <code>no-undefined-types</code>
|
|
423
435
|
|
|
@@ -483,6 +495,7 @@ key nor the value will be reported. Thus in `check-types`, this fact can
|
|
|
483
495
|
be used to allow both `object` and `Object` if one has a `preferredTypes`
|
|
484
496
|
key `object: 'Object'` and `Object: 'object'`.
|
|
485
497
|
|
|
498
|
+
<a name="user-content-eslint-plugin-jsdoc-settings-structuredtags"></a>
|
|
486
499
|
<a name="eslint-plugin-jsdoc-settings-structuredtags"></a>
|
|
487
500
|
### <code>structuredTags</code>
|
|
488
501
|
|
|
@@ -528,9 +541,11 @@ values are objects with the following optional properties:
|
|
|
528
541
|
name (`@throws Some text`); does not require that both exist but
|
|
529
542
|
disallows just an empty tag.
|
|
530
543
|
|
|
544
|
+
<a name="user-content-eslint-plugin-jsdoc-advanced"></a>
|
|
531
545
|
<a name="eslint-plugin-jsdoc-advanced"></a>
|
|
532
546
|
## Advanced
|
|
533
547
|
|
|
548
|
+
<a name="user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors"></a>
|
|
534
549
|
<a name="eslint-plugin-jsdoc-advanced-ast-and-selectors"></a>
|
|
535
550
|
### AST and Selectors
|
|
536
551
|
|
|
@@ -546,6 +561,7 @@ your files' code which are of interest to check. However, in
|
|
|
546
561
|
`eslint-plugin-jsdoc`, we also allow you to use these selectors to define
|
|
547
562
|
additional contexts where you wish our own rules to be applied.
|
|
548
563
|
|
|
564
|
+
<a name="user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors-contexts-format"></a>
|
|
549
565
|
<a name="eslint-plugin-jsdoc-advanced-ast-and-selectors-contexts-format"></a>
|
|
550
566
|
#### <code>contexts</code> format
|
|
551
567
|
|
|
@@ -582,6 +598,7 @@ properties:
|
|
|
582
598
|
function). See [@es-joy/jsdoccomment](https://github.com/es-joy/jsdoccomment)
|
|
583
599
|
for the precise structure of the comment (and comment type) nodes.
|
|
584
600
|
|
|
601
|
+
<a name="user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors-discovering-available-ast-definitions"></a>
|
|
585
602
|
<a name="eslint-plugin-jsdoc-advanced-ast-and-selectors-discovering-available-ast-definitions"></a>
|
|
586
603
|
#### Discovering available AST definitions
|
|
587
604
|
|
|
@@ -602,6 +619,7 @@ providing some of your JavaScript to the wonderful
|
|
|
602
619
|
[AST Explorer](https://astexplorer.net/) tool and see what AST is built out
|
|
603
620
|
of your code. You can set the tool to the specific parser which you are using.
|
|
604
621
|
|
|
622
|
+
<a name="user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors-uses-tips-for-ast"></a>
|
|
605
623
|
<a name="eslint-plugin-jsdoc-advanced-ast-and-selectors-uses-tips-for-ast"></a>
|
|
606
624
|
#### Uses/Tips for AST
|
|
607
625
|
|
|
@@ -623,9 +641,11 @@ to the selector you wish so as to get messages reported in the bottom right
|
|
|
623
641
|
pane which match your [esquery](https://github.com/estools/esquery/#readme)
|
|
624
642
|
selector).
|
|
625
643
|
|
|
644
|
+
<a name="user-content-eslint-plugin-jsdoc-rules"></a>
|
|
626
645
|
<a name="eslint-plugin-jsdoc-rules"></a>
|
|
627
646
|
## Rules
|
|
628
647
|
|
|
648
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-access"></a>
|
|
629
649
|
<a name="eslint-plugin-jsdoc-rules-check-access"></a>
|
|
630
650
|
### <code>check-access</code>
|
|
631
651
|
|
|
@@ -800,6 +820,7 @@ function quux (foo) {
|
|
|
800
820
|
````
|
|
801
821
|
|
|
802
822
|
|
|
823
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-alignment"></a>
|
|
803
824
|
<a name="eslint-plugin-jsdoc-rules-check-alignment"></a>
|
|
804
825
|
### <code>check-alignment</code>
|
|
805
826
|
|
|
@@ -943,6 +964,7 @@ function quux (foo) {
|
|
|
943
964
|
````
|
|
944
965
|
|
|
945
966
|
|
|
967
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-examples"></a>
|
|
946
968
|
<a name="eslint-plugin-jsdoc-rules-check-examples"></a>
|
|
947
969
|
### <code>check-examples</code>
|
|
948
970
|
|
|
@@ -953,11 +975,13 @@ Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules. Also
|
|
|
953
975
|
has options to lint the default values of optional `@param`/`@arg`/`@argument`
|
|
954
976
|
and `@property`/`@prop` tags or the values of `@default`/`@defaultvalue` tags.
|
|
955
977
|
|
|
978
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-examples-options-1"></a>
|
|
956
979
|
<a name="eslint-plugin-jsdoc-rules-check-examples-options-1"></a>
|
|
957
980
|
#### Options
|
|
958
981
|
|
|
959
982
|
The options below all default to no-op/`false` except as noted.
|
|
960
983
|
|
|
984
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-examples-options-1-captionrequired"></a>
|
|
961
985
|
<a name="eslint-plugin-jsdoc-rules-check-examples-options-1-captionrequired"></a>
|
|
962
986
|
##### <code>captionRequired</code>
|
|
963
987
|
|
|
@@ -969,6 +993,7 @@ the beginning of any `@example`.
|
|
|
969
993
|
|
|
970
994
|
Used only for `@example`.
|
|
971
995
|
|
|
996
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-examples-options-1-examplecoderegex-and-rejectexamplecoderegex"></a>
|
|
972
997
|
<a name="eslint-plugin-jsdoc-rules-check-examples-options-1-examplecoderegex-and-rejectexamplecoderegex"></a>
|
|
973
998
|
##### <code>exampleCodeRegex</code> and <code>rejectExampleCodeRegex</code>
|
|
974
999
|
|
|
@@ -998,6 +1023,7 @@ If neither is in use, all examples will be matched. Note also that even if
|
|
|
998
1023
|
`captionRequired` is not set, any initial `<caption>` will be stripped out
|
|
999
1024
|
before doing the regex matching.
|
|
1000
1025
|
|
|
1026
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-examples-options-1-paddedindent"></a>
|
|
1001
1027
|
<a name="eslint-plugin-jsdoc-rules-check-examples-options-1-paddedindent"></a>
|
|
1002
1028
|
##### <code>paddedIndent</code>
|
|
1003
1029
|
|
|
@@ -1019,6 +1045,7 @@ out before evaluation.
|
|
|
1019
1045
|
|
|
1020
1046
|
Only applied to `@example` linting.
|
|
1021
1047
|
|
|
1048
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-examples-options-1-reportunuseddisabledirectives"></a>
|
|
1022
1049
|
<a name="eslint-plugin-jsdoc-rules-check-examples-options-1-reportunuseddisabledirectives"></a>
|
|
1023
1050
|
##### <code>reportUnusedDisableDirectives</code>
|
|
1024
1051
|
|
|
@@ -1031,6 +1058,7 @@ Inline ESLint config within `@example` JavaScript is allowed (or within
|
|
|
1031
1058
|
needed by the resolved rules will be reported as with the ESLint
|
|
1032
1059
|
`--report-unused-disable-directives` command.
|
|
1033
1060
|
|
|
1061
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-examples-options-for-determining-eslint-rule-applicability-allowinlineconfig-nodefaultexamplerules-matchingfilename-configfile-checkeslintrc-and-baseconfig"></a>
|
|
1034
1062
|
<a name="eslint-plugin-jsdoc-rules-check-examples-options-for-determining-eslint-rule-applicability-allowinlineconfig-nodefaultexamplerules-matchingfilename-configfile-checkeslintrc-and-baseconfig"></a>
|
|
1035
1063
|
#### Options for Determining ESLint Rule Applicability (<code>allowInlineConfig</code>, <code>noDefaultExampleRules</code>, <code>matchingFileName</code>, <code>configFile</code>, <code>checkEslintrc</code>, and <code>baseConfig</code>)
|
|
1036
1064
|
|
|
@@ -1083,6 +1111,7 @@ by decreasing precedence:
|
|
|
1083
1111
|
* `baseConfig` - Set to an object of rules with the same schema
|
|
1084
1112
|
as `.eslintrc.*` for defaults.
|
|
1085
1113
|
|
|
1114
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-examples-options-for-determining-eslint-rule-applicability-allowinlineconfig-nodefaultexamplerules-matchingfilename-configfile-checkeslintrc-and-baseconfig-rules-disabled-by-default-unless-nodefaultexamplerules-is-set-to-true"></a>
|
|
1086
1115
|
<a name="eslint-plugin-jsdoc-rules-check-examples-options-for-determining-eslint-rule-applicability-allowinlineconfig-nodefaultexamplerules-matchingfilename-configfile-checkeslintrc-and-baseconfig-rules-disabled-by-default-unless-nodefaultexamplerules-is-set-to-true"></a>
|
|
1087
1116
|
##### Rules Disabled by Default Unless <code>noDefaultExampleRules</code> is Set to <code>true</code>
|
|
1088
1117
|
|
|
@@ -1119,6 +1148,7 @@ expression-oriented rules will be used by default as well:
|
|
|
1119
1148
|
* `no-unused-expressions` - Disabled.
|
|
1120
1149
|
* `chai-friendly/no-unused-expressions` - Disabled.
|
|
1121
1150
|
|
|
1151
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-examples-options-for-determining-eslint-rule-applicability-allowinlineconfig-nodefaultexamplerules-matchingfilename-configfile-checkeslintrc-and-baseconfig-options-for-checking-other-than-example-checkdefaults-checkparams-or-checkproperties"></a>
|
|
1122
1152
|
<a name="eslint-plugin-jsdoc-rules-check-examples-options-for-determining-eslint-rule-applicability-allowinlineconfig-nodefaultexamplerules-matchingfilename-configfile-checkeslintrc-and-baseconfig-options-for-checking-other-than-example-checkdefaults-checkparams-or-checkproperties"></a>
|
|
1123
1153
|
##### Options for checking other than <code>@example</code> (<code>checkDefaults</code>, <code>checkParams</code>, or <code>checkProperties</code>)
|
|
1124
1154
|
|
|
@@ -1692,6 +1722,7 @@ const functionName = function (paramOne, paramTwo,
|
|
|
1692
1722
|
````
|
|
1693
1723
|
|
|
1694
1724
|
|
|
1725
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-indentation"></a>
|
|
1695
1726
|
<a name="eslint-plugin-jsdoc-rules-check-indentation"></a>
|
|
1696
1727
|
### <code>check-indentation</code>
|
|
1697
1728
|
|
|
@@ -1711,11 +1742,13 @@ the following description is not reported:
|
|
|
1711
1742
|
*/
|
|
1712
1743
|
```
|
|
1713
1744
|
|
|
1745
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-indentation-options-2"></a>
|
|
1714
1746
|
<a name="eslint-plugin-jsdoc-rules-check-indentation-options-2"></a>
|
|
1715
1747
|
#### Options
|
|
1716
1748
|
|
|
1717
1749
|
This rule has an object option.
|
|
1718
1750
|
|
|
1751
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-indentation-options-2-excludetags"></a>
|
|
1719
1752
|
<a name="eslint-plugin-jsdoc-rules-check-indentation-options-2-excludetags"></a>
|
|
1720
1753
|
##### <code>excludeTags</code>
|
|
1721
1754
|
|
|
@@ -1965,6 +1998,7 @@ function MyDecorator(options: { myOptions: number }) {
|
|
|
1965
1998
|
````
|
|
1966
1999
|
|
|
1967
2000
|
|
|
2001
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-line-alignment"></a>
|
|
1968
2002
|
<a name="eslint-plugin-jsdoc-rules-check-line-alignment"></a>
|
|
1969
2003
|
### <code>check-line-alignment</code>
|
|
1970
2004
|
|
|
@@ -1972,6 +2006,7 @@ Reports invalid alignment of JSDoc block lines. This is a
|
|
|
1972
2006
|
[standard recommended to WordPress code](https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/#aligning-comments),
|
|
1973
2007
|
for example.
|
|
1974
2008
|
|
|
2009
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-line-alignment-options-3"></a>
|
|
1975
2010
|
<a name="eslint-plugin-jsdoc-rules-check-line-alignment-options-3"></a>
|
|
1976
2011
|
#### Options
|
|
1977
2012
|
|
|
@@ -1985,6 +2020,7 @@ space is present after the asterisk delimiter.
|
|
|
1985
2020
|
|
|
1986
2021
|
After the string, an options object is allowed with the following properties.
|
|
1987
2022
|
|
|
2023
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-line-alignment-options-3-tags"></a>
|
|
1988
2024
|
<a name="eslint-plugin-jsdoc-rules-check-line-alignment-options-3-tags"></a>
|
|
1989
2025
|
##### <code>tags</code>
|
|
1990
2026
|
|
|
@@ -1992,6 +2028,7 @@ Use this to change the tags which are sought for alignment changes. *Currently*
|
|
|
1992
2028
|
*only works with the "never" option.* Defaults to an array of
|
|
1993
2029
|
`['param', 'arg', 'argument', 'property', 'prop', 'returns', 'return']`.
|
|
1994
2030
|
|
|
2031
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-line-alignment-options-3-customspacings"></a>
|
|
1995
2032
|
<a name="eslint-plugin-jsdoc-rules-check-line-alignment-options-3-customspacings"></a>
|
|
1996
2033
|
##### <code>customSpacings</code>
|
|
1997
2034
|
|
|
@@ -2651,11 +2688,13 @@ const fn = ({ids}) => {}
|
|
|
2651
2688
|
````
|
|
2652
2689
|
|
|
2653
2690
|
|
|
2691
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names"></a>
|
|
2654
2692
|
<a name="eslint-plugin-jsdoc-rules-check-param-names"></a>
|
|
2655
2693
|
### <code>check-param-names</code>
|
|
2656
2694
|
|
|
2657
2695
|
Ensures that parameter names in JSDoc match those in the function declaration.
|
|
2658
2696
|
|
|
2697
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names-destructuring"></a>
|
|
2659
2698
|
<a name="eslint-plugin-jsdoc-rules-check-param-names-destructuring"></a>
|
|
2660
2699
|
#### Destructuring
|
|
2661
2700
|
|
|
@@ -2682,19 +2721,23 @@ other properties, so in looking at the docs alone without looking at the
|
|
|
2682
2721
|
function signature, the disadvantage of enabling this option is that it
|
|
2683
2722
|
may appear that there is an actual property named `extra`.
|
|
2684
2723
|
|
|
2724
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names-options-4"></a>
|
|
2685
2725
|
<a name="eslint-plugin-jsdoc-rules-check-param-names-options-4"></a>
|
|
2686
2726
|
#### Options
|
|
2687
2727
|
|
|
2728
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names-options-4-checkrestproperty"></a>
|
|
2688
2729
|
<a name="eslint-plugin-jsdoc-rules-check-param-names-options-4-checkrestproperty"></a>
|
|
2689
2730
|
##### <code>checkRestProperty</code>
|
|
2690
2731
|
|
|
2691
2732
|
See the "Destructuring" section. Defaults to `false`.
|
|
2692
2733
|
|
|
2734
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names-options-4-checktypespattern"></a>
|
|
2693
2735
|
<a name="eslint-plugin-jsdoc-rules-check-param-names-options-4-checktypespattern"></a>
|
|
2694
2736
|
##### <code>checkTypesPattern</code>
|
|
2695
2737
|
|
|
2696
2738
|
See `require-param` under the option of the same name.
|
|
2697
2739
|
|
|
2740
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names-options-4-enablefixer"></a>
|
|
2698
2741
|
<a name="eslint-plugin-jsdoc-rules-check-param-names-options-4-enablefixer"></a>
|
|
2699
2742
|
##### <code>enableFixer</code>
|
|
2700
2743
|
|
|
@@ -2705,6 +2748,7 @@ Note that this option will remove duplicates of the same name even if
|
|
|
2705
2748
|
the definitions do not match in other ways (e.g., the second param will
|
|
2706
2749
|
be removed even if it has a different type or description).
|
|
2707
2750
|
|
|
2751
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names-options-4-allowextratrailingparamdocs"></a>
|
|
2708
2752
|
<a name="eslint-plugin-jsdoc-rules-check-param-names-options-4-allowextratrailingparamdocs"></a>
|
|
2709
2753
|
##### <code>allowExtraTrailingParamDocs</code>
|
|
2710
2754
|
|
|
@@ -2713,11 +2757,13 @@ representing future expected or virtual params) to be present without needing
|
|
|
2713
2757
|
their presence within the function signature. Other inconsistencies between
|
|
2714
2758
|
`@param`'s and present function parameters will still be reported.
|
|
2715
2759
|
|
|
2760
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names-options-4-checkdestructured"></a>
|
|
2716
2761
|
<a name="eslint-plugin-jsdoc-rules-check-param-names-options-4-checkdestructured"></a>
|
|
2717
2762
|
##### <code>checkDestructured</code>
|
|
2718
2763
|
|
|
2719
2764
|
Whether to check destructured properties. Defaults to `true`.
|
|
2720
2765
|
|
|
2766
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names-options-4-usedefaultobjectproperties"></a>
|
|
2721
2767
|
<a name="eslint-plugin-jsdoc-rules-check-param-names-options-4-usedefaultobjectproperties"></a>
|
|
2722
2768
|
##### <code>useDefaultObjectProperties</code>
|
|
2723
2769
|
|
|
@@ -2726,6 +2772,7 @@ where instead of destructuring, a whole plain object is supplied as default
|
|
|
2726
2772
|
value but you wish its keys to be considered as signalling that the properties
|
|
2727
2773
|
are present and can therefore be documented. Defaults to `false`.
|
|
2728
2774
|
|
|
2775
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-param-names-options-4-disableextrapropertyreporting"></a>
|
|
2729
2776
|
<a name="eslint-plugin-jsdoc-rules-check-param-names-options-4-disableextrapropertyreporting"></a>
|
|
2730
2777
|
##### <code>disableExtraPropertyReporting</code>
|
|
2731
2778
|
|
|
@@ -3598,15 +3645,18 @@ const foo = ([, b]) => b;
|
|
|
3598
3645
|
````
|
|
3599
3646
|
|
|
3600
3647
|
|
|
3648
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-property-names"></a>
|
|
3601
3649
|
<a name="eslint-plugin-jsdoc-rules-check-property-names"></a>
|
|
3602
3650
|
### <code>check-property-names</code>
|
|
3603
3651
|
|
|
3604
3652
|
Ensures that property names in JSDoc are not duplicated on the same block
|
|
3605
3653
|
and that nested properties have defined roots.
|
|
3606
3654
|
|
|
3655
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-property-names-options-5"></a>
|
|
3607
3656
|
<a name="eslint-plugin-jsdoc-rules-check-property-names-options-5"></a>
|
|
3608
3657
|
#### Options
|
|
3609
3658
|
|
|
3659
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-property-names-options-5-enablefixer-1"></a>
|
|
3610
3660
|
<a name="eslint-plugin-jsdoc-rules-check-property-names-options-5-enablefixer-1"></a>
|
|
3611
3661
|
##### <code>enableFixer</code>
|
|
3612
3662
|
|
|
@@ -3812,6 +3862,7 @@ function quux (code = 1) {
|
|
|
3812
3862
|
````
|
|
3813
3863
|
|
|
3814
3864
|
|
|
3865
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-syntax"></a>
|
|
3815
3866
|
<a name="eslint-plugin-jsdoc-rules-check-syntax"></a>
|
|
3816
3867
|
### <code>check-syntax</code>
|
|
3817
3868
|
|
|
@@ -3873,6 +3924,7 @@ function quux (foo) {
|
|
|
3873
3924
|
````
|
|
3874
3925
|
|
|
3875
3926
|
|
|
3927
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-tag-names"></a>
|
|
3876
3928
|
<a name="eslint-plugin-jsdoc-rules-check-tag-names"></a>
|
|
3877
3929
|
### <code>check-tag-names</code>
|
|
3878
3930
|
|
|
@@ -4050,9 +4102,11 @@ typeSummary
|
|
|
4050
4102
|
wizaction
|
|
4051
4103
|
```
|
|
4052
4104
|
|
|
4105
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-tag-names-options-6"></a>
|
|
4053
4106
|
<a name="eslint-plugin-jsdoc-rules-check-tag-names-options-6"></a>
|
|
4054
4107
|
#### Options
|
|
4055
4108
|
|
|
4109
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-tag-names-options-6-definedtags"></a>
|
|
4056
4110
|
<a name="eslint-plugin-jsdoc-rules-check-tag-names-options-6-definedtags"></a>
|
|
4057
4111
|
##### <code>definedTags</code>
|
|
4058
4112
|
|
|
@@ -4065,6 +4119,7 @@ The format is as follows:
|
|
|
4065
4119
|
}
|
|
4066
4120
|
```
|
|
4067
4121
|
|
|
4122
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-tag-names-jsxtags"></a>
|
|
4068
4123
|
<a name="eslint-plugin-jsdoc-rules-check-tag-names-jsxtags"></a>
|
|
4069
4124
|
#### <code>jsxTags</code>
|
|
4070
4125
|
|
|
@@ -4713,6 +4768,7 @@ export function transient<T>(target?: T): T {
|
|
|
4713
4768
|
````
|
|
4714
4769
|
|
|
4715
4770
|
|
|
4771
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-types"></a>
|
|
4716
4772
|
<a name="eslint-plugin-jsdoc-rules-check-types"></a>
|
|
4717
4773
|
### <code>check-types</code>
|
|
4718
4774
|
|
|
@@ -4736,6 +4792,7 @@ Date
|
|
|
4736
4792
|
RegExp
|
|
4737
4793
|
```
|
|
4738
4794
|
|
|
4795
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-types-options-7"></a>
|
|
4739
4796
|
<a name="eslint-plugin-jsdoc-rules-check-types-options-7"></a>
|
|
4740
4797
|
#### Options
|
|
4741
4798
|
|
|
@@ -4785,6 +4842,7 @@ Note that if there is an error [parsing](https://github.com/jsdoc-type-pratt-par
|
|
|
4785
4842
|
types for a tag, the function will silently ignore that tag, leaving it to
|
|
4786
4843
|
the `valid-types` rule to report parsing errors.
|
|
4787
4844
|
|
|
4845
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-types-why-not-capital-case-everything"></a>
|
|
4788
4846
|
<a name="eslint-plugin-jsdoc-rules-check-types-why-not-capital-case-everything"></a>
|
|
4789
4847
|
#### Why not capital case everything?
|
|
4790
4848
|
|
|
@@ -5802,6 +5860,7 @@ function a () {}
|
|
|
5802
5860
|
````
|
|
5803
5861
|
|
|
5804
5862
|
|
|
5863
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-values"></a>
|
|
5805
5864
|
<a name="eslint-plugin-jsdoc-rules-check-values"></a>
|
|
5806
5865
|
### <code>check-values</code>
|
|
5807
5866
|
|
|
@@ -5822,21 +5881,25 @@ This rule checks the values for a handful of tags:
|
|
|
5822
5881
|
'constant', 'event', 'external', 'file', 'function', 'member', 'mixin',
|
|
5823
5882
|
'module', 'namespace', 'typedef',
|
|
5824
5883
|
|
|
5884
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-values-options-8"></a>
|
|
5825
5885
|
<a name="eslint-plugin-jsdoc-rules-check-values-options-8"></a>
|
|
5826
5886
|
#### Options
|
|
5827
5887
|
|
|
5888
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-values-options-8-allowedauthors"></a>
|
|
5828
5889
|
<a name="eslint-plugin-jsdoc-rules-check-values-options-8-allowedauthors"></a>
|
|
5829
5890
|
##### <code>allowedAuthors</code>
|
|
5830
5891
|
|
|
5831
5892
|
An array of allowable author values. If absent, only non-whitespace will
|
|
5832
5893
|
be checked for.
|
|
5833
5894
|
|
|
5895
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-values-options-8-allowedlicenses"></a>
|
|
5834
5896
|
<a name="eslint-plugin-jsdoc-rules-check-values-options-8-allowedlicenses"></a>
|
|
5835
5897
|
##### <code>allowedLicenses</code>
|
|
5836
5898
|
|
|
5837
5899
|
An array of allowable license values or `true` to allow any license text.
|
|
5838
5900
|
If present as an array, will be used in place of SPDX identifiers.
|
|
5839
5901
|
|
|
5902
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-values-options-8-licensepattern"></a>
|
|
5840
5903
|
<a name="eslint-plugin-jsdoc-rules-check-values-options-8-licensepattern"></a>
|
|
5841
5904
|
##### <code>licensePattern</code>
|
|
5842
5905
|
|
|
@@ -5851,6 +5914,7 @@ Note that the `/` delimiters are optional, but necessary to add flags.
|
|
|
5851
5914
|
Defaults to using the `u` flag, so to add your own flags, encapsulate
|
|
5852
5915
|
your expression as a string, but like a literal, e.g., `/^mit$/ui`.
|
|
5853
5916
|
|
|
5917
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-check-values-options-8-numericonlyvariation"></a>
|
|
5854
5918
|
<a name="eslint-plugin-jsdoc-rules-check-values-options-8-numericonlyvariation"></a>
|
|
5855
5919
|
##### <code>numericOnlyVariation</code>
|
|
5856
5920
|
|
|
@@ -6137,6 +6201,7 @@ function quux (foo) {
|
|
|
6137
6201
|
````
|
|
6138
6202
|
|
|
6139
6203
|
|
|
6204
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-empty-tags"></a>
|
|
6140
6205
|
<a name="eslint-plugin-jsdoc-rules-empty-tags"></a>
|
|
6141
6206
|
### <code>empty-tags</code>
|
|
6142
6207
|
|
|
@@ -6171,9 +6236,11 @@ causes rules not to take effect).
|
|
|
6171
6236
|
Similarly, `@internal` will still be checked for content by this rule even with
|
|
6172
6237
|
`settings.jsdoc.ignoreInternal` set to `true`.
|
|
6173
6238
|
|
|
6239
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-empty-tags-options-9"></a>
|
|
6174
6240
|
<a name="eslint-plugin-jsdoc-rules-empty-tags-options-9"></a>
|
|
6175
6241
|
#### Options
|
|
6176
6242
|
|
|
6243
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-empty-tags-options-9-tags-1"></a>
|
|
6177
6244
|
<a name="eslint-plugin-jsdoc-rules-empty-tags-options-9-tags-1"></a>
|
|
6178
6245
|
##### <code>tags</code>
|
|
6179
6246
|
|
|
@@ -6332,6 +6399,7 @@ function quux () {}
|
|
|
6332
6399
|
````
|
|
6333
6400
|
|
|
6334
6401
|
|
|
6402
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-implements-on-classes"></a>
|
|
6335
6403
|
<a name="eslint-plugin-jsdoc-rules-implements-on-classes"></a>
|
|
6336
6404
|
### <code>implements-on-classes</code>
|
|
6337
6405
|
|
|
@@ -6344,9 +6412,11 @@ To indicate that a function follows another function's signature, one might
|
|
|
6344
6412
|
instead use `@type` to indicate the `@function` or `@callback` to which the
|
|
6345
6413
|
function is adhering.
|
|
6346
6414
|
|
|
6415
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-implements-on-classes-options-10"></a>
|
|
6347
6416
|
<a name="eslint-plugin-jsdoc-rules-implements-on-classes-options-10"></a>
|
|
6348
6417
|
#### Options
|
|
6349
6418
|
|
|
6419
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-implements-on-classes-options-10-contexts"></a>
|
|
6350
6420
|
<a name="eslint-plugin-jsdoc-rules-implements-on-classes-options-10-contexts"></a>
|
|
6351
6421
|
##### <code>contexts</code>
|
|
6352
6422
|
|
|
@@ -6359,7 +6429,7 @@ for finding function blocks not attached to a function declaration or
|
|
|
6359
6429
|
expression, i.e., `@callback` or `@function` (or its aliases `@func` or
|
|
6360
6430
|
`@method`) (including those associated with an `@interface`).
|
|
6361
6431
|
|
|
6362
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
6432
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
6363
6433
|
section of our README for more on the expected format.
|
|
6364
6434
|
|
|
6365
6435
|
|||
|
|
@@ -6528,6 +6598,7 @@ function quux () {
|
|
|
6528
6598
|
````
|
|
6529
6599
|
|
|
6530
6600
|
|
|
6601
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description"></a>
|
|
6531
6602
|
<a name="eslint-plugin-jsdoc-rules-match-description"></a>
|
|
6532
6603
|
### <code>match-description</code>
|
|
6533
6604
|
|
|
@@ -6555,9 +6626,11 @@ case-insensitive unless one opts in to add the `i` flag.
|
|
|
6555
6626
|
You can add the `s` flag if you want `.` to match newlines. Note, however,
|
|
6556
6627
|
that the trailing newlines of a description will not be matched.
|
|
6557
6628
|
|
|
6629
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-11"></a>
|
|
6558
6630
|
<a name="eslint-plugin-jsdoc-rules-match-description-options-11"></a>
|
|
6559
6631
|
#### Options
|
|
6560
6632
|
|
|
6633
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-11-matchdescription"></a>
|
|
6561
6634
|
<a name="eslint-plugin-jsdoc-rules-match-description-options-11-matchdescription"></a>
|
|
6562
6635
|
##### <code>matchDescription</code>
|
|
6563
6636
|
|
|
@@ -6570,6 +6643,7 @@ You can supply your own expression to override the default, passing a
|
|
|
6570
6643
|
}
|
|
6571
6644
|
```
|
|
6572
6645
|
|
|
6646
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-11-message"></a>
|
|
6573
6647
|
<a name="eslint-plugin-jsdoc-rules-match-description-options-11-message"></a>
|
|
6574
6648
|
##### <code>message</code>
|
|
6575
6649
|
|
|
@@ -6586,6 +6660,7 @@ You may provide a custom default message by using the following format:
|
|
|
6586
6660
|
This can be overridden per tag or for the main block description by setting
|
|
6587
6661
|
`message` within `tags` or `mainDescription`, respectively.
|
|
6588
6662
|
|
|
6663
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-11-tags-2"></a>
|
|
6589
6664
|
<a name="eslint-plugin-jsdoc-rules-match-description-options-11-tags-2"></a>
|
|
6590
6665
|
##### <code>tags</code>
|
|
6591
6666
|
|
|
@@ -6635,6 +6710,7 @@ its "description" (e.g., for `@returns {someType} some description`, the
|
|
|
6635
6710
|
description is `some description` while for `@some-tag xyz`, the description
|
|
6636
6711
|
is `xyz`).
|
|
6637
6712
|
|
|
6713
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-11-maindescription"></a>
|
|
6638
6714
|
<a name="eslint-plugin-jsdoc-rules-match-description-options-11-maindescription"></a>
|
|
6639
6715
|
##### <code>mainDescription</code>
|
|
6640
6716
|
|
|
@@ -6675,6 +6751,7 @@ You may also provide an object with `message`:
|
|
|
6675
6751
|
}
|
|
6676
6752
|
```
|
|
6677
6753
|
|
|
6754
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-description-options-11-contexts-1"></a>
|
|
6678
6755
|
<a name="eslint-plugin-jsdoc-rules-match-description-options-11-contexts-1"></a>
|
|
6679
6756
|
##### <code>contexts</code>
|
|
6680
6757
|
|
|
@@ -6684,7 +6761,7 @@ Set this to an array of strings representing the AST context (or an object with
|
|
|
6684
6761
|
classes). Overrides the default contexts (see below). Set to `"any"` if you
|
|
6685
6762
|
want the rule to apply to any jsdoc block throughout your files.
|
|
6686
6763
|
|
|
6687
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
6764
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
6688
6765
|
section of our README for more on the expected format.
|
|
6689
6766
|
|
|
6690
6767
|
|||
|
|
@@ -7432,6 +7509,7 @@ function quux () {
|
|
|
7432
7509
|
````
|
|
7433
7510
|
|
|
7434
7511
|
|
|
7512
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-name"></a>
|
|
7435
7513
|
<a name="eslint-plugin-jsdoc-rules-match-name"></a>
|
|
7436
7514
|
### <code>match-name</code>
|
|
7437
7515
|
|
|
@@ -7444,11 +7522,13 @@ name will actually be part of the description (e.g., for
|
|
|
7444
7522
|
`structuredTags` setting (if `name: false`, this rule will not apply to
|
|
7445
7523
|
that tag).
|
|
7446
7524
|
|
|
7525
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-name-options-12"></a>
|
|
7447
7526
|
<a name="eslint-plugin-jsdoc-rules-match-name-options-12"></a>
|
|
7448
7527
|
#### Options
|
|
7449
7528
|
|
|
7450
7529
|
A single options object with the following properties:
|
|
7451
7530
|
|
|
7531
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-match-name-options-12-match"></a>
|
|
7452
7532
|
<a name="eslint-plugin-jsdoc-rules-match-name-options-12-match"></a>
|
|
7453
7533
|
##### <code>match</code>
|
|
7454
7534
|
|
|
@@ -7473,7 +7553,7 @@ properties, all of which act to confine one another:
|
|
|
7473
7553
|
|
|
7474
7554
|
- `context` - AST to confine the allowing or disallowing to jsdoc blocks
|
|
7475
7555
|
associated with a particular context. See the
|
|
7476
|
-
["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
7556
|
+
["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
7477
7557
|
section of our README for more on the expected format.
|
|
7478
7558
|
- `comment` - As with `context` but AST for the JSDoc block comment and types
|
|
7479
7559
|
|
|
@@ -7643,6 +7723,7 @@ class A {
|
|
|
7643
7723
|
````
|
|
7644
7724
|
|
|
7645
7725
|
|
|
7726
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks"></a>
|
|
7646
7727
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks"></a>
|
|
7647
7728
|
### <code>multiline-blocks</code>
|
|
7648
7729
|
|
|
@@ -7655,11 +7736,13 @@ all jsdoc blocks!
|
|
|
7655
7736
|
|
|
7656
7737
|
Also allows for preventing text at the very beginning or very end of blocks.
|
|
7657
7738
|
|
|
7739
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-13"></a>
|
|
7658
7740
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-13"></a>
|
|
7659
7741
|
#### Options
|
|
7660
7742
|
|
|
7661
7743
|
A single options object with the following properties.
|
|
7662
7744
|
|
|
7745
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-13-nozerolinetext-defaults-to-true"></a>
|
|
7663
7746
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-13-nozerolinetext-defaults-to-true"></a>
|
|
7664
7747
|
##### <code>noZeroLineText</code> (defaults to <code>true</code>)
|
|
7665
7748
|
|
|
@@ -7668,6 +7751,7 @@ space will be reported. (Text after a newline is not reported.)
|
|
|
7668
7751
|
|
|
7669
7752
|
`noMultilineBlocks` will have priority over this rule if it applies.
|
|
7670
7753
|
|
|
7754
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-13-nofinallinetext-defaults-to-true"></a>
|
|
7671
7755
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-13-nofinallinetext-defaults-to-true"></a>
|
|
7672
7756
|
##### <code>noFinalLineText</code> (defaults to <code>true</code>)
|
|
7673
7757
|
|
|
@@ -7676,12 +7760,14 @@ line will be reported. (Text preceding a newline is not reported.)
|
|
|
7676
7760
|
|
|
7677
7761
|
`noMultilineBlocks` will have priority over this rule if it applies.
|
|
7678
7762
|
|
|
7763
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-13-nosinglelineblocks-defaults-to-false"></a>
|
|
7679
7764
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-13-nosinglelineblocks-defaults-to-false"></a>
|
|
7680
7765
|
##### <code>noSingleLineBlocks</code> (defaults to <code>false</code>)
|
|
7681
7766
|
|
|
7682
7767
|
If this is `true`, any single line blocks will be reported, except those which
|
|
7683
7768
|
are whitelisted in `singleLineTags`.
|
|
7684
7769
|
|
|
7770
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-13-singlelinetags-defaults-to-lends-type"></a>
|
|
7685
7771
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-13-singlelinetags-defaults-to-lends-type"></a>
|
|
7686
7772
|
##### <code>singleLineTags</code> (defaults to <code>['lends', 'type']</code>)
|
|
7687
7773
|
|
|
@@ -7691,6 +7777,7 @@ cause all single line blocks to be reported. If `'*'` is present, then
|
|
|
7691
7777
|
the presence of a tag will allow single line blocks (but not if a tag is
|
|
7692
7778
|
missing).
|
|
7693
7779
|
|
|
7780
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-13-nomultilineblocks-defaults-to-false"></a>
|
|
7694
7781
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-13-nomultilineblocks-defaults-to-false"></a>
|
|
7695
7782
|
##### <code>noMultilineBlocks</code> (defaults to <code>false</code>)
|
|
7696
7783
|
|
|
@@ -7698,6 +7785,7 @@ Requires that jsdoc blocks are restricted to single lines only unless impacted
|
|
|
7698
7785
|
by the options `minimumLengthForMultiline`, `multilineTags`, or
|
|
7699
7786
|
`allowMultipleTags`.
|
|
7700
7787
|
|
|
7788
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-13-minimumlengthformultiline-defaults-to-not-being-in-effect"></a>
|
|
7701
7789
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-13-minimumlengthformultiline-defaults-to-not-being-in-effect"></a>
|
|
7702
7790
|
##### <code>minimumLengthForMultiline</code> (defaults to not being in effect)
|
|
7703
7791
|
|
|
@@ -7707,6 +7795,7 @@ be permitted if containing at least the given amount of text.
|
|
|
7707
7795
|
If not set, multiline blocks will not be permitted regardless of length unless
|
|
7708
7796
|
a relevant tag is present and `multilineTags` is set.
|
|
7709
7797
|
|
|
7798
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-13-multilinetags-defaults-to"></a>
|
|
7710
7799
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-13-multilinetags-defaults-to"></a>
|
|
7711
7800
|
##### <code>multilineTags</code> (defaults to <code>['*']</code>)
|
|
7712
7801
|
|
|
@@ -7723,6 +7812,7 @@ such a tag will cause multiline blocks to be allowed.
|
|
|
7723
7812
|
You may set this to an empty array to prevent any tag from permitting multiple
|
|
7724
7813
|
lines.
|
|
7725
7814
|
|
|
7815
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-multiline-blocks-options-13-allowmultipletags-defaults-to-true"></a>
|
|
7726
7816
|
<a name="eslint-plugin-jsdoc-rules-multiline-blocks-options-13-allowmultipletags-defaults-to-true"></a>
|
|
7727
7817
|
##### <code>allowMultipleTags</code> (defaults to <code>true</code>)
|
|
7728
7818
|
|
|
@@ -8010,11 +8100,13 @@ The following patterns are not considered problems:
|
|
|
8010
8100
|
````
|
|
8011
8101
|
|
|
8012
8102
|
|
|
8103
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-newline-after-description"></a>
|
|
8013
8104
|
<a name="eslint-plugin-jsdoc-rules-newline-after-description"></a>
|
|
8014
8105
|
### <code>newline-after-description</code>
|
|
8015
8106
|
|
|
8016
8107
|
Enforces a consistent padding of the block description.
|
|
8017
8108
|
|
|
8109
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-newline-after-description-options-14"></a>
|
|
8018
8110
|
<a name="eslint-plugin-jsdoc-rules-newline-after-description-options-14"></a>
|
|
8019
8111
|
#### Options
|
|
8020
8112
|
|
|
@@ -8249,6 +8341,7 @@ function example() {
|
|
|
8249
8341
|
````
|
|
8250
8342
|
|
|
8251
8343
|
|
|
8344
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks"></a>
|
|
8252
8345
|
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks"></a>
|
|
8253
8346
|
### <code>no-bad-blocks</code>
|
|
8254
8347
|
|
|
@@ -8258,11 +8351,13 @@ asterisks, but which appear to be intended as jsdoc blocks due to the presence
|
|
|
8258
8351
|
of whitespace followed by whitespace or asterisks, and
|
|
8259
8352
|
an at-sign (`@`) and some non-whitespace (as with a jsdoc block tag).
|
|
8260
8353
|
|
|
8354
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks-options-15"></a>
|
|
8261
8355
|
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks-options-15"></a>
|
|
8262
8356
|
#### Options
|
|
8263
8357
|
|
|
8264
8358
|
Takes an optional options object with the following.
|
|
8265
8359
|
|
|
8360
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks-options-15-ignore"></a>
|
|
8266
8361
|
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks-options-15-ignore"></a>
|
|
8267
8362
|
##### <code>ignore</code>
|
|
8268
8363
|
|
|
@@ -8272,6 +8367,7 @@ a multi-comment block and at-sign `/* @`.
|
|
|
8272
8367
|
Defaults to `['ts-check', 'ts-expect-error', 'ts-ignore', 'ts-nocheck']`
|
|
8273
8368
|
(some directives [used by TypeScript](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check)).
|
|
8274
8369
|
|
|
8370
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-bad-blocks-options-15-preventallmultiasteriskblocks"></a>
|
|
8275
8371
|
<a name="eslint-plugin-jsdoc-rules-no-bad-blocks-options-15-preventallmultiasteriskblocks"></a>
|
|
8276
8372
|
##### <code>preventAllMultiAsteriskBlocks</code>
|
|
8277
8373
|
|
|
@@ -8394,6 +8490,7 @@ function quux (foo) {
|
|
|
8394
8490
|
````
|
|
8395
8491
|
|
|
8396
8492
|
|
|
8493
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults"></a>
|
|
8397
8494
|
<a name="eslint-plugin-jsdoc-rules-no-defaults"></a>
|
|
8398
8495
|
### <code>no-defaults</code>
|
|
8399
8496
|
|
|
@@ -8409,9 +8506,11 @@ tag is attached).
|
|
|
8409
8506
|
Unless your `@default` is on a function, you will need to set `contexts`
|
|
8410
8507
|
to an appropriate context, including, if you wish, "any".
|
|
8411
8508
|
|
|
8509
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults-options-16"></a>
|
|
8412
8510
|
<a name="eslint-plugin-jsdoc-rules-no-defaults-options-16"></a>
|
|
8413
8511
|
#### Options
|
|
8414
8512
|
|
|
8513
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults-options-16-nooptionalparamnames"></a>
|
|
8415
8514
|
<a name="eslint-plugin-jsdoc-rules-no-defaults-options-16-nooptionalparamnames"></a>
|
|
8416
8515
|
##### <code>noOptionalParamNames</code>
|
|
8417
8516
|
|
|
@@ -8421,6 +8520,7 @@ the presence of ES6 default parameters (bearing in mind that such
|
|
|
8421
8520
|
"defaults" are only applied when the supplied value is missing or
|
|
8422
8521
|
`undefined` but not for `null` or other "falsey" values).
|
|
8423
8522
|
|
|
8523
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-defaults-options-16-contexts-2"></a>
|
|
8424
8524
|
<a name="eslint-plugin-jsdoc-rules-no-defaults-options-16-contexts-2"></a>
|
|
8425
8525
|
##### <code>contexts</code>
|
|
8426
8526
|
|
|
@@ -8432,7 +8532,7 @@ for finding function blocks not attached to a function declaration or
|
|
|
8432
8532
|
expression, i.e., `@callback` or `@function` (or its aliases `@func` or
|
|
8433
8533
|
`@method`) (including those associated with an `@interface`).
|
|
8434
8534
|
|
|
8435
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
8535
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
8436
8536
|
section of our README for more on the expected format.
|
|
8437
8537
|
|
|
8438
8538
|
|||
|
|
@@ -8569,6 +8669,7 @@ const a = {};
|
|
|
8569
8669
|
````
|
|
8570
8670
|
|
|
8571
8671
|
|
|
8672
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-missing-syntax"></a>
|
|
8572
8673
|
<a name="eslint-plugin-jsdoc-rules-no-missing-syntax"></a>
|
|
8573
8674
|
### <code>no-missing-syntax</code>
|
|
8574
8675
|
|
|
@@ -8606,9 +8707,11 @@ which are not adequate to satisfy a condition, e.g.,
|
|
|
8606
8707
|
not report if there were only a function declaration of the name "ignoreMe"
|
|
8607
8708
|
(though it would report by function declarations of other names).
|
|
8608
8709
|
|
|
8710
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-missing-syntax-options-17"></a>
|
|
8609
8711
|
<a name="eslint-plugin-jsdoc-rules-no-missing-syntax-options-17"></a>
|
|
8610
8712
|
#### Options
|
|
8611
8713
|
|
|
8714
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-missing-syntax-options-17-contexts-3"></a>
|
|
8612
8715
|
<a name="eslint-plugin-jsdoc-rules-no-missing-syntax-options-17-contexts-3"></a>
|
|
8613
8716
|
##### <code>contexts</code>
|
|
8614
8717
|
|
|
@@ -8627,7 +8730,7 @@ your files (as is necessary for finding function blocks not attached to a
|
|
|
8627
8730
|
function declaration or expression, i.e., `@callback` or `@function` (or its
|
|
8628
8731
|
aliases `@func` or `@method`) (including those associated with an `@interface`).
|
|
8629
8732
|
|
|
8630
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
8733
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
8631
8734
|
section of our README for more on the expected format.
|
|
8632
8735
|
|
|
8633
8736
|
|||
|
|
@@ -8806,6 +8909,7 @@ function quux () {
|
|
|
8806
8909
|
````
|
|
8807
8910
|
|
|
8808
8911
|
|
|
8912
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks"></a>
|
|
8809
8913
|
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks"></a>
|
|
8810
8914
|
### <code>no-multi-asterisks</code>
|
|
8811
8915
|
|
|
@@ -8815,9 +8919,11 @@ Note that if you wish to prevent multiple asterisks at the very beginning of
|
|
|
8815
8919
|
the jsdoc block, you should use `no-bad-blocks` (as that is not proper jsdoc
|
|
8816
8920
|
and that rule is for catching blocks which only seem like jsdoc).
|
|
8817
8921
|
|
|
8922
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-18"></a>
|
|
8818
8923
|
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-18"></a>
|
|
8819
8924
|
#### Options
|
|
8820
8925
|
|
|
8926
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-18-allowwhitespace-defaults-to-false"></a>
|
|
8821
8927
|
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-18-allowwhitespace-defaults-to-false"></a>
|
|
8822
8928
|
##### <code>allowWhitespace</code> (defaults to <code>false</code>)
|
|
8823
8929
|
|
|
@@ -8829,6 +8935,7 @@ Set to `true` if you wish to allow asterisks after a space (as with Markdown):
|
|
|
8829
8935
|
*/
|
|
8830
8936
|
```
|
|
8831
8937
|
|
|
8938
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-18-preventatmiddlelines-defaults-to-true"></a>
|
|
8832
8939
|
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-18-preventatmiddlelines-defaults-to-true"></a>
|
|
8833
8940
|
##### <code>preventAtMiddleLines</code> (defaults to <code>true</code>)
|
|
8834
8941
|
|
|
@@ -8841,6 +8948,7 @@ Prevent the likes of this:
|
|
|
8841
8948
|
*/
|
|
8842
8949
|
```
|
|
8843
8950
|
|
|
8951
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-multi-asterisks-options-18-preventatend-defaults-to-true"></a>
|
|
8844
8952
|
<a name="eslint-plugin-jsdoc-rules-no-multi-asterisks-options-18-preventatend-defaults-to-true"></a>
|
|
8845
8953
|
##### <code>preventAtEnd</code> (defaults to <code>true</code>)
|
|
8846
8954
|
|
|
@@ -9058,6 +9166,7 @@ function foo() {
|
|
|
9058
9166
|
````
|
|
9059
9167
|
|
|
9060
9168
|
|
|
9169
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-restricted-syntax"></a>
|
|
9061
9170
|
<a name="eslint-plugin-jsdoc-rules-no-restricted-syntax"></a>
|
|
9062
9171
|
### <code>no-restricted-syntax</code>
|
|
9063
9172
|
|
|
@@ -9075,9 +9184,11 @@ structures, (whether or not you add a specific `comment` condition).
|
|
|
9075
9184
|
Note that if your parser supports comment AST (as [jsdoc-eslint-parser](https://github.com/brettz9/jsdoc-eslint-parser)
|
|
9076
9185
|
is designed to do), you can just use ESLint's rule.
|
|
9077
9186
|
|
|
9187
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-restricted-syntax-options-19"></a>
|
|
9078
9188
|
<a name="eslint-plugin-jsdoc-rules-no-restricted-syntax-options-19"></a>
|
|
9079
9189
|
#### Options
|
|
9080
9190
|
|
|
9191
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-restricted-syntax-options-19-contexts-4"></a>
|
|
9081
9192
|
<a name="eslint-plugin-jsdoc-rules-no-restricted-syntax-options-19-contexts-4"></a>
|
|
9082
9193
|
##### <code>contexts</code>
|
|
9083
9194
|
|
|
@@ -9092,7 +9203,7 @@ your files (as is necessary for finding function blocks not attached to a
|
|
|
9092
9203
|
function declaration or expression, i.e., `@callback` or `@function` (or its
|
|
9093
9204
|
aliases `@func` or `@method`) (including those associated with an `@interface`).
|
|
9094
9205
|
|
|
9095
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
9206
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
9096
9207
|
section of our README for more on the expected format.
|
|
9097
9208
|
|
|
9098
9209
|
|||
|
|
@@ -9270,6 +9381,7 @@ const MY_ENUM = Object.freeze({
|
|
|
9270
9381
|
````
|
|
9271
9382
|
|
|
9272
9383
|
|
|
9384
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-types"></a>
|
|
9273
9385
|
<a name="eslint-plugin-jsdoc-rules-no-types"></a>
|
|
9274
9386
|
### <code>no-types</code>
|
|
9275
9387
|
|
|
@@ -9278,9 +9390,11 @@ This rule reports types being used on `@param` or `@returns`.
|
|
|
9278
9390
|
The rule is intended to prevent the indication of types on tags where
|
|
9279
9391
|
the type information would be redundant with TypeScript.
|
|
9280
9392
|
|
|
9393
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-types-options-20"></a>
|
|
9281
9394
|
<a name="eslint-plugin-jsdoc-rules-no-types-options-20"></a>
|
|
9282
9395
|
#### Options
|
|
9283
9396
|
|
|
9397
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-types-options-20-contexts-5"></a>
|
|
9284
9398
|
<a name="eslint-plugin-jsdoc-rules-no-types-options-20-contexts-5"></a>
|
|
9285
9399
|
##### <code>contexts</code>
|
|
9286
9400
|
|
|
@@ -9292,7 +9406,7 @@ for finding function blocks not attached to a function declaration or
|
|
|
9292
9406
|
expression, i.e., `@callback` or `@function` (or its aliases `@func` or
|
|
9293
9407
|
`@method`) (including those associated with an `@interface`).
|
|
9294
9408
|
|
|
9295
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
9409
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
9296
9410
|
section of our README for more on the expected format.
|
|
9297
9411
|
|
|
9298
9412
|
|||
|
|
@@ -9405,6 +9519,7 @@ function quux (foo) {
|
|
|
9405
9519
|
````
|
|
9406
9520
|
|
|
9407
9521
|
|
|
9522
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-undefined-types"></a>
|
|
9408
9523
|
<a name="eslint-plugin-jsdoc-rules-no-undefined-types"></a>
|
|
9409
9524
|
### <code>no-undefined-types</code>
|
|
9410
9525
|
|
|
@@ -9451,6 +9566,7 @@ reporting on use of that namepath elsewhere) and/or that a tag's `type` is
|
|
|
9451
9566
|
`false` (and should not be checked for types). If the `type` is an array, that
|
|
9452
9567
|
array's items will be considered as defined for the purposes of that tag.
|
|
9453
9568
|
|
|
9569
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-no-undefined-types-options-21"></a>
|
|
9454
9570
|
<a name="eslint-plugin-jsdoc-rules-no-undefined-types-options-21"></a>
|
|
9455
9571
|
#### Options
|
|
9456
9572
|
|
|
@@ -10076,11 +10192,13 @@ export class Foo {
|
|
|
10076
10192
|
````
|
|
10077
10193
|
|
|
10078
10194
|
|
|
10195
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-asterisk-prefix"></a>
|
|
10079
10196
|
<a name="eslint-plugin-jsdoc-rules-require-asterisk-prefix"></a>
|
|
10080
10197
|
### <code>require-asterisk-prefix</code>
|
|
10081
10198
|
|
|
10082
10199
|
Requires that each JSDoc line starts with an `*`.
|
|
10083
10200
|
|
|
10201
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-22"></a>
|
|
10084
10202
|
<a name="eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-22"></a>
|
|
10085
10203
|
#### Options
|
|
10086
10204
|
|
|
@@ -10092,6 +10210,7 @@ and use the `tags` option to apply to specific tags only.
|
|
|
10092
10210
|
|
|
10093
10211
|
After the string option, one may add an object with the following.
|
|
10094
10212
|
|
|
10213
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-22-tags-3"></a>
|
|
10095
10214
|
<a name="eslint-plugin-jsdoc-rules-require-asterisk-prefix-options-22-tags-3"></a>
|
|
10096
10215
|
##### <code>tags</code>
|
|
10097
10216
|
|
|
@@ -10349,6 +10468,7 @@ function quux (foo) {
|
|
|
10349
10468
|
````
|
|
10350
10469
|
|
|
10351
10470
|
|
|
10471
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence"></a>
|
|
10352
10472
|
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence"></a>
|
|
10353
10473
|
### <code>require-description-complete-sentence</code>
|
|
10354
10474
|
|
|
@@ -10366,9 +10486,11 @@ Requires that block description, explicit `@description`, and
|
|
|
10366
10486
|
* Periods after items within the `abbreviations` option array are not treated
|
|
10367
10487
|
as sentence endings.
|
|
10368
10488
|
|
|
10489
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-23"></a>
|
|
10369
10490
|
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-23"></a>
|
|
10370
10491
|
#### Options
|
|
10371
10492
|
|
|
10493
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-23-tags-4"></a>
|
|
10372
10494
|
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-23-tags-4"></a>
|
|
10373
10495
|
##### <code>tags</code>
|
|
10374
10496
|
|
|
@@ -10393,6 +10515,7 @@ its "description" (e.g., for `@returns {someType} some description`, the
|
|
|
10393
10515
|
description is `some description` while for `@some-tag xyz`, the description
|
|
10394
10516
|
is `xyz`).
|
|
10395
10517
|
|
|
10518
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-23-abbreviations"></a>
|
|
10396
10519
|
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-23-abbreviations"></a>
|
|
10397
10520
|
##### <code>abbreviations</code>
|
|
10398
10521
|
|
|
@@ -10400,6 +10523,7 @@ You can provide an `abbreviations` options array to avoid such strings of text
|
|
|
10400
10523
|
being treated as sentence endings when followed by dots. The `.` is not
|
|
10401
10524
|
necessary at the end of the array items.
|
|
10402
10525
|
|
|
10526
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-23-newlinebeforecapsassumesbadsentenceend"></a>
|
|
10403
10527
|
<a name="eslint-plugin-jsdoc-rules-require-description-complete-sentence-options-23-newlinebeforecapsassumesbadsentenceend"></a>
|
|
10404
10528
|
##### <code>newlineBeforeCapsAssumesBadSentenceEnd</code>
|
|
10405
10529
|
|
|
@@ -11059,6 +11183,7 @@ export default (foo) => {
|
|
|
11059
11183
|
````
|
|
11060
11184
|
|
|
11061
11185
|
|
|
11186
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description"></a>
|
|
11062
11187
|
<a name="eslint-plugin-jsdoc-rules-require-description"></a>
|
|
11063
11188
|
### <code>require-description</code>
|
|
11064
11189
|
|
|
@@ -11071,6 +11196,7 @@ Requires that all functions have a description.
|
|
|
11071
11196
|
is `"tag"`) must have a non-empty description that explains the purpose of
|
|
11072
11197
|
the method.
|
|
11073
11198
|
|
|
11199
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-description-options-24"></a>
|
|
11074
11200
|
<a name="eslint-plugin-jsdoc-rules-require-description-options-24"></a>
|
|
11075
11201
|
#### Options
|
|
11076
11202
|
|
|
@@ -11612,6 +11738,7 @@ class quux {
|
|
|
11612
11738
|
````
|
|
11613
11739
|
|
|
11614
11740
|
|
|
11741
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example"></a>
|
|
11615
11742
|
<a name="eslint-plugin-jsdoc-rules-require-example"></a>
|
|
11616
11743
|
### <code>require-example</code>
|
|
11617
11744
|
|
|
@@ -11621,11 +11748,13 @@ Requires that all functions have examples.
|
|
|
11621
11748
|
* Every example tag must have a non-empty description that explains the
|
|
11622
11749
|
method's usage.
|
|
11623
11750
|
|
|
11751
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-25"></a>
|
|
11624
11752
|
<a name="eslint-plugin-jsdoc-rules-require-example-options-25"></a>
|
|
11625
11753
|
#### Options
|
|
11626
11754
|
|
|
11627
11755
|
This rule has an object option.
|
|
11628
11756
|
|
|
11757
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-25-exemptedby"></a>
|
|
11629
11758
|
<a name="eslint-plugin-jsdoc-rules-require-example-options-25-exemptedby"></a>
|
|
11630
11759
|
##### <code>exemptedBy</code>
|
|
11631
11760
|
|
|
@@ -11635,12 +11764,14 @@ block avoids the need for an `@example`. Defaults to an array with
|
|
|
11635
11764
|
so be sure to add back `inheritdoc` if you wish its presence to cause
|
|
11636
11765
|
exemption of the rule.
|
|
11637
11766
|
|
|
11767
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-25-exemptnoarguments"></a>
|
|
11638
11768
|
<a name="eslint-plugin-jsdoc-rules-require-example-options-25-exemptnoarguments"></a>
|
|
11639
11769
|
##### <code>exemptNoArguments</code>
|
|
11640
11770
|
|
|
11641
11771
|
Boolean to indicate that no-argument functions should not be reported for
|
|
11642
11772
|
missing `@example` declarations.
|
|
11643
11773
|
|
|
11774
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-25-contexts-6"></a>
|
|
11644
11775
|
<a name="eslint-plugin-jsdoc-rules-require-example-options-25-contexts-6"></a>
|
|
11645
11776
|
##### <code>contexts</code>
|
|
11646
11777
|
|
|
@@ -11650,25 +11781,29 @@ Set this to an array of strings representing the AST context (or an object with
|
|
|
11650
11781
|
classes). Overrides the default contexts (see below). Set to `"any"` if you
|
|
11651
11782
|
want the rule to apply to any jsdoc block throughout your files.
|
|
11652
11783
|
|
|
11653
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
11784
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
11654
11785
|
section of our README for more on the expected format.
|
|
11655
11786
|
|
|
11787
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-25-checkconstructors"></a>
|
|
11656
11788
|
<a name="eslint-plugin-jsdoc-rules-require-example-options-25-checkconstructors"></a>
|
|
11657
11789
|
##### <code>checkConstructors</code>
|
|
11658
11790
|
|
|
11659
11791
|
A value indicating whether `constructor`s should be checked.
|
|
11660
11792
|
Defaults to `true`.
|
|
11661
11793
|
|
|
11794
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-25-checkgetters"></a>
|
|
11662
11795
|
<a name="eslint-plugin-jsdoc-rules-require-example-options-25-checkgetters"></a>
|
|
11663
11796
|
##### <code>checkGetters</code>
|
|
11664
11797
|
|
|
11665
11798
|
A value indicating whether getters should be checked. Defaults to `false`.
|
|
11666
11799
|
|
|
11800
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-options-25-checksetters"></a>
|
|
11667
11801
|
<a name="eslint-plugin-jsdoc-rules-require-example-options-25-checksetters"></a>
|
|
11668
11802
|
##### <code>checkSetters</code>
|
|
11669
11803
|
|
|
11670
11804
|
A value indicating whether setters should be checked. Defaults to `false`.
|
|
11671
11805
|
|
|
11806
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-example-fixer"></a>
|
|
11672
11807
|
<a name="eslint-plugin-jsdoc-rules-require-example-fixer"></a>
|
|
11673
11808
|
#### Fixer
|
|
11674
11809
|
|
|
@@ -11943,6 +12078,7 @@ function quux () {
|
|
|
11943
12078
|
````
|
|
11944
12079
|
|
|
11945
12080
|
|
|
12081
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-file-overview"></a>
|
|
11946
12082
|
<a name="eslint-plugin-jsdoc-rules-require-file-overview"></a>
|
|
11947
12083
|
### <code>require-file-overview</code>
|
|
11948
12084
|
|
|
@@ -11956,9 +12092,11 @@ Checks that:
|
|
|
11956
12092
|
as being when the overview tag is not preceded by anything other than
|
|
11957
12093
|
a comment.
|
|
11958
12094
|
|
|
12095
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-file-overview-options-26"></a>
|
|
11959
12096
|
<a name="eslint-plugin-jsdoc-rules-require-file-overview-options-26"></a>
|
|
11960
12097
|
#### Options
|
|
11961
12098
|
|
|
12099
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-file-overview-options-26-tags-5"></a>
|
|
11962
12100
|
<a name="eslint-plugin-jsdoc-rules-require-file-overview-options-26-tags-5"></a>
|
|
11963
12101
|
##### <code>tags</code>
|
|
11964
12102
|
|
|
@@ -12237,11 +12375,13 @@ function quux () {
|
|
|
12237
12375
|
````
|
|
12238
12376
|
|
|
12239
12377
|
|
|
12378
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-hyphen-before-param-description"></a>
|
|
12240
12379
|
<a name="eslint-plugin-jsdoc-rules-require-hyphen-before-param-description"></a>
|
|
12241
12380
|
### <code>require-hyphen-before-param-description</code>
|
|
12242
12381
|
|
|
12243
12382
|
Requires (or disallows) a hyphen before the `@param` description.
|
|
12244
12383
|
|
|
12384
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-hyphen-before-param-description-options-27"></a>
|
|
12245
12385
|
<a name="eslint-plugin-jsdoc-rules-require-hyphen-before-param-description-options-27"></a>
|
|
12246
12386
|
#### Options
|
|
12247
12387
|
|
|
@@ -12467,17 +12607,20 @@ function main(argv) {
|
|
|
12467
12607
|
````
|
|
12468
12608
|
|
|
12469
12609
|
|
|
12610
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc"></a>
|
|
12470
12611
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc"></a>
|
|
12471
12612
|
### <code>require-jsdoc</code>
|
|
12472
12613
|
|
|
12473
12614
|
Checks for presence of jsdoc comments, on class declarations as well as
|
|
12474
12615
|
functions.
|
|
12475
12616
|
|
|
12617
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28"></a>
|
|
12476
12618
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28"></a>
|
|
12477
12619
|
#### Options
|
|
12478
12620
|
|
|
12479
12621
|
Accepts one optional options object with the following optional keys.
|
|
12480
12622
|
|
|
12623
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28-publiconly"></a>
|
|
12481
12624
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28-publiconly"></a>
|
|
12482
12625
|
##### <code>publicOnly</code>
|
|
12483
12626
|
|
|
@@ -12494,6 +12637,7 @@ otherwise noted):
|
|
|
12494
12637
|
- `cjs` - CommonJS exports are checked for JSDoc comments (Defaults to `true`)
|
|
12495
12638
|
- `window` - Window global exports are checked for JSDoc comments
|
|
12496
12639
|
|
|
12640
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28-require"></a>
|
|
12497
12641
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28-require"></a>
|
|
12498
12642
|
##### <code>require</code>
|
|
12499
12643
|
|
|
@@ -12507,6 +12651,7 @@ An object with the following optional boolean keys which all default to
|
|
|
12507
12651
|
- `FunctionExpression`
|
|
12508
12652
|
- `MethodDefinition`
|
|
12509
12653
|
|
|
12654
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28-contexts-7"></a>
|
|
12510
12655
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28-contexts-7"></a>
|
|
12511
12656
|
##### <code>contexts</code>
|
|
12512
12657
|
|
|
@@ -12520,9 +12665,10 @@ block which will otherwise be added. Defaults to an empty array.
|
|
|
12520
12665
|
Note that you may need to disable `require` items (e.g., `MethodDefinition`)
|
|
12521
12666
|
if you are specifying a more precise form in `contexts` (e.g., `MethodDefinition:not([accessibility="private"] > FunctionExpression`).
|
|
12522
12667
|
|
|
12523
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
12668
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
12524
12669
|
section of our README for more on the expected format.
|
|
12525
12670
|
|
|
12671
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28-exemptemptyconstructors"></a>
|
|
12526
12672
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28-exemptemptyconstructors"></a>
|
|
12527
12673
|
##### <code>exemptEmptyConstructors</code>
|
|
12528
12674
|
|
|
@@ -12532,6 +12678,7 @@ When `true`, the rule will not report missing jsdoc blocks above constructors
|
|
|
12532
12678
|
with no parameters or return values (this is enabled by default as the class
|
|
12533
12679
|
name or description should be seen as sufficient to convey intent).
|
|
12534
12680
|
|
|
12681
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28-exemptemptyfunctions"></a>
|
|
12535
12682
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28-exemptemptyfunctions"></a>
|
|
12536
12683
|
##### <code>exemptEmptyFunctions</code>
|
|
12537
12684
|
|
|
@@ -12541,6 +12688,7 @@ When `true`, the rule will not report missing jsdoc blocks above
|
|
|
12541
12688
|
functions/methods with no parameters or return values (intended where
|
|
12542
12689
|
function/method names are sufficient for themselves as documentation).
|
|
12543
12690
|
|
|
12691
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28-checkconstructors-1"></a>
|
|
12544
12692
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28-checkconstructors-1"></a>
|
|
12545
12693
|
##### <code>checkConstructors</code>
|
|
12546
12694
|
|
|
@@ -12548,6 +12696,7 @@ A value indicating whether `constructor`s should be checked. Defaults to
|
|
|
12548
12696
|
`true`. When `true`, `exemptEmptyConstructors` may still avoid reporting when
|
|
12549
12697
|
no parameters or return values are found.
|
|
12550
12698
|
|
|
12699
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28-checkgetters-1"></a>
|
|
12551
12700
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28-checkgetters-1"></a>
|
|
12552
12701
|
##### <code>checkGetters</code>
|
|
12553
12702
|
|
|
@@ -12557,6 +12706,7 @@ getters should be checked but only when there is no setter. This may be useful
|
|
|
12557
12706
|
if one only wishes documentation on one of the two accessors. Defaults to
|
|
12558
12707
|
`false`.
|
|
12559
12708
|
|
|
12709
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28-checksetters-1"></a>
|
|
12560
12710
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28-checksetters-1"></a>
|
|
12561
12711
|
##### <code>checkSetters</code>
|
|
12562
12712
|
|
|
@@ -12566,6 +12716,7 @@ setters should be checked but only when there is no getter. This may be useful
|
|
|
12566
12716
|
if one only wishes documentation on one of the two accessors. Defaults to
|
|
12567
12717
|
`false`.
|
|
12568
12718
|
|
|
12719
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-jsdoc-options-28-enablefixer-2"></a>
|
|
12569
12720
|
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-28-enablefixer-2"></a>
|
|
12570
12721
|
##### <code>enableFixer</code>
|
|
12571
12722
|
|
|
@@ -13322,6 +13473,24 @@ export const outer = () => {
|
|
|
13322
13473
|
};
|
|
13323
13474
|
// "jsdoc/require-jsdoc": ["error"|"warn", {"publicOnly":true,"require":{"ArrowFunctionExpression":true,"ClassDeclaration":true,"ClassExpression":true,"FunctionDeclaration":true,"FunctionExpression":true,"MethodDefinition":true}}]
|
|
13324
13475
|
// Message: Missing JSDoc comment.
|
|
13476
|
+
|
|
13477
|
+
/**
|
|
13478
|
+
*
|
|
13479
|
+
*/
|
|
13480
|
+
export class InovaAutoCompleteComponent {
|
|
13481
|
+
public disabled = false;
|
|
13482
|
+
}
|
|
13483
|
+
// "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["PropertyDefinition"],"publicOnly":true}]
|
|
13484
|
+
// Message: Missing JSDoc comment.
|
|
13485
|
+
|
|
13486
|
+
/**
|
|
13487
|
+
* Some comment.
|
|
13488
|
+
*/
|
|
13489
|
+
export class Component {
|
|
13490
|
+
public foo?: number;
|
|
13491
|
+
}
|
|
13492
|
+
// "jsdoc/require-jsdoc": ["error"|"warn", {"checkConstructors":false,"contexts":["PropertyDefinition"],"publicOnly":true}]
|
|
13493
|
+
// Message: Missing JSDoc comment.
|
|
13325
13494
|
````
|
|
13326
13495
|
|
|
13327
13496
|
The following patterns are not considered problems:
|
|
@@ -14138,14 +14307,17 @@ export class User {
|
|
|
14138
14307
|
````
|
|
14139
14308
|
|
|
14140
14309
|
|
|
14310
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description"></a>
|
|
14141
14311
|
<a name="eslint-plugin-jsdoc-rules-require-param-description"></a>
|
|
14142
14312
|
### <code>require-param-description</code>
|
|
14143
14313
|
|
|
14144
14314
|
Requires that each `@param` tag has a `description` value.
|
|
14145
14315
|
|
|
14316
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-29"></a>
|
|
14146
14317
|
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-29"></a>
|
|
14147
14318
|
#### Options
|
|
14148
14319
|
|
|
14320
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-description-options-29-contexts-8"></a>
|
|
14149
14321
|
<a name="eslint-plugin-jsdoc-rules-require-param-description-options-29-contexts-8"></a>
|
|
14150
14322
|
##### <code>contexts</code>
|
|
14151
14323
|
|
|
@@ -14157,7 +14329,7 @@ for finding function blocks not attached to a function declaration or
|
|
|
14157
14329
|
expression, i.e., `@callback` or `@function` (or its aliases `@func` or
|
|
14158
14330
|
`@method`) (including those associated with an `@interface`).
|
|
14159
14331
|
|
|
14160
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
14332
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
14161
14333
|
section of our README for more on the expected format.
|
|
14162
14334
|
|
|
14163
14335
|
|||
|
|
@@ -14258,6 +14430,7 @@ function quux (foo) {
|
|
|
14258
14430
|
````
|
|
14259
14431
|
|
|
14260
14432
|
|
|
14433
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-name"></a>
|
|
14261
14434
|
<a name="eslint-plugin-jsdoc-rules-require-param-name"></a>
|
|
14262
14435
|
### <code>require-param-name</code>
|
|
14263
14436
|
|
|
@@ -14267,9 +14440,11 @@ Requires that all function parameters have names.
|
|
|
14267
14440
|
>
|
|
14268
14441
|
> [JSDoc](https://jsdoc.app/tags-param.html#overview)
|
|
14269
14442
|
|
|
14443
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-name-options-30"></a>
|
|
14270
14444
|
<a name="eslint-plugin-jsdoc-rules-require-param-name-options-30"></a>
|
|
14271
14445
|
#### Options
|
|
14272
14446
|
|
|
14447
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-name-options-30-contexts-9"></a>
|
|
14273
14448
|
<a name="eslint-plugin-jsdoc-rules-require-param-name-options-30-contexts-9"></a>
|
|
14274
14449
|
##### <code>contexts</code>
|
|
14275
14450
|
|
|
@@ -14281,7 +14456,7 @@ for finding function blocks not attached to a function declaration or
|
|
|
14281
14456
|
expression, i.e., `@callback` or `@function` (or its aliases `@func` or
|
|
14282
14457
|
`@method`) (including those associated with an `@interface`).
|
|
14283
14458
|
|
|
14284
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
14459
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
14285
14460
|
section of our README for more on the expected format.
|
|
14286
14461
|
|
|
14287
14462
|
|||
|
|
@@ -14398,14 +14573,17 @@ function example(cb) {
|
|
|
14398
14573
|
````
|
|
14399
14574
|
|
|
14400
14575
|
|
|
14576
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type"></a>
|
|
14401
14577
|
<a name="eslint-plugin-jsdoc-rules-require-param-type"></a>
|
|
14402
14578
|
### <code>require-param-type</code>
|
|
14403
14579
|
|
|
14404
14580
|
Requires that each `@param` tag has a `type` value.
|
|
14405
14581
|
|
|
14582
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-31"></a>
|
|
14406
14583
|
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-31"></a>
|
|
14407
14584
|
#### Options
|
|
14408
14585
|
|
|
14586
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-type-options-31-contexts-10"></a>
|
|
14409
14587
|
<a name="eslint-plugin-jsdoc-rules-require-param-type-options-31-contexts-10"></a>
|
|
14410
14588
|
##### <code>contexts</code>
|
|
14411
14589
|
|
|
@@ -14417,7 +14595,7 @@ for finding function blocks not attached to a function declaration or
|
|
|
14417
14595
|
expression, i.e., `@callback` or `@function` (or its aliases `@func` or
|
|
14418
14596
|
`@method`) (including those associated with an `@interface`).
|
|
14419
14597
|
|
|
14420
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
14598
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
14421
14599
|
section of our README for more on the expected format.
|
|
14422
14600
|
|
|
14423
14601
|
|||
|
|
@@ -14518,11 +14696,13 @@ function quux (foo) {
|
|
|
14518
14696
|
````
|
|
14519
14697
|
|
|
14520
14698
|
|
|
14699
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param"></a>
|
|
14521
14700
|
<a name="eslint-plugin-jsdoc-rules-require-param"></a>
|
|
14522
14701
|
### <code>require-param</code>
|
|
14523
14702
|
|
|
14524
14703
|
Requires that all function parameters are documented.
|
|
14525
14704
|
|
|
14705
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-fixer-1"></a>
|
|
14526
14706
|
<a name="eslint-plugin-jsdoc-rules-require-param-fixer-1"></a>
|
|
14527
14707
|
#### Fixer
|
|
14528
14708
|
|
|
@@ -14530,6 +14710,7 @@ Adds `@param <name>` for each tag present in the function signature but
|
|
|
14530
14710
|
missing in the jsdoc. Can be disabled by setting the `enableFixer`
|
|
14531
14711
|
option to `false`.
|
|
14532
14712
|
|
|
14713
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-fixer-1-destructured-object-and-array-naming"></a>
|
|
14533
14714
|
<a name="eslint-plugin-jsdoc-rules-require-param-fixer-1-destructured-object-and-array-naming"></a>
|
|
14534
14715
|
##### Destructured object and array naming
|
|
14535
14716
|
|
|
@@ -14582,6 +14763,7 @@ function quux ([foo, bar]) {
|
|
|
14582
14763
|
*/
|
|
14583
14764
|
```
|
|
14584
14765
|
|
|
14766
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-fixer-1-missing-root-fixing"></a>
|
|
14585
14767
|
<a name="eslint-plugin-jsdoc-rules-require-param-fixer-1-missing-root-fixing"></a>
|
|
14586
14768
|
##### Missing root fixing
|
|
14587
14769
|
|
|
@@ -14617,6 +14799,7 @@ numeric component).
|
|
|
14617
14799
|
And one can have the count begin at another number (e.g., `1`) by changing
|
|
14618
14800
|
`autoIncrementBase` from the default of `0`.
|
|
14619
14801
|
|
|
14802
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-fixer-1-rest-element-restelement-insertions"></a>
|
|
14620
14803
|
<a name="eslint-plugin-jsdoc-rules-require-param-fixer-1-rest-element-restelement-insertions"></a>
|
|
14621
14804
|
##### Rest Element (<code>RestElement</code>) insertions
|
|
14622
14805
|
|
|
@@ -14669,6 +14852,7 @@ function baar ([a, ...extra]) {
|
|
|
14669
14852
|
|
|
14670
14853
|
...because it does not use the `...` syntax in the type.
|
|
14671
14854
|
|
|
14855
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-fixer-1-object-rest-property-insertions"></a>
|
|
14672
14856
|
<a name="eslint-plugin-jsdoc-rules-require-param-fixer-1-object-rest-property-insertions"></a>
|
|
14673
14857
|
##### Object Rest Property insertions
|
|
14674
14858
|
|
|
@@ -14704,16 +14888,19 @@ other properties, so in looking at the docs alone without looking at the
|
|
|
14704
14888
|
function signature, it may appear that there is an actual property named
|
|
14705
14889
|
`extra`.
|
|
14706
14890
|
|
|
14891
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32"></a>
|
|
14707
14892
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32"></a>
|
|
14708
14893
|
#### Options
|
|
14709
14894
|
|
|
14710
14895
|
An options object accepts the following optional properties:
|
|
14711
14896
|
|
|
14897
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-enablefixer-3"></a>
|
|
14712
14898
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-enablefixer-3"></a>
|
|
14713
14899
|
##### <code>enableFixer</code>
|
|
14714
14900
|
|
|
14715
14901
|
Whether to enable the fixer. Defaults to `true`.
|
|
14716
14902
|
|
|
14903
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-enablerootfixer"></a>
|
|
14717
14904
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-enablerootfixer"></a>
|
|
14718
14905
|
##### <code>enableRootFixer</code>
|
|
14719
14906
|
|
|
@@ -14721,12 +14908,14 @@ Whether to enable the auto-adding of incrementing roots (see the "Fixer"
|
|
|
14721
14908
|
section). Defaults to `true`. Has no effect if `enableFixer` is set to
|
|
14722
14909
|
`false`.
|
|
14723
14910
|
|
|
14911
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-enablerestelementfixer"></a>
|
|
14724
14912
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-enablerestelementfixer"></a>
|
|
14725
14913
|
##### <code>enableRestElementFixer</code>
|
|
14726
14914
|
|
|
14727
14915
|
Whether to enable the rest element fixer (see
|
|
14728
14916
|
"Rest Element (`RestElement`) insertions"). Defaults to `true`.
|
|
14729
14917
|
|
|
14918
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-checkrestproperty-1"></a>
|
|
14730
14919
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-checkrestproperty-1"></a>
|
|
14731
14920
|
##### <code>checkRestProperty</code>
|
|
14732
14921
|
|
|
@@ -14781,12 +14970,14 @@ function quux ({num, ...extra}) {
|
|
|
14781
14970
|
}
|
|
14782
14971
|
```
|
|
14783
14972
|
|
|
14973
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-autoincrementbase"></a>
|
|
14784
14974
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-autoincrementbase"></a>
|
|
14785
14975
|
##### <code>autoIncrementBase</code>
|
|
14786
14976
|
|
|
14787
14977
|
Numeric to indicate the number at which to begin auto-incrementing roots.
|
|
14788
14978
|
Defaults to `0`.
|
|
14789
14979
|
|
|
14980
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-unnamedrootbase"></a>
|
|
14790
14981
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-unnamedrootbase"></a>
|
|
14791
14982
|
##### <code>unnamedRootBase</code>
|
|
14792
14983
|
|
|
@@ -14813,6 +15004,7 @@ function quux ({foo}, [bar], {baz}) {
|
|
|
14813
15004
|
*/
|
|
14814
15005
|
```
|
|
14815
15006
|
|
|
15007
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-exemptedby-1"></a>
|
|
14816
15008
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-exemptedby-1"></a>
|
|
14817
15009
|
##### <code>exemptedBy</code>
|
|
14818
15010
|
|
|
@@ -14822,6 +15014,7 @@ avoids the need for a `@param`. Defaults to an array with
|
|
|
14822
15014
|
so be sure to add back `inheritdoc` if you wish its presence to cause
|
|
14823
15015
|
exemption of the rule.
|
|
14824
15016
|
|
|
15017
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-checktypespattern-1"></a>
|
|
14825
15018
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-checktypespattern-1"></a>
|
|
14826
15019
|
##### <code>checkTypesPattern</code>
|
|
14827
15020
|
|
|
@@ -14857,6 +15050,7 @@ You could set this regular expression to a more expansive list, or you
|
|
|
14857
15050
|
could restrict it such that even types matching those strings would not
|
|
14858
15051
|
need destructuring.
|
|
14859
15052
|
|
|
15053
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-contexts-11"></a>
|
|
14860
15054
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-contexts-11"></a>
|
|
14861
15055
|
##### <code>contexts</code>
|
|
14862
15056
|
|
|
@@ -14866,30 +15060,35 @@ Overrides the default contexts (see below). May be useful for adding such as
|
|
|
14866
15060
|
`TSMethodSignature` in TypeScript or restricting the contexts
|
|
14867
15061
|
which are checked.
|
|
14868
15062
|
|
|
14869
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
15063
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
14870
15064
|
section of our README for more on the expected format.
|
|
14871
15065
|
|
|
15066
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-checkconstructors-2"></a>
|
|
14872
15067
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-checkconstructors-2"></a>
|
|
14873
15068
|
##### <code>checkConstructors</code>
|
|
14874
15069
|
|
|
14875
15070
|
A value indicating whether `constructor`s should be checked. Defaults to
|
|
14876
15071
|
`true`.
|
|
14877
15072
|
|
|
15073
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-checkgetters-2"></a>
|
|
14878
15074
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-checkgetters-2"></a>
|
|
14879
15075
|
##### <code>checkGetters</code>
|
|
14880
15076
|
|
|
14881
15077
|
A value indicating whether getters should be checked. Defaults to `false`.
|
|
14882
15078
|
|
|
15079
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-checksetters-2"></a>
|
|
14883
15080
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-checksetters-2"></a>
|
|
14884
15081
|
##### <code>checkSetters</code>
|
|
14885
15082
|
|
|
14886
15083
|
A value indicating whether setters should be checked. Defaults to `false`.
|
|
14887
15084
|
|
|
15085
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-checkdestructured-1"></a>
|
|
14888
15086
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-checkdestructured-1"></a>
|
|
14889
15087
|
##### <code>checkDestructured</code>
|
|
14890
15088
|
|
|
14891
15089
|
Whether to require destructured properties. Defaults to `true`.
|
|
14892
15090
|
|
|
15091
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-checkdestructuredroots"></a>
|
|
14893
15092
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-checkdestructuredroots"></a>
|
|
14894
15093
|
##### <code>checkDestructuredRoots</code>
|
|
14895
15094
|
|
|
@@ -14903,6 +15102,7 @@ implied to be `false` (i.e., the inside of the roots will not be checked
|
|
|
14903
15102
|
either, e.g., it will also not complain if `a` or `b` do not have their own
|
|
14904
15103
|
documentation). Defaults to `true`.
|
|
14905
15104
|
|
|
15105
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-param-options-32-usedefaultobjectproperties-1"></a>
|
|
14906
15106
|
<a name="eslint-plugin-jsdoc-rules-require-param-options-32-usedefaultobjectproperties-1"></a>
|
|
14907
15107
|
##### <code>useDefaultObjectProperties</code>
|
|
14908
15108
|
|
|
@@ -16246,6 +16446,7 @@ export function testFn1 ({ prop = { a: 1, b: 2 } }) {
|
|
|
16246
16446
|
````
|
|
16247
16447
|
|
|
16248
16448
|
|
|
16449
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-property"></a>
|
|
16249
16450
|
<a name="eslint-plugin-jsdoc-rules-require-property"></a>
|
|
16250
16451
|
### <code>require-property</code>
|
|
16251
16452
|
|
|
@@ -16255,6 +16456,7 @@ when their type is a plain `object`, `Object`, or `PlainObject`.
|
|
|
16255
16456
|
Note that any other type, including a subtype of object such as
|
|
16256
16457
|
`object<string, string>`, will not be reported.
|
|
16257
16458
|
|
|
16459
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-property-fixer-2"></a>
|
|
16258
16460
|
<a name="eslint-plugin-jsdoc-rules-require-property-fixer-2"></a>
|
|
16259
16461
|
#### Fixer
|
|
16260
16462
|
|
|
@@ -16353,6 +16555,7 @@ function quux () {
|
|
|
16353
16555
|
````
|
|
16354
16556
|
|
|
16355
16557
|
|
|
16558
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-property-description"></a>
|
|
16356
16559
|
<a name="eslint-plugin-jsdoc-rules-require-property-description"></a>
|
|
16357
16560
|
### <code>require-property-description</code>
|
|
16358
16561
|
|
|
@@ -16422,6 +16625,7 @@ The following patterns are not considered problems:
|
|
|
16422
16625
|
````
|
|
16423
16626
|
|
|
16424
16627
|
|
|
16628
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-property-name"></a>
|
|
16425
16629
|
<a name="eslint-plugin-jsdoc-rules-require-property-name"></a>
|
|
16426
16630
|
### <code>require-property-name</code>
|
|
16427
16631
|
|
|
@@ -16482,6 +16686,7 @@ The following patterns are not considered problems:
|
|
|
16482
16686
|
````
|
|
16483
16687
|
|
|
16484
16688
|
|
|
16689
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-property-type"></a>
|
|
16485
16690
|
<a name="eslint-plugin-jsdoc-rules-require-property-type"></a>
|
|
16486
16691
|
### <code>require-property-type</code>
|
|
16487
16692
|
|
|
@@ -16542,6 +16747,7 @@ The following patterns are not considered problems:
|
|
|
16542
16747
|
````
|
|
16543
16748
|
|
|
16544
16749
|
|
|
16750
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-check"></a>
|
|
16545
16751
|
<a name="eslint-plugin-jsdoc-rules-require-returns-check"></a>
|
|
16546
16752
|
### <code>require-returns-check</code>
|
|
16547
16753
|
|
|
@@ -16554,6 +16760,7 @@ is set to `false` no non-`undefined` returned or resolved value is found.
|
|
|
16554
16760
|
|
|
16555
16761
|
Will also report if multiple `@returns` tags are present.
|
|
16556
16762
|
|
|
16763
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-check-options-33"></a>
|
|
16557
16764
|
<a name="eslint-plugin-jsdoc-rules-require-returns-check-options-33"></a>
|
|
16558
16765
|
#### Options
|
|
16559
16766
|
|
|
@@ -17131,6 +17338,7 @@ function * quux() {}
|
|
|
17131
17338
|
````
|
|
17132
17339
|
|
|
17133
17340
|
|
|
17341
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-description"></a>
|
|
17134
17342
|
<a name="eslint-plugin-jsdoc-rules-require-returns-description"></a>
|
|
17135
17343
|
### <code>require-returns-description</code>
|
|
17136
17344
|
|
|
@@ -17138,9 +17346,11 @@ Requires that the `@returns` tag has a `description` value. The error
|
|
|
17138
17346
|
will not be reported if the return value is `void` or `undefined`
|
|
17139
17347
|
or if it is `Promise<void>` or `Promise<undefined>`.
|
|
17140
17348
|
|
|
17349
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-description-options-34"></a>
|
|
17141
17350
|
<a name="eslint-plugin-jsdoc-rules-require-returns-description-options-34"></a>
|
|
17142
17351
|
#### Options
|
|
17143
17352
|
|
|
17353
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-description-options-34-contexts-12"></a>
|
|
17144
17354
|
<a name="eslint-plugin-jsdoc-rules-require-returns-description-options-34-contexts-12"></a>
|
|
17145
17355
|
##### <code>contexts</code>
|
|
17146
17356
|
|
|
@@ -17152,7 +17362,7 @@ for finding function blocks not attached to a function declaration or
|
|
|
17152
17362
|
expression, i.e., `@callback` or `@function` (or its aliases `@func` or
|
|
17153
17363
|
`@method`) (including those associated with an `@interface`).
|
|
17154
17364
|
|
|
17155
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
17365
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
17156
17366
|
section of our README for more on the expected format.
|
|
17157
17367
|
|
|
17158
17368
|
|||
|
|
@@ -17289,14 +17499,17 @@ function quux () {
|
|
|
17289
17499
|
````
|
|
17290
17500
|
|
|
17291
17501
|
|
|
17502
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-type"></a>
|
|
17292
17503
|
<a name="eslint-plugin-jsdoc-rules-require-returns-type"></a>
|
|
17293
17504
|
### <code>require-returns-type</code>
|
|
17294
17505
|
|
|
17295
17506
|
Requires that `@returns` tag has `type` value.
|
|
17296
17507
|
|
|
17508
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-type-options-35"></a>
|
|
17297
17509
|
<a name="eslint-plugin-jsdoc-rules-require-returns-type-options-35"></a>
|
|
17298
17510
|
#### Options
|
|
17299
17511
|
|
|
17512
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-type-options-35-contexts-13"></a>
|
|
17300
17513
|
<a name="eslint-plugin-jsdoc-rules-require-returns-type-options-35-contexts-13"></a>
|
|
17301
17514
|
##### <code>contexts</code>
|
|
17302
17515
|
|
|
@@ -17308,7 +17521,7 @@ for finding function blocks not attached to a function declaration or
|
|
|
17308
17521
|
expression, i.e., `@callback` or `@function` (or its aliases `@func` or
|
|
17309
17522
|
`@method`) (including those associated with an `@interface`).
|
|
17310
17523
|
|
|
17311
|
-
See the ["AST and Selectors"](#eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
17524
|
+
See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
|
|
17312
17525
|
section of our README for more on the expected format.
|
|
17313
17526
|
|
|
17314
17527
|
|||
|
|
@@ -17410,6 +17623,7 @@ function quux () {
|
|
|
17410
17623
|
````
|
|
17411
17624
|
|
|
17412
17625
|
|
|
17626
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns"></a>
|
|
17413
17627
|
<a name="eslint-plugin-jsdoc-rules-require-returns"></a>
|
|
17414
17628
|
### <code>require-returns</code>
|
|
17415
17629
|
|
|
@@ -17417,6 +17631,7 @@ Requires that returns are documented.
|
|
|
17417
17631
|
|
|
17418
17632
|
Will also report if multiple `@returns` tags are present.
|
|
17419
17633
|
|
|
17634
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-returns-options-36"></a>
|
|
17420
17635
|
<a name="eslint-plugin-jsdoc-rules-require-returns-options-36"></a>
|
|
17421
17636
|
#### Options
|
|
17422
17637
|
|
|
@@ -17682,14 +17897,6 @@ class quux {
|
|
|
17682
17897
|
// "jsdoc/require-returns": ["error"|"warn", {"contexts":["any"],"forceRequireReturn":true}]
|
|
17683
17898
|
// Message: Missing JSDoc @returns declaration.
|
|
17684
17899
|
|
|
17685
|
-
/**
|
|
17686
|
-
* @param {array} a
|
|
17687
|
-
*/
|
|
17688
|
-
async function foo(a) {
|
|
17689
|
-
return Promise.all(a);
|
|
17690
|
-
}
|
|
17691
|
-
// Message: Missing JSDoc @returns declaration.
|
|
17692
|
-
|
|
17693
17900
|
/**
|
|
17694
17901
|
*
|
|
17695
17902
|
*/
|
|
@@ -17987,6 +18194,21 @@ export function f(): string {
|
|
|
17987
18194
|
}
|
|
17988
18195
|
// "jsdoc/require-returns": ["error"|"warn", {"contexts":[":not(BlockStatement) > FunctionDeclaration","MethodDefinition","TSMethodSignature","TSPropertySignature > TSTypeAnnotation > TSFunctionType"]}]
|
|
17989
18196
|
// Message: Missing JSDoc @returns declaration.
|
|
18197
|
+
|
|
18198
|
+
/**
|
|
18199
|
+
* @param ms time in millis
|
|
18200
|
+
*/
|
|
18201
|
+
export const sleep = (ms: number) =>
|
|
18202
|
+
new Promise<string>((res) => setTimeout(res, ms));
|
|
18203
|
+
// Message: Missing JSDoc @returns declaration.
|
|
18204
|
+
|
|
18205
|
+
/**
|
|
18206
|
+
* @param ms time in millis
|
|
18207
|
+
*/
|
|
18208
|
+
export const sleep = (ms: number) => {
|
|
18209
|
+
return new Promise<string>((res) => setTimeout(res, ms));
|
|
18210
|
+
};
|
|
18211
|
+
// Message: Missing JSDoc @returns declaration.
|
|
17990
18212
|
````
|
|
17991
18213
|
|
|
17992
18214
|
The following patterns are not considered problems:
|
|
@@ -18470,14 +18692,36 @@ function quux () {
|
|
|
18470
18692
|
async function foo() {
|
|
18471
18693
|
return new Promise(resolve => resolve());
|
|
18472
18694
|
}
|
|
18695
|
+
|
|
18696
|
+
/**
|
|
18697
|
+
* @param {array} a
|
|
18698
|
+
*/
|
|
18699
|
+
async function foo(a) {
|
|
18700
|
+
return Promise.all(a);
|
|
18701
|
+
}
|
|
18702
|
+
|
|
18703
|
+
/**
|
|
18704
|
+
* @param ms time in millis
|
|
18705
|
+
*/
|
|
18706
|
+
export const sleep = (ms: number) =>
|
|
18707
|
+
new Promise<void>((res) => setTimeout(res, ms));
|
|
18708
|
+
|
|
18709
|
+
/**
|
|
18710
|
+
* @param ms time in millis
|
|
18711
|
+
*/
|
|
18712
|
+
export const sleep = (ms: number) => {
|
|
18713
|
+
return new Promise<void>((res) => setTimeout(res, ms));
|
|
18714
|
+
};
|
|
18473
18715
|
````
|
|
18474
18716
|
|
|
18475
18717
|
|
|
18718
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-throws"></a>
|
|
18476
18719
|
<a name="eslint-plugin-jsdoc-rules-require-throws"></a>
|
|
18477
18720
|
### <code>require-throws</code>
|
|
18478
18721
|
|
|
18479
18722
|
Requires that throw statements are documented.
|
|
18480
18723
|
|
|
18724
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-throws-options-37"></a>
|
|
18481
18725
|
<a name="eslint-plugin-jsdoc-rules-require-throws-options-37"></a>
|
|
18482
18726
|
#### Options
|
|
18483
18727
|
|
|
@@ -18771,6 +19015,7 @@ function quux (foo) {
|
|
|
18771
19015
|
````
|
|
18772
19016
|
|
|
18773
19017
|
|
|
19018
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-yields"></a>
|
|
18774
19019
|
<a name="eslint-plugin-jsdoc-rules-require-yields"></a>
|
|
18775
19020
|
### <code>require-yields</code>
|
|
18776
19021
|
|
|
@@ -18781,6 +19026,7 @@ Will also report if multiple `@yields` tags are present.
|
|
|
18781
19026
|
See the `next`, `forceRequireNext`, and `nextWithGeneratorTag` options for an
|
|
18782
19027
|
option to expect a non-standard `@next` tag.
|
|
18783
19028
|
|
|
19029
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-yields-options-38"></a>
|
|
18784
19030
|
<a name="eslint-plugin-jsdoc-rules-require-yields-options-38"></a>
|
|
18785
19031
|
#### Options
|
|
18786
19032
|
|
|
@@ -19573,6 +19819,7 @@ function * quux (foo) {
|
|
|
19573
19819
|
````
|
|
19574
19820
|
|
|
19575
19821
|
|
|
19822
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-yields-check"></a>
|
|
19576
19823
|
<a name="eslint-plugin-jsdoc-rules-require-yields-check"></a>
|
|
19577
19824
|
### <code>require-yields-check</code>
|
|
19578
19825
|
|
|
@@ -19591,6 +19838,7 @@ function bodies.
|
|
|
19591
19838
|
|
|
19592
19839
|
Will also report if multiple `@yields` tags are present.
|
|
19593
19840
|
|
|
19841
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-require-yields-check-options-39"></a>
|
|
19594
19842
|
<a name="eslint-plugin-jsdoc-rules-require-yields-check-options-39"></a>
|
|
19595
19843
|
#### Options
|
|
19596
19844
|
|
|
@@ -20095,6 +20343,7 @@ function * quux (foo) {
|
|
|
20095
20343
|
````
|
|
20096
20344
|
|
|
20097
20345
|
|
|
20346
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags"></a>
|
|
20098
20347
|
<a name="eslint-plugin-jsdoc-rules-sort-tags"></a>
|
|
20099
20348
|
### <code>sort-tags</code>
|
|
20100
20349
|
|
|
@@ -20102,9 +20351,11 @@ Sorts tags by a specified sequence according to tag name.
|
|
|
20102
20351
|
|
|
20103
20352
|
(Default order originally inspired by [`@homer0/prettier-plugin-jsdoc`](https://github.com/homer0/packages/tree/main/packages/public/prettier-plugin-jsdoc).)
|
|
20104
20353
|
|
|
20354
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-40"></a>
|
|
20105
20355
|
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-40"></a>
|
|
20106
20356
|
#### Options
|
|
20107
20357
|
|
|
20358
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-40-tagsequence"></a>
|
|
20108
20359
|
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-40-tagsequence"></a>
|
|
20109
20360
|
##### <code>tagSequence</code>
|
|
20110
20361
|
|
|
@@ -20281,6 +20532,7 @@ a fixed order that doesn't change into the future, supply your own
|
|
|
20281
20532
|
];
|
|
20282
20533
|
```
|
|
20283
20534
|
|
|
20535
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-sort-tags-options-40-alphabetizeextras"></a>
|
|
20284
20536
|
<a name="eslint-plugin-jsdoc-rules-sort-tags-options-40-alphabetizeextras"></a>
|
|
20285
20537
|
##### <code>alphabetizeExtras</code>
|
|
20286
20538
|
|
|
@@ -20432,11 +20684,13 @@ function quux () {}
|
|
|
20432
20684
|
````
|
|
20433
20685
|
|
|
20434
20686
|
|
|
20687
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines"></a>
|
|
20435
20688
|
<a name="eslint-plugin-jsdoc-rules-tag-lines"></a>
|
|
20436
20689
|
### <code>tag-lines</code>
|
|
20437
20690
|
|
|
20438
20691
|
Enforces lines (or no lines) between tags.
|
|
20439
20692
|
|
|
20693
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-41"></a>
|
|
20440
20694
|
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-41"></a>
|
|
20441
20695
|
#### Options
|
|
20442
20696
|
|
|
@@ -20448,17 +20702,20 @@ for particular tags).
|
|
|
20448
20702
|
|
|
20449
20703
|
The second option is an object with the following optional properties.
|
|
20450
20704
|
|
|
20705
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-41-count-defaults-to-1"></a>
|
|
20451
20706
|
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-41-count-defaults-to-1"></a>
|
|
20452
20707
|
##### <code>count</code> (defaults to 1)
|
|
20453
20708
|
|
|
20454
20709
|
Use with "always" to indicate the number of lines to require be present.
|
|
20455
20710
|
|
|
20711
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-41-noendlines-defaults-to-false"></a>
|
|
20456
20712
|
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-41-noendlines-defaults-to-false"></a>
|
|
20457
20713
|
##### <code>noEndLines</code> (defaults to <code>false</code>)
|
|
20458
20714
|
|
|
20459
20715
|
Use with "always" to indicate the normal lines to be added after tags should
|
|
20460
20716
|
not be added after the final tag.
|
|
20461
20717
|
|
|
20718
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-tag-lines-options-41-tags-default-to-empty-object"></a>
|
|
20462
20719
|
<a name="eslint-plugin-jsdoc-rules-tag-lines-options-41-tags-default-to-empty-object"></a>
|
|
20463
20720
|
##### <code>tags</code> (default to empty object)
|
|
20464
20721
|
|
|
@@ -20775,13 +21032,14 @@ The following patterns are not considered problems:
|
|
|
20775
21032
|
````
|
|
20776
21033
|
|
|
20777
21034
|
|
|
21035
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-valid-types"></a>
|
|
20778
21036
|
<a name="eslint-plugin-jsdoc-rules-valid-types"></a>
|
|
20779
21037
|
### <code>valid-types</code>
|
|
20780
21038
|
|
|
20781
21039
|
Requires all types to be valid JSDoc, Closure, or TypeScript compiler types
|
|
20782
21040
|
without syntax errors. Note that what determines a valid type is handled by
|
|
20783
21041
|
our type parsing engine, [jsdoc-type-pratt-parser](https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser),
|
|
20784
|
-
using [`settings.jsdoc.mode`](#eslint-plugin-jsdoc-settings-mode) to
|
|
21042
|
+
using [`settings.jsdoc.mode`](#user-content-eslint-plugin-jsdoc-settings-mode) to
|
|
20785
21043
|
determine whether to use jsdoc-type-pratt-parser's "permissive" parsing or
|
|
20786
21044
|
the stricter "jsdoc", "typescript", "closure" modes.
|
|
20787
21045
|
|
|
@@ -20855,6 +21113,7 @@ for valid types (based on the tag's `type` value), and either portion checked
|
|
|
20855
21113
|
for presence (based on `false` `name` or `type` values or their `required`
|
|
20856
21114
|
value). See the setting for more details.
|
|
20857
21115
|
|
|
21116
|
+
<a name="user-content-eslint-plugin-jsdoc-rules-valid-types-options-42"></a>
|
|
20858
21117
|
<a name="eslint-plugin-jsdoc-rules-valid-types-options-42"></a>
|
|
20859
21118
|
#### Options
|
|
20860
21119
|
|