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
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
<a name="user-content-check-indentation"></a>
|
|
2
|
-
<a name="check-indentation"></a>
|
|
3
|
-
# <code>check-indentation</code>
|
|
4
|
-
|
|
5
|
-
* [Options](#user-content-check-indentation-options)
|
|
6
|
-
* [`excludeTags`](#user-content-check-indentation-options-excludetags)
|
|
7
|
-
* [Context and settings](#user-content-check-indentation-context-and-settings)
|
|
8
|
-
* [Failing examples](#user-content-check-indentation-failing-examples)
|
|
9
|
-
* [Passing examples](#user-content-check-indentation-passing-examples)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Reports invalid padding inside JSDoc blocks.
|
|
13
|
-
|
|
14
|
-
Ignores parts enclosed in Markdown "code block"'s. For example,
|
|
15
|
-
the following description is not reported:
|
|
16
|
-
|
|
17
|
-
```js
|
|
18
|
-
/**
|
|
19
|
-
* Some description:
|
|
20
|
-
* ```html
|
|
21
|
-
* <section>
|
|
22
|
-
* <title>test</title>
|
|
23
|
-
* </section>
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
<a name="user-content-check-indentation-options"></a>
|
|
29
|
-
<a name="check-indentation-options"></a>
|
|
30
|
-
## Options
|
|
31
|
-
|
|
32
|
-
This rule has an object option.
|
|
33
|
-
|
|
34
|
-
<a name="user-content-check-indentation-options-excludetags"></a>
|
|
35
|
-
<a name="check-indentation-options-excludetags"></a>
|
|
36
|
-
### <code>excludeTags</code>
|
|
37
|
-
|
|
38
|
-
Array of tags (e.g., `['example', 'description']`) whose content will be
|
|
39
|
-
"hidden" from the `check-indentation` rule. Defaults to `['example']`.
|
|
40
|
-
|
|
41
|
-
By default, the whole JSDoc block will be checked for invalid padding.
|
|
42
|
-
That would include `@example` blocks too, which can get in the way
|
|
43
|
-
of adding full, readable examples of code without ending up with multiple
|
|
44
|
-
linting issues.
|
|
45
|
-
|
|
46
|
-
When disabled (by passing `excludeTags: []` option), the following code *will*
|
|
47
|
-
report a padding issue:
|
|
48
|
-
|
|
49
|
-
```js
|
|
50
|
-
/**
|
|
51
|
-
* @example
|
|
52
|
-
* anArray.filter((a) => {
|
|
53
|
-
* return a.b;
|
|
54
|
-
* });
|
|
55
|
-
*/
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
<a name="user-content-check-indentation-context-and-settings"></a>
|
|
59
|
-
<a name="check-indentation-context-and-settings"></a>
|
|
60
|
-
## Context and settings
|
|
61
|
-
|
|
62
|
-
|||
|
|
63
|
-
|---|---|
|
|
64
|
-
|Context|everywhere|
|
|
65
|
-
|Tags|N/A|
|
|
66
|
-
|Recommended|false|
|
|
67
|
-
|Options|`excludeTags`|
|
|
68
|
-
|
|
69
|
-
<a name="user-content-check-indentation-failing-examples"></a>
|
|
70
|
-
<a name="check-indentation-failing-examples"></a>
|
|
71
|
-
## Failing examples
|
|
72
|
-
|
|
73
|
-
The following patterns are considered problems:
|
|
74
|
-
|
|
75
|
-
````js
|
|
76
|
-
/** foo */
|
|
77
|
-
function quux () {
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
// Message: There must be no indentation.
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* foo
|
|
84
|
-
*
|
|
85
|
-
* @param bar
|
|
86
|
-
* baz
|
|
87
|
-
*/
|
|
88
|
-
function quux () {
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
// Message: There must be no indentation.
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Foo
|
|
95
|
-
* bar
|
|
96
|
-
*/
|
|
97
|
-
class Moo {}
|
|
98
|
-
// Message: There must be no indentation.
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* foo
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* anArray.filter((a) => {
|
|
105
|
-
* return a.b;
|
|
106
|
-
* });
|
|
107
|
-
*/
|
|
108
|
-
function quux () {
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
// "jsdoc/check-indentation": ["error"|"warn", {"excludeTags":[]}]
|
|
112
|
-
// Message: There must be no indentation.
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* foo
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* aaaa
|
|
119
|
-
* @returns
|
|
120
|
-
* eeee
|
|
121
|
-
*/
|
|
122
|
-
function quux () {
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
// Message: There must be no indentation.
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* foo
|
|
129
|
-
* ```html
|
|
130
|
-
* <section>
|
|
131
|
-
* <title>test</title>
|
|
132
|
-
* </section>
|
|
133
|
-
* ```
|
|
134
|
-
* @returns
|
|
135
|
-
* eeee
|
|
136
|
-
*/
|
|
137
|
-
function quux () {
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
// Message: There must be no indentation.
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* foo
|
|
144
|
-
* ``` aaaa```
|
|
145
|
-
* @returns
|
|
146
|
-
* eeee
|
|
147
|
-
*/
|
|
148
|
-
function quux () {
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
// Message: There must be no indentation.
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @example <caption>
|
|
155
|
-
* Here is a long
|
|
156
|
-
* indented summary of this
|
|
157
|
-
* example
|
|
158
|
-
* </caption>
|
|
159
|
-
* ```js
|
|
160
|
-
* function hi () {
|
|
161
|
-
* alert('Hello');
|
|
162
|
-
* }
|
|
163
|
-
* ```
|
|
164
|
-
*/
|
|
165
|
-
// "jsdoc/check-indentation": ["error"|"warn", {"excludeTags":[]}]
|
|
166
|
-
// Message: There must be no indentation.
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* @example <caption>
|
|
170
|
-
* Here is a long
|
|
171
|
-
* summary of this
|
|
172
|
-
* example
|
|
173
|
-
* </caption>
|
|
174
|
-
* // Code is not wrapped into fenced code block
|
|
175
|
-
* function hi () {
|
|
176
|
-
* alert('Hello');
|
|
177
|
-
* }
|
|
178
|
-
*/
|
|
179
|
-
// "jsdoc/check-indentation": ["error"|"warn", {"excludeTags":[]}]
|
|
180
|
-
// Message: There must be no indentation.
|
|
181
|
-
````
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
<a name="user-content-check-indentation-passing-examples"></a>
|
|
186
|
-
<a name="check-indentation-passing-examples"></a>
|
|
187
|
-
## Passing examples
|
|
188
|
-
|
|
189
|
-
The following patterns are not considered problems:
|
|
190
|
-
|
|
191
|
-
````js
|
|
192
|
-
/**
|
|
193
|
-
* foo
|
|
194
|
-
*
|
|
195
|
-
* @param bar
|
|
196
|
-
* baz
|
|
197
|
-
*/
|
|
198
|
-
function quux () {
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/*** foo */
|
|
203
|
-
function quux () {
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* foo
|
|
209
|
-
*
|
|
210
|
-
* @example
|
|
211
|
-
* anArray.filter((a) => {
|
|
212
|
-
* return a.b;
|
|
213
|
-
* });
|
|
214
|
-
*/
|
|
215
|
-
function quux () {
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* foo
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* anArray.filter((a) => {
|
|
224
|
-
* return a.b;
|
|
225
|
-
* });
|
|
226
|
-
* @returns
|
|
227
|
-
* eeee
|
|
228
|
-
*/
|
|
229
|
-
function quux () {
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
// "jsdoc/check-indentation": ["error"|"warn", {"excludeTags":["example","returns"]}]
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* foo
|
|
236
|
-
* ```html
|
|
237
|
-
* <section>
|
|
238
|
-
* <title>test</title>
|
|
239
|
-
* </section>
|
|
240
|
-
* ```
|
|
241
|
-
* @returns eeee
|
|
242
|
-
*/
|
|
243
|
-
function quux () {
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* foo
|
|
249
|
-
* ``` aaaa```
|
|
250
|
-
* @returns eeee
|
|
251
|
-
*/
|
|
252
|
-
function quux () {
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* @example <caption>
|
|
258
|
-
* Here is a long
|
|
259
|
-
* summary of this
|
|
260
|
-
* example
|
|
261
|
-
* </caption>
|
|
262
|
-
* ```js
|
|
263
|
-
* function hi () {
|
|
264
|
-
* alert('Hello');
|
|
265
|
-
* }
|
|
266
|
-
* ```
|
|
267
|
-
*/
|
|
268
|
-
// "jsdoc/check-indentation": ["error"|"warn", {"excludeTags":[]}]
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* @example
|
|
272
|
-
* ```
|
|
273
|
-
* @MyDecorator({
|
|
274
|
-
* myOptions: 42
|
|
275
|
-
* })
|
|
276
|
-
* export class MyClass {}
|
|
277
|
-
* ```
|
|
278
|
-
*/
|
|
279
|
-
function MyDecorator(options: { myOptions: number }) {
|
|
280
|
-
return (Base: Function) => {};
|
|
281
|
-
}
|
|
282
|
-
// "jsdoc/check-indentation": ["error"|"warn", {"excludeTags":["example","MyDecorator"]}]
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* @example ```
|
|
286
|
-
* @MyDecorator({
|
|
287
|
-
* myOptions: 42
|
|
288
|
-
* })
|
|
289
|
-
* export class MyClass {}
|
|
290
|
-
* ```
|
|
291
|
-
*/
|
|
292
|
-
function MyDecorator(options: { myOptions: number }) {
|
|
293
|
-
return (Base: Function) => {};
|
|
294
|
-
}
|
|
295
|
-
````
|
|
296
|
-
|