eslint-plugin-jsdoc 46.4.5 → 46.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/dist/alignTransform.js +5 -5
- package/dist/alignTransform.js.map +1 -1
- package/dist/index.js +21 -10
- package/dist/index.js.map +1 -1
- package/dist/iterateJsdoc.js +1 -1
- package/dist/iterateJsdoc.js.map +1 -1
- package/dist/rules/checkExamples.js +12 -6
- package/dist/rules/checkExamples.js.map +1 -1
- package/package.json +19 -15
- package/docs/advanced.md +0 -102
- package/docs/rules/check-access.md +0 -193
- package/docs/rules/check-alignment.md +0 -169
- package/docs/rules/check-examples.md +0 -784
- package/docs/rules/check-indentation.md +0 -296
- package/docs/rules/check-line-alignment.md +0 -1002
- package/docs/rules/check-param-names.md +0 -1035
- package/docs/rules/check-property-names.md +0 -244
- package/docs/rules/check-syntax.md +0 -80
- package/docs/rules/check-tag-names.md +0 -1132
- package/docs/rules/check-types.md +0 -1198
- package/docs/rules/check-values.md +0 -409
- package/docs/rules/empty-tags.md +0 -220
- package/docs/rules/implements-on-classes.md +0 -219
- package/docs/rules/imports-as-dependencies.md +0 -99
- package/docs/rules/informative-docs.md +0 -400
- package/docs/rules/match-description.md +0 -1008
- package/docs/rules/match-name.md +0 -249
- package/docs/rules/multiline-blocks.md +0 -398
- package/docs/rules/no-bad-blocks.md +0 -174
- package/docs/rules/no-blank-block-descriptions.md +0 -91
- package/docs/rules/no-blank-blocks.md +0 -98
- package/docs/rules/no-defaults.md +0 -207
- package/docs/rules/no-missing-syntax.md +0 -275
- package/docs/rules/no-multi-asterisks.md +0 -278
- package/docs/rules/no-restricted-syntax.md +0 -383
- package/docs/rules/no-types.md +0 -168
- package/docs/rules/no-undefined-types.md +0 -789
- package/docs/rules/require-asterisk-prefix.md +0 -297
- package/docs/rules/require-description-complete-sentence.md +0 -820
- package/docs/rules/require-description.md +0 -585
- package/docs/rules/require-example.md +0 -390
- package/docs/rules/require-file-overview.md +0 -324
- package/docs/rules/require-hyphen-before-param-description.md +0 -281
- package/docs/rules/require-jsdoc.md +0 -1857
- package/docs/rules/require-param-description.md +0 -238
- package/docs/rules/require-param-name.md +0 -163
- package/docs/rules/require-param-type.md +0 -227
- package/docs/rules/require-param.md +0 -1820
- package/docs/rules/require-property-description.md +0 -88
- package/docs/rules/require-property-name.md +0 -79
- package/docs/rules/require-property-type.md +0 -79
- package/docs/rules/require-property.md +0 -128
- package/docs/rules/require-returns-check.md +0 -1053
- package/docs/rules/require-returns-description.md +0 -181
- package/docs/rules/require-returns-type.md +0 -144
- package/docs/rules/require-returns.md +0 -1191
- package/docs/rules/require-throws.md +0 -326
- package/docs/rules/require-yields-check.md +0 -544
- package/docs/rules/require-yields.md +0 -823
- package/docs/rules/sort-tags.md +0 -635
- package/docs/rules/tag-lines.md +0 -551
- package/docs/rules/text-escaping.md +0 -177
- package/docs/rules/valid-types.md +0 -881
- package/docs/settings.md +0 -362
- package/tsconfig.json +0 -22
package/docs/settings.md
DELETED
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
<a name="user-content-settings"></a>
|
|
2
|
-
<a name="settings"></a>
|
|
3
|
-
## Settings
|
|
4
|
-
|
|
5
|
-
* [Allow tags (`@private` or `@internal`) to disable rules for that comment block](#user-content-settings-allow-tags-private-or-internal-to-disable-rules-for-that-comment-block)
|
|
6
|
-
* [`maxLines` and `minLines`](#user-content-settings-maxlines-and-minlines)
|
|
7
|
-
* [Mode](#user-content-settings-mode)
|
|
8
|
-
* [Alias Preference](#user-content-settings-alias-preference)
|
|
9
|
-
* [Default Preferred Aliases](#user-content-settings-alias-preference-default-preferred-aliases)
|
|
10
|
-
* [`@override`/`@augments`/`@extends`/`@implements`/`@ignore` Without Accompanying `@param`/`@description`/`@example`/`@returns`/`@throws`/`@yields`](#user-content-settings-override-augments-extends-implements-ignore-without-accompanying-param-description-example-returns-throws-yields)
|
|
11
|
-
* [Settings to Configure `check-types` and `no-undefined-types`](#user-content-settings-settings-to-configure-check-types-and-no-undefined-types)
|
|
12
|
-
* [`structuredTags`](#user-content-settings-structuredtags)
|
|
13
|
-
* [`contexts`](#user-content-settings-contexts)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<a name="user-content-settings-allow-tags-private-or-internal-to-disable-rules-for-that-comment-block"></a>
|
|
17
|
-
<a name="settings-allow-tags-private-or-internal-to-disable-rules-for-that-comment-block"></a>
|
|
18
|
-
### Allow tags (<code>@private</code> or <code>@internal</code>) to disable rules for that comment block
|
|
19
|
-
|
|
20
|
-
- `settings.jsdoc.ignorePrivate` - Disables all rules for the comment block
|
|
21
|
-
on which a `@private` tag (or `@access private`) occurs. Defaults to
|
|
22
|
-
`false`. Note: This has no effect with the rule `check-access` (whose
|
|
23
|
-
purpose is to check access modifiers) or `empty-tags` (which checks
|
|
24
|
-
`@private` itself).
|
|
25
|
-
- `settings.jsdoc.ignoreInternal` - Disables all rules for the comment block
|
|
26
|
-
on which a `@internal` tag occurs. Defaults to `false`. Note: This has no
|
|
27
|
-
effect with the rule `empty-tags` (which checks `@internal` itself).
|
|
28
|
-
|
|
29
|
-
<a name="user-content-settings-maxlines-and-minlines"></a>
|
|
30
|
-
<a name="settings-maxlines-and-minlines"></a>
|
|
31
|
-
### <code>maxLines</code> and <code>minLines</code>
|
|
32
|
-
|
|
33
|
-
One can use `minLines` and `maxLines` to indicate how many line breaks
|
|
34
|
-
(if any) will be checked to find a jsdoc comment block before the given
|
|
35
|
-
code block. These settings default to `0` and `1` respectively.
|
|
36
|
-
|
|
37
|
-
In conjunction with the `require-jsdoc` rule, these settings can
|
|
38
|
-
be enforced so as to report problems if a jsdoc block is not found within
|
|
39
|
-
the specified boundaries. The settings are also used in the fixer to determine
|
|
40
|
-
how many line breaks to add when a block is missing.
|
|
41
|
-
|
|
42
|
-
<a name="user-content-settings-mode"></a>
|
|
43
|
-
<a name="settings-mode"></a>
|
|
44
|
-
### Mode
|
|
45
|
-
|
|
46
|
-
- `settings.jsdoc.mode` - Set to `typescript`, `closure`, or `jsdoc` (the
|
|
47
|
-
default is now `typescript`).
|
|
48
|
-
Note that if you do not wish to use separate `.eslintrc.*` files for a
|
|
49
|
-
project containing both JavaScript and TypeScript, you can also use
|
|
50
|
-
[`overrides`](https://eslint.org/docs/user-guide/configuring). You may also
|
|
51
|
-
set to `"permissive"` to try to be as accommodating to any of the styles,
|
|
52
|
-
but this is not recommended. Currently is used for the following:
|
|
53
|
-
- `check-tag-names`: Determine valid tags and aliases
|
|
54
|
-
- `no-undefined-types`: Only check `@template` for types in "closure" and
|
|
55
|
-
"typescript" modes
|
|
56
|
-
- `check-syntax`: determines aspects that may be enforced
|
|
57
|
-
- `valid-types`: in non-Closure mode, `@extends`, `@package` and access tags
|
|
58
|
-
(e.g., `@private`) with a bracketed type are reported as are missing
|
|
59
|
-
names with `@typedef`
|
|
60
|
-
- For type/namepath-checking rules, determine which tags will be checked for
|
|
61
|
-
types/namepaths (Closure allows types on some tags which the others do not,
|
|
62
|
-
so these tags will additionally be checked in "closure" mode)
|
|
63
|
-
- For type-checking rules, impacts parsing of types (through
|
|
64
|
-
[jsdoc-type-pratt-parser](https://github.com/simonseyock/jsdoc-type-pratt-parser)
|
|
65
|
-
dependency)
|
|
66
|
-
- Check preferred tag names
|
|
67
|
-
- Disallows namepath on `@interface` for "closure" mode in `valid-types` (and
|
|
68
|
-
avoids checking in other rules)
|
|
69
|
-
|
|
70
|
-
Note that if you are using TypeScript syntax (and not just the TypeScript
|
|
71
|
-
flavor of JSDoc which `mode` set to "typescript" implies), you may wish
|
|
72
|
-
to use the `recommended-typescript` or `recommended-typescript-error`
|
|
73
|
-
config. This will add rules such as `jsdoc/no-types` to expect you have
|
|
74
|
-
no types expressed in JSDoc (since these can be added in TypeScript).
|
|
75
|
-
|
|
76
|
-
<a name="user-content-settings-alias-preference"></a>
|
|
77
|
-
<a name="settings-alias-preference"></a>
|
|
78
|
-
### Alias Preference
|
|
79
|
-
|
|
80
|
-
Use `settings.jsdoc.tagNamePreference` to configure a preferred alias name for
|
|
81
|
-
a JSDoc tag. The format of the configuration is:
|
|
82
|
-
`<primary tag name>: <preferred alias name>`, e.g.
|
|
83
|
-
|
|
84
|
-
```json
|
|
85
|
-
{
|
|
86
|
-
"rules": {},
|
|
87
|
-
"settings": {
|
|
88
|
-
"jsdoc": {
|
|
89
|
-
"tagNamePreference": {
|
|
90
|
-
"param": "arg",
|
|
91
|
-
"returns": "return"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Note: ESLint does not allow settings to have keys which conflict with
|
|
99
|
-
`Object.prototype` e.g. `'constructor'`. To work around this, you can use the
|
|
100
|
-
key `'tag constructor'`.
|
|
101
|
-
|
|
102
|
-
One may also use an object with a `message` and `replacement`.
|
|
103
|
-
|
|
104
|
-
The following will report the message
|
|
105
|
-
`@extends is to be used over @augments as it is more evocative of classes than @augments`
|
|
106
|
-
upon encountering `@augments`.
|
|
107
|
-
|
|
108
|
-
```json
|
|
109
|
-
{
|
|
110
|
-
"rules": {},
|
|
111
|
-
"settings": {
|
|
112
|
-
"jsdoc": {
|
|
113
|
-
"tagNamePreference": {
|
|
114
|
-
"augments": {
|
|
115
|
-
"message": "@extends is to be used over @augments as it is more evocative of classes than @augments",
|
|
116
|
-
"replacement": "extends"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
If one wishes to reject a normally valid tag, e.g., `@todo`, one may set the
|
|
125
|
-
tag to `false`:
|
|
126
|
-
|
|
127
|
-
```json
|
|
128
|
-
{
|
|
129
|
-
"rules": {},
|
|
130
|
-
"settings": {
|
|
131
|
-
"jsdoc": {
|
|
132
|
-
"tagNamePreference": {
|
|
133
|
-
"todo": false
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
A project wishing to ensure no blocks are left excluded from entering the
|
|
141
|
-
documentation, might wish to prevent the `@ignore` tag in the above manner.
|
|
142
|
-
|
|
143
|
-
Or one may set the targeted tag to an object with a custom `message`, but
|
|
144
|
-
without a `replacement` property:
|
|
145
|
-
|
|
146
|
-
```json
|
|
147
|
-
{
|
|
148
|
-
"rules": {},
|
|
149
|
-
"settings": {
|
|
150
|
-
"jsdoc": {
|
|
151
|
-
"tagNamePreference": {
|
|
152
|
-
"todo": {
|
|
153
|
-
"message": "We expect immediate perfection, so don't leave to-dos in your code."
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Note that the preferred tags indicated in the
|
|
162
|
-
`settings.jsdoc.tagNamePreference` map will be assumed to be defined by
|
|
163
|
-
`check-tag-names`.
|
|
164
|
-
|
|
165
|
-
See `check-tag-names` for how that fact can be used to set an alias to itself
|
|
166
|
-
to allow both the alias and the default (since aliases are otherwise not
|
|
167
|
-
permitted unless used in `tagNamePreference`).
|
|
168
|
-
|
|
169
|
-
<a name="user-content-settings-alias-preference-default-preferred-aliases"></a>
|
|
170
|
-
<a name="settings-alias-preference-default-preferred-aliases"></a>
|
|
171
|
-
#### Default Preferred Aliases
|
|
172
|
-
|
|
173
|
-
The defaults in `eslint-plugin-jsdoc` (for tags which offer
|
|
174
|
-
aliases) are as follows:
|
|
175
|
-
|
|
176
|
-
- `@abstract` (over `@virtual`)
|
|
177
|
-
- `@augments` (over `@extends`)
|
|
178
|
-
- `@class` (over `@constructor`)
|
|
179
|
-
- `@constant` (over `@const`)
|
|
180
|
-
- `@default` (over `@defaultvalue`)
|
|
181
|
-
- `@description` (over `@desc`)
|
|
182
|
-
- `@external` (over `@host`)
|
|
183
|
-
- `@file` (over `@fileoverview`, `@overview`)
|
|
184
|
-
- `@fires` (over `@emits`)
|
|
185
|
-
- `@function` (over `@func`, `@method`)
|
|
186
|
-
- `@member` (over `@var`)
|
|
187
|
-
- `@param` (over `@arg`, `@argument`)
|
|
188
|
-
- `@property` (over `@prop`)
|
|
189
|
-
- `@returns` (over `@return`)
|
|
190
|
-
- `@throws` (over `@exception`)
|
|
191
|
-
- `@yields` (over `@yield`)
|
|
192
|
-
|
|
193
|
-
This setting is utilized by the the rule for tag name checking
|
|
194
|
-
(`check-tag-names`) as well as in the `@param` and `@require` rules:
|
|
195
|
-
|
|
196
|
-
- `check-param-names`
|
|
197
|
-
- `check-tag-names`
|
|
198
|
-
- `require-hyphen-before-param-description`
|
|
199
|
-
- `require-description`
|
|
200
|
-
- `require-param`
|
|
201
|
-
- `require-param-description`
|
|
202
|
-
- `require-param-name`
|
|
203
|
-
- `require-param-type`
|
|
204
|
-
- `require-returns`
|
|
205
|
-
- `require-returns-check`
|
|
206
|
-
- `require-returns-description`
|
|
207
|
-
- `require-returns-type`
|
|
208
|
-
|
|
209
|
-
<a name="user-content-settings-override-augments-extends-implements-ignore-without-accompanying-param-description-example-returns-throws-yields"></a>
|
|
210
|
-
<a name="settings-override-augments-extends-implements-ignore-without-accompanying-param-description-example-returns-throws-yields"></a>
|
|
211
|
-
### <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>
|
|
212
|
-
|
|
213
|
-
The following settings allows the element(s) they reference to be omitted
|
|
214
|
-
on the JSDoc comment block of the function or that of its parent class
|
|
215
|
-
for any of the "require" rules (i.e., `require-param`, `require-description`,
|
|
216
|
-
`require-example`, `require-returns`, `require-throws`, `require-yields`).
|
|
217
|
-
|
|
218
|
-
* `settings.jsdoc.ignoreReplacesDocs` (`@ignore`) - Defaults to `true`
|
|
219
|
-
* `settings.jsdoc.overrideReplacesDocs` (`@override`) - Defaults to `true`
|
|
220
|
-
* `settings.jsdoc.augmentsExtendsReplacesDocs` (`@augments` or its alias
|
|
221
|
-
`@extends`) - Defaults to `false`.
|
|
222
|
-
* `settings.jsdoc.implementsReplacesDocs` (`@implements`) - Defaults to `false`
|
|
223
|
-
|
|
224
|
-
The format of the configuration is as follows:
|
|
225
|
-
|
|
226
|
-
```json
|
|
227
|
-
{
|
|
228
|
-
"rules": {},
|
|
229
|
-
"settings": {
|
|
230
|
-
"jsdoc": {
|
|
231
|
-
"ignoreReplacesDocs": true,
|
|
232
|
-
"overrideReplacesDocs": true,
|
|
233
|
-
"augmentsExtendsReplacesDocs": true,
|
|
234
|
-
"implementsReplacesDocs": true
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
<a name="user-content-settings-settings-to-configure-check-types-and-no-undefined-types"></a>
|
|
241
|
-
<a name="settings-settings-to-configure-check-types-and-no-undefined-types"></a>
|
|
242
|
-
### Settings to Configure <code>check-types</code> and <code>no-undefined-types</code>
|
|
243
|
-
|
|
244
|
-
- `settings.jsdoc.preferredTypes` An option map to indicate preferred
|
|
245
|
-
or forbidden types (if default types are indicated here, these will
|
|
246
|
-
have precedence over the default recommendations for `check-types`).
|
|
247
|
-
The keys of this map are the types to be replaced (or forbidden).
|
|
248
|
-
These keys may include:
|
|
249
|
-
1. The "ANY" type, `*`
|
|
250
|
-
1. The pseudo-type `[]` which we use to denote the parent (array)
|
|
251
|
-
types used in the syntax `string[]`, `number[]`, etc.
|
|
252
|
-
1. The pseudo-type `.<>` (or `.`) to represent the format `Array.<value>`
|
|
253
|
-
or `Object.<key, value>`
|
|
254
|
-
1. The pseudo-type `<>` to represent the format `Array<value>` or
|
|
255
|
-
`Object<key, value>`
|
|
256
|
-
1. A plain string type, e.g., `MyType`
|
|
257
|
-
1. A plain string type followed by one of the above pseudo-types (except
|
|
258
|
-
for `[]` which is always assumed to be an `Array`), e.g., `Array.`, or
|
|
259
|
-
`SpecialObject<>`.
|
|
260
|
-
|
|
261
|
-
If a bare pseudo-type is used, it will match all parent types of that form.
|
|
262
|
-
If a pseudo-type prefixed with a type name is used, it will only match
|
|
263
|
-
parent types of that form and type name.
|
|
264
|
-
|
|
265
|
-
The values can be:
|
|
266
|
-
- `false` to forbid the type
|
|
267
|
-
- a string to indicate the type that should be preferred in its place
|
|
268
|
-
(and which `fix` mode can replace); this can be one of the formats
|
|
269
|
-
of the keys described above.
|
|
270
|
-
- Note that the format will not be changed unless you use a pseudo-type
|
|
271
|
-
in the replacement. (For example, `'Array.<>': 'MyArray'` will change
|
|
272
|
-
`Array.<string>` to `MyArray.<string>`, preserving the dot. To get rid
|
|
273
|
-
of the dot, you must use the pseudo-type with `<>`, i.e.,
|
|
274
|
-
`'Array.<>': 'MyArray<>'`, which will change `Array.<string>` to
|
|
275
|
-
`MyArray<string>`).
|
|
276
|
-
- If you use a _bare_ pseudo-type in the replacement (e.g.,
|
|
277
|
-
`'MyArray.<>': '<>'`), the type will be converted to the format
|
|
278
|
-
of the pseudo-type without changing the type name. For example,
|
|
279
|
-
`MyArray.<string>` will become `MyArray<string>` but `Array.<string>`
|
|
280
|
-
will not be modified.
|
|
281
|
-
- an object with:
|
|
282
|
-
- the key `message` to provide a specific error message
|
|
283
|
-
when encountering the discouraged type.
|
|
284
|
-
- The message string will have the substrings with special meaning,
|
|
285
|
-
`{{tagName}}` and `{{tagValue}}`, replaced with their
|
|
286
|
-
corresponding value.
|
|
287
|
-
- an optional key `replacement` with either of the following values:
|
|
288
|
-
- a string type to be preferred in its place (and which `fix` mode
|
|
289
|
-
can replace)
|
|
290
|
-
- `false` (for forbidding the type)
|
|
291
|
-
- an optional key `skipRootChecking` (for `check-types`) to allow for this
|
|
292
|
-
type in the context of a root (i.e., a parent object of some child type)
|
|
293
|
-
|
|
294
|
-
Note that the preferred types indicated as targets in
|
|
295
|
-
`settings.jsdoc.preferredTypes` map will be assumed to be defined by
|
|
296
|
-
`no-undefined-types`.
|
|
297
|
-
|
|
298
|
-
See the option of `check-types`, `unifyParentAndChildTypeChecks`, for
|
|
299
|
-
how the keys of `preferredTypes` may have `<>` or `.<>` (or just `.`)
|
|
300
|
-
appended and its bearing on whether types are checked as parents/children
|
|
301
|
-
only (e.g., to match `Array` if the type is `Array` vs. `Array.<string>`).
|
|
302
|
-
|
|
303
|
-
Note that if a value is present both as a key and as a value, neither the
|
|
304
|
-
key nor the value will be reported. Thus in `check-types`, this fact can
|
|
305
|
-
be used to allow both `object` and `Object` if one has a `preferredTypes`
|
|
306
|
-
key `object: 'Object'` and `Object: 'object'`.
|
|
307
|
-
|
|
308
|
-
<a name="user-content-settings-structuredtags"></a>
|
|
309
|
-
<a name="settings-structuredtags"></a>
|
|
310
|
-
### <code>structuredTags</code>
|
|
311
|
-
|
|
312
|
-
An object indicating tags whose types and names/namepaths (whether defining or
|
|
313
|
-
referencing namepaths) will be checked, subject to configuration. If the tags
|
|
314
|
-
have predefined behavior or `allowEmptyNamepaths` behavior, this option will
|
|
315
|
-
override that behavior for any specified tags, though this option can also be
|
|
316
|
-
used for tags without predefined behavior. Its keys are tag names and its
|
|
317
|
-
values are objects with the following optional properties:
|
|
318
|
-
- `name` - String set to one of the following:
|
|
319
|
-
- `"text"` - When a name is present, plain text will be allowed in the
|
|
320
|
-
name position (non-whitespace immediately after the tag and whitespace),
|
|
321
|
-
e.g., in `@throws This is an error`, "This" would normally be the name,
|
|
322
|
-
but "text" allows non-name text here also. This is the default.
|
|
323
|
-
- `"namepath-defining"` - As with `namepath-referencing`, but also
|
|
324
|
-
indicates the tag adds a namepath to definitions, e.g., to prevent
|
|
325
|
-
`no-undefined-types` from reporting references to that namepath.
|
|
326
|
-
- `"namepath-referencing"` - This will cause any name position to be
|
|
327
|
-
checked to ensure it is a valid namepath. You might use this to ensure
|
|
328
|
-
that tags which normally allow free text, e.g., `@see` will instead
|
|
329
|
-
require a namepath.
|
|
330
|
-
- `"namepath-or-url-referencing"` - For inline tags which may point to
|
|
331
|
-
a namepath or URL.
|
|
332
|
-
- `false` - This will disallow any text in the name position.
|
|
333
|
-
- `type`:
|
|
334
|
-
- `true` - Allows valid types within brackets. This is the default.
|
|
335
|
-
- `false` - Explicitly disallows any brackets or bracketed type. You
|
|
336
|
-
might use this with `@throws` to suggest that only free form text
|
|
337
|
-
is being input or with `@augments` (for jsdoc mode) to disallow
|
|
338
|
-
Closure-style bracketed usage along with a required namepath.
|
|
339
|
-
- (An array of strings) - A list of permissible types.
|
|
340
|
-
- `required` - Array of one of the following (defaults to an empty array,
|
|
341
|
-
meaning none are required):
|
|
342
|
-
- One or both of the following strings (if both are included, then both
|
|
343
|
-
are required):
|
|
344
|
-
- `"name"` - Indicates that a name position is required (not just that
|
|
345
|
-
if present, it is a valid namepath). You might use this with `see`
|
|
346
|
-
to insist that a value (or namepath, depending on the `name` value)
|
|
347
|
-
is always present.
|
|
348
|
-
- `"type"` - Indicates that the type position (within curly brackets)
|
|
349
|
-
is required (not just that if present, it is a valid type). You
|
|
350
|
-
might use this with `@throws` or `@typedef` which might otherwise
|
|
351
|
-
normally have their types optional. See the type groups 3-5 above.
|
|
352
|
-
- `"typeOrNameRequired"` - Must have either type (e.g., `@throws {aType}`) or
|
|
353
|
-
name (`@throws Some text`); does not require that both exist but
|
|
354
|
-
disallows just an empty tag.
|
|
355
|
-
|
|
356
|
-
<a name="user-content-settings-contexts"></a>
|
|
357
|
-
<a name="settings-contexts"></a>
|
|
358
|
-
### <code>contexts</code>
|
|
359
|
-
|
|
360
|
-
`settings.jsdoc.contexts` can be used as the default for any rules
|
|
361
|
-
with a `contexts` property option. See the "AST and Selectors" section
|
|
362
|
-
for more on this format.
|
package/tsconfig.json
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"lib": ["es2022"],
|
|
4
|
-
"moduleResolution": "node",
|
|
5
|
-
"module": "NodeNext",
|
|
6
|
-
"allowJs": true,
|
|
7
|
-
"checkJs": true,
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"declaration": true,
|
|
10
|
-
"declarationMap": true,
|
|
11
|
-
"allowSyntheticDefaultImports": true,
|
|
12
|
-
"strict": true,
|
|
13
|
-
"target": "es2017",
|
|
14
|
-
"outDir": "dist"
|
|
15
|
-
},
|
|
16
|
-
"include": [
|
|
17
|
-
"src/**/*.js",
|
|
18
|
-
"test/**/*.js",
|
|
19
|
-
"src/bin/gitdown.d.ts"
|
|
20
|
-
],
|
|
21
|
-
"exclude": ["node_modules"]
|
|
22
|
-
}
|