eslint-plugin-jsdoc 57.1.0 → 57.1.1
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/dist/generateRuleTypes.cjs +1 -0
- package/dist/generateRuleTypes.cjs.map +1 -1
- package/dist/rules.d.ts +49 -0
- package/package.json +1 -1
- package/src/rules.d.ts +49 -0
|
@@ -7,6 +7,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
7
7
|
let str = 'export interface Rules {\n';
|
|
8
8
|
for (const [ruleName, rule] of Object.entries(_index.default.rules)) {
|
|
9
9
|
if (rule.meta?.schema?.[0]) {
|
|
10
|
+
str += ` /** ${rule.meta.docs.description} */\n`;
|
|
10
11
|
str += ` "jsdoc/${ruleName}": `;
|
|
11
12
|
const ts = await (0, _jsonSchemaToTypescript.compile)({
|
|
12
13
|
items: rule.meta.schema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateRuleTypes.cjs","names":["_index","_interopRequireDefault","require","_jsonSchemaToTypescript","_promises","e","__esModule","default","str","ruleName","rule","Object","entries","index","rules","meta","schema","ts","compile","items","type","bannerComment","replace","replaceAll","trimEnd","writeFile","__dirname","console","log"],"sources":["../src/bin/generateRuleTypes.js"],"sourcesContent":["import index from '../index.js';\nimport {\n compile,\n} from 'json-schema-to-typescript';\nimport {\n writeFile,\n} from 'node:fs/promises';\n\nlet str = 'export interface Rules {\\n';\n\nfor (const [\n ruleName,\n rule,\n] of Object.entries(index.rules)) {\n if (rule.meta?.schema?.[0]) {\n str += ` \"jsdoc/${ruleName}\": `;\n const ts = await compile({\n items: rule.meta.schema,\n type: 'array',\n }, 'Test', {\n bannerComment: '',\n });\n\n str += ts\n .replace(/^export type Test = ?/v, '')\n .replace(/^export interface Test /v, '')\n .replaceAll('\\n', '\\n ').trimEnd().replace(/;$/v, '') +\n ';\\n\\n';\n }\n}\n\nstr = str.replace(/\\n$/v, '') + '}\\n';\n\nawait writeFile(import.meta.dirname + '/../rules.d.ts', str);\n\n// eslint-disable-next-line no-console -- Todo\nconsole.log('str', str);\n"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AAE0B,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1B,IAAIG,GAAG,GAAG,4BAA4B;AAEtC,KAAK,MAAM,CACTC,QAAQ,EACRC,IAAI,CACL,IAAIC,MAAM,CAACC,OAAO,CAACC,cAAK,CAACC,KAAK,CAAC,EAAE;EAChC,IAAIJ,IAAI,CAACK,IAAI,EAAEC,MAAM,GAAG,CAAC,CAAC,EAAE;IAC1BR,GAAG,IAAI,YAAYC,QAAQ,KAAK;IAChC,
|
|
1
|
+
{"version":3,"file":"generateRuleTypes.cjs","names":["_index","_interopRequireDefault","require","_jsonSchemaToTypescript","_promises","e","__esModule","default","str","ruleName","rule","Object","entries","index","rules","meta","schema","docs","description","ts","compile","items","type","bannerComment","replace","replaceAll","trimEnd","writeFile","__dirname","console","log"],"sources":["../src/bin/generateRuleTypes.js"],"sourcesContent":["import index from '../index.js';\nimport {\n compile,\n} from 'json-schema-to-typescript';\nimport {\n writeFile,\n} from 'node:fs/promises';\n\nlet str = 'export interface Rules {\\n';\n\nfor (const [\n ruleName,\n rule,\n] of Object.entries(index.rules)) {\n if (rule.meta?.schema?.[0]) {\n str += ` /** ${rule.meta.docs.description} */\\n`;\n str += ` \"jsdoc/${ruleName}\": `;\n const ts = await compile({\n items: rule.meta.schema,\n type: 'array',\n }, 'Test', {\n bannerComment: '',\n });\n\n str += ts\n .replace(/^export type Test = ?/v, '')\n .replace(/^export interface Test /v, '')\n .replaceAll('\\n', '\\n ').trimEnd().replace(/;$/v, '') +\n ';\\n\\n';\n }\n}\n\nstr = str.replace(/\\n$/v, '') + '}\\n';\n\nawait writeFile(import.meta.dirname + '/../rules.d.ts', str);\n\n// eslint-disable-next-line no-console -- Todo\nconsole.log('str', str);\n"],"mappings":";;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AAE0B,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE1B,IAAIG,GAAG,GAAG,4BAA4B;AAEtC,KAAK,MAAM,CACTC,QAAQ,EACRC,IAAI,CACL,IAAIC,MAAM,CAACC,OAAO,CAACC,cAAK,CAACC,KAAK,CAAC,EAAE;EAChC,IAAIJ,IAAI,CAACK,IAAI,EAAEC,MAAM,GAAG,CAAC,CAAC,EAAE;IAC1BR,GAAG,IAAI,SAASE,IAAI,CAACK,IAAI,CAACE,IAAI,CAACC,WAAW,OAAO;IACjDV,GAAG,IAAI,YAAYC,QAAQ,KAAK;IAChC,MAAMU,EAAE,GAAG,MAAM,IAAAC,+BAAO,EAAC;MACvBC,KAAK,EAAEX,IAAI,CAACK,IAAI,CAACC,MAAM;MACvBM,IAAI,EAAE;IACR,CAAC,EAAE,MAAM,EAAE;MACTC,aAAa,EAAE;IACjB,CAAC,CAAC;IAEFf,GAAG,IAAIW,EAAE,CACNK,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC,CACrCA,OAAO,CAAC,0BAA0B,EAAE,EAAE,CAAC,CACvCC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAACC,OAAO,CAAC,CAAC,CAACF,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,GACpD,OAAO;EACb;AACF;AAEAhB,GAAG,GAAGA,GAAG,CAACgB,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,KAAK;AAErC,MAAM,IAAAG,mBAAS,EAACC,SAAA,GAAsB,gBAAgB,EAAEpB,GAAG,CAAC;;AAE5D;AACAqB,OAAO,CAACC,GAAG,CAAC,KAAK,EAAEtB,GAAG,CAAC","ignoreList":[]}
|
package/dist/rules.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export interface Rules {
|
|
2
|
+
/** Reports invalid alignment of JSDoc block asterisks. */
|
|
2
3
|
"jsdoc/check-alignment":
|
|
3
4
|
| []
|
|
4
5
|
| [
|
|
@@ -7,6 +8,7 @@ export interface Rules {
|
|
|
7
8
|
}
|
|
8
9
|
];
|
|
9
10
|
|
|
11
|
+
/** Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules. */
|
|
10
12
|
"jsdoc/check-examples":
|
|
11
13
|
| []
|
|
12
14
|
| [
|
|
@@ -33,6 +35,7 @@ export interface Rules {
|
|
|
33
35
|
}
|
|
34
36
|
];
|
|
35
37
|
|
|
38
|
+
/** Reports invalid padding inside JSDoc blocks. */
|
|
36
39
|
"jsdoc/check-indentation":
|
|
37
40
|
| []
|
|
38
41
|
| [
|
|
@@ -41,6 +44,7 @@ export interface Rules {
|
|
|
41
44
|
}
|
|
42
45
|
];
|
|
43
46
|
|
|
47
|
+
/** Reports invalid alignment of JSDoc block lines. */
|
|
44
48
|
"jsdoc/check-line-alignment":
|
|
45
49
|
| []
|
|
46
50
|
| ["always" | "never" | "any"]
|
|
@@ -61,6 +65,7 @@ export interface Rules {
|
|
|
61
65
|
}
|
|
62
66
|
];
|
|
63
67
|
|
|
68
|
+
/** Ensures that parameter names in JSDoc match those in the function declaration. */
|
|
64
69
|
"jsdoc/check-param-names":
|
|
65
70
|
| []
|
|
66
71
|
| [
|
|
@@ -76,6 +81,7 @@ export interface Rules {
|
|
|
76
81
|
}
|
|
77
82
|
];
|
|
78
83
|
|
|
84
|
+
/** Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots. */
|
|
79
85
|
"jsdoc/check-property-names":
|
|
80
86
|
| []
|
|
81
87
|
| [
|
|
@@ -84,6 +90,7 @@ export interface Rules {
|
|
|
84
90
|
}
|
|
85
91
|
];
|
|
86
92
|
|
|
93
|
+
/** Reports invalid block tag names. */
|
|
87
94
|
"jsdoc/check-tag-names":
|
|
88
95
|
| []
|
|
89
96
|
| [
|
|
@@ -95,6 +102,7 @@ export interface Rules {
|
|
|
95
102
|
}
|
|
96
103
|
];
|
|
97
104
|
|
|
105
|
+
/** Reports invalid types. */
|
|
98
106
|
"jsdoc/check-types":
|
|
99
107
|
| []
|
|
100
108
|
| [
|
|
@@ -108,6 +116,7 @@ export interface Rules {
|
|
|
108
116
|
}
|
|
109
117
|
];
|
|
110
118
|
|
|
119
|
+
/** This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`. */
|
|
111
120
|
"jsdoc/check-values":
|
|
112
121
|
| []
|
|
113
122
|
| [
|
|
@@ -119,6 +128,7 @@ export interface Rules {
|
|
|
119
128
|
}
|
|
120
129
|
];
|
|
121
130
|
|
|
131
|
+
/** Converts non-JSDoc comments preceding or following nodes into JSDoc ones */
|
|
122
132
|
"jsdoc/convert-to-jsdoc-comments":
|
|
123
133
|
| []
|
|
124
134
|
| [
|
|
@@ -151,6 +161,7 @@ export interface Rules {
|
|
|
151
161
|
}
|
|
152
162
|
];
|
|
153
163
|
|
|
164
|
+
/** Expects specific tags to be empty of any content. */
|
|
154
165
|
"jsdoc/empty-tags":
|
|
155
166
|
| []
|
|
156
167
|
| [
|
|
@@ -159,6 +170,7 @@ export interface Rules {
|
|
|
159
170
|
}
|
|
160
171
|
];
|
|
161
172
|
|
|
173
|
+
/** Reports an issue with any non-constructor function using `@implements`. */
|
|
162
174
|
"jsdoc/implements-on-classes":
|
|
163
175
|
| []
|
|
164
176
|
| [
|
|
@@ -173,6 +185,7 @@ export interface Rules {
|
|
|
173
185
|
}
|
|
174
186
|
];
|
|
175
187
|
|
|
188
|
+
/** This rule reports doc comments that only restate their attached name. */
|
|
176
189
|
"jsdoc/informative-docs":
|
|
177
190
|
| []
|
|
178
191
|
| [
|
|
@@ -189,6 +202,7 @@ export interface Rules {
|
|
|
189
202
|
}
|
|
190
203
|
];
|
|
191
204
|
|
|
205
|
+
/** Enforces minimum number of newlines before JSDoc comment blocks */
|
|
192
206
|
"jsdoc/lines-before-block":
|
|
193
207
|
| []
|
|
194
208
|
| [
|
|
@@ -201,6 +215,7 @@ export interface Rules {
|
|
|
201
215
|
}
|
|
202
216
|
];
|
|
203
217
|
|
|
218
|
+
/** Enforces a regular expression pattern on descriptions. */
|
|
204
219
|
"jsdoc/match-description":
|
|
205
220
|
| []
|
|
206
221
|
| [
|
|
@@ -238,6 +253,7 @@ export interface Rules {
|
|
|
238
253
|
}
|
|
239
254
|
];
|
|
240
255
|
|
|
256
|
+
/** Reports the name portion of a JSDoc tag if matching or not matching a given regular expression. */
|
|
241
257
|
"jsdoc/match-name":
|
|
242
258
|
| []
|
|
243
259
|
| [
|
|
@@ -254,6 +270,7 @@ export interface Rules {
|
|
|
254
270
|
}
|
|
255
271
|
];
|
|
256
272
|
|
|
273
|
+
/** Controls how and whether jsdoc blocks can be expressed as single or multiple line blocks. */
|
|
257
274
|
"jsdoc/multiline-blocks":
|
|
258
275
|
| []
|
|
259
276
|
| [
|
|
@@ -270,6 +287,7 @@ export interface Rules {
|
|
|
270
287
|
}
|
|
271
288
|
];
|
|
272
289
|
|
|
290
|
+
/** This rule checks for multi-line-style comments which fail to meet the criteria of a jsdoc block. */
|
|
273
291
|
"jsdoc/no-bad-blocks":
|
|
274
292
|
| []
|
|
275
293
|
| [
|
|
@@ -279,6 +297,7 @@ export interface Rules {
|
|
|
279
297
|
}
|
|
280
298
|
];
|
|
281
299
|
|
|
300
|
+
/** Removes empty blocks with nothing but possibly line breaks */
|
|
282
301
|
"jsdoc/no-blank-blocks":
|
|
283
302
|
| []
|
|
284
303
|
| [
|
|
@@ -287,6 +306,7 @@ export interface Rules {
|
|
|
287
306
|
}
|
|
288
307
|
];
|
|
289
308
|
|
|
309
|
+
/** This rule reports defaults being used on the relevant portion of `@param` or `@default`. */
|
|
290
310
|
"jsdoc/no-defaults":
|
|
291
311
|
| []
|
|
292
312
|
| [
|
|
@@ -302,6 +322,7 @@ export interface Rules {
|
|
|
302
322
|
}
|
|
303
323
|
];
|
|
304
324
|
|
|
325
|
+
/** Reports when certain comment structures are always expected. */
|
|
305
326
|
"jsdoc/no-missing-syntax":
|
|
306
327
|
| []
|
|
307
328
|
| [
|
|
@@ -318,6 +339,7 @@ export interface Rules {
|
|
|
318
339
|
}
|
|
319
340
|
];
|
|
320
341
|
|
|
342
|
+
/** Prevents use of multiple asterisks at the beginning of lines. */
|
|
321
343
|
"jsdoc/no-multi-asterisks":
|
|
322
344
|
| []
|
|
323
345
|
| [
|
|
@@ -328,6 +350,7 @@ export interface Rules {
|
|
|
328
350
|
}
|
|
329
351
|
];
|
|
330
352
|
|
|
353
|
+
/** Reports when certain comment structures are present. */
|
|
331
354
|
"jsdoc/no-restricted-syntax":
|
|
332
355
|
| []
|
|
333
356
|
| [
|
|
@@ -343,6 +366,7 @@ export interface Rules {
|
|
|
343
366
|
}
|
|
344
367
|
];
|
|
345
368
|
|
|
369
|
+
/** This rule reports types being used on `@param` or `@returns`. */
|
|
346
370
|
"jsdoc/no-types":
|
|
347
371
|
| []
|
|
348
372
|
| [
|
|
@@ -357,6 +381,7 @@ export interface Rules {
|
|
|
357
381
|
}
|
|
358
382
|
];
|
|
359
383
|
|
|
384
|
+
/** Checks that types in jsdoc comments are defined. */
|
|
360
385
|
"jsdoc/no-undefined-types":
|
|
361
386
|
| []
|
|
362
387
|
| [
|
|
@@ -367,6 +392,7 @@ export interface Rules {
|
|
|
367
392
|
}
|
|
368
393
|
];
|
|
369
394
|
|
|
395
|
+
/** Requires that each JSDoc line starts with an `*`. */
|
|
370
396
|
"jsdoc/require-asterisk-prefix":
|
|
371
397
|
| []
|
|
372
398
|
| ["always" | "never" | "any"]
|
|
@@ -381,6 +407,7 @@ export interface Rules {
|
|
|
381
407
|
}
|
|
382
408
|
];
|
|
383
409
|
|
|
410
|
+
/** Requires that all functions have a description. */
|
|
384
411
|
"jsdoc/require-description":
|
|
385
412
|
| []
|
|
386
413
|
| [
|
|
@@ -400,6 +427,7 @@ export interface Rules {
|
|
|
400
427
|
}
|
|
401
428
|
];
|
|
402
429
|
|
|
430
|
+
/** Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences. */
|
|
403
431
|
"jsdoc/require-description-complete-sentence":
|
|
404
432
|
| []
|
|
405
433
|
| [
|
|
@@ -410,6 +438,7 @@ export interface Rules {
|
|
|
410
438
|
}
|
|
411
439
|
];
|
|
412
440
|
|
|
441
|
+
/** Requires that all functions have examples. */
|
|
413
442
|
"jsdoc/require-example":
|
|
414
443
|
| []
|
|
415
444
|
| [
|
|
@@ -430,6 +459,7 @@ export interface Rules {
|
|
|
430
459
|
}
|
|
431
460
|
];
|
|
432
461
|
|
|
462
|
+
/** Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file. */
|
|
433
463
|
"jsdoc/require-file-overview":
|
|
434
464
|
| []
|
|
435
465
|
| [
|
|
@@ -448,6 +478,7 @@ export interface Rules {
|
|
|
448
478
|
}
|
|
449
479
|
];
|
|
450
480
|
|
|
481
|
+
/** Requires a hyphen before the `@param` description. */
|
|
451
482
|
"jsdoc/require-hyphen-before-param-description":
|
|
452
483
|
| []
|
|
453
484
|
| ["always" | "never"]
|
|
@@ -466,6 +497,7 @@ export interface Rules {
|
|
|
466
497
|
}
|
|
467
498
|
];
|
|
468
499
|
|
|
500
|
+
/** Require JSDoc comments */
|
|
469
501
|
"jsdoc/require-jsdoc":
|
|
470
502
|
| []
|
|
471
503
|
| [
|
|
@@ -507,6 +539,7 @@ export interface Rules {
|
|
|
507
539
|
}
|
|
508
540
|
];
|
|
509
541
|
|
|
542
|
+
/** Requires that all function parameters are documented. */
|
|
510
543
|
"jsdoc/require-param":
|
|
511
544
|
| []
|
|
512
545
|
| [
|
|
@@ -536,6 +569,7 @@ export interface Rules {
|
|
|
536
569
|
}
|
|
537
570
|
];
|
|
538
571
|
|
|
572
|
+
/** Requires that each `@param` tag has a `description` value. */
|
|
539
573
|
"jsdoc/require-param-description":
|
|
540
574
|
| []
|
|
541
575
|
| [
|
|
@@ -552,6 +586,7 @@ export interface Rules {
|
|
|
552
586
|
}
|
|
553
587
|
];
|
|
554
588
|
|
|
589
|
+
/** Requires that all function parameters have names. */
|
|
555
590
|
"jsdoc/require-param-name":
|
|
556
591
|
| []
|
|
557
592
|
| [
|
|
@@ -566,6 +601,7 @@ export interface Rules {
|
|
|
566
601
|
}
|
|
567
602
|
];
|
|
568
603
|
|
|
604
|
+
/** Requires that each `@param` tag has a `type` value. */
|
|
569
605
|
"jsdoc/require-param-type":
|
|
570
606
|
| []
|
|
571
607
|
| [
|
|
@@ -582,6 +618,7 @@ export interface Rules {
|
|
|
582
618
|
}
|
|
583
619
|
];
|
|
584
620
|
|
|
621
|
+
/** Requires that returns are documented. */
|
|
585
622
|
"jsdoc/require-returns":
|
|
586
623
|
| []
|
|
587
624
|
| [
|
|
@@ -611,6 +648,7 @@ export interface Rules {
|
|
|
611
648
|
}
|
|
612
649
|
];
|
|
613
650
|
|
|
651
|
+
/** Requires a return statement in function body if a `@returns` tag is specified in jsdoc comment. */
|
|
614
652
|
"jsdoc/require-returns-check":
|
|
615
653
|
| []
|
|
616
654
|
| [
|
|
@@ -621,6 +659,7 @@ export interface Rules {
|
|
|
621
659
|
}
|
|
622
660
|
];
|
|
623
661
|
|
|
662
|
+
/** Requires that the `@returns` tag has a `description` value. */
|
|
624
663
|
"jsdoc/require-returns-description":
|
|
625
664
|
| []
|
|
626
665
|
| [
|
|
@@ -635,6 +674,7 @@ export interface Rules {
|
|
|
635
674
|
}
|
|
636
675
|
];
|
|
637
676
|
|
|
677
|
+
/** Requires that `@returns` tag has `type` value. */
|
|
638
678
|
"jsdoc/require-returns-type":
|
|
639
679
|
| []
|
|
640
680
|
| [
|
|
@@ -649,6 +689,7 @@ export interface Rules {
|
|
|
649
689
|
}
|
|
650
690
|
];
|
|
651
691
|
|
|
692
|
+
/** Requires template tags for each generic type parameter */
|
|
652
693
|
"jsdoc/require-template":
|
|
653
694
|
| []
|
|
654
695
|
| [
|
|
@@ -658,6 +699,7 @@ export interface Rules {
|
|
|
658
699
|
}
|
|
659
700
|
];
|
|
660
701
|
|
|
702
|
+
/** Requires that throw statements are documented. */
|
|
661
703
|
"jsdoc/require-throws":
|
|
662
704
|
| []
|
|
663
705
|
| [
|
|
@@ -673,6 +715,7 @@ export interface Rules {
|
|
|
673
715
|
}
|
|
674
716
|
];
|
|
675
717
|
|
|
718
|
+
/** Requires yields are documented. */
|
|
676
719
|
"jsdoc/require-yields":
|
|
677
720
|
| []
|
|
678
721
|
| [
|
|
@@ -693,6 +736,7 @@ export interface Rules {
|
|
|
693
736
|
}
|
|
694
737
|
];
|
|
695
738
|
|
|
739
|
+
/** Requires a yield statement in function body if a `@yields` tag is specified in jsdoc comment. */
|
|
696
740
|
"jsdoc/require-yields-check":
|
|
697
741
|
| []
|
|
698
742
|
| [
|
|
@@ -710,6 +754,7 @@ export interface Rules {
|
|
|
710
754
|
}
|
|
711
755
|
];
|
|
712
756
|
|
|
757
|
+
/** Sorts tags by a specified sequence according to tag name. */
|
|
713
758
|
"jsdoc/sort-tags":
|
|
714
759
|
| []
|
|
715
760
|
| [
|
|
@@ -724,6 +769,7 @@ export interface Rules {
|
|
|
724
769
|
}
|
|
725
770
|
];
|
|
726
771
|
|
|
772
|
+
/** Enforces lines (or no lines) between tags. */
|
|
727
773
|
"jsdoc/tag-lines":
|
|
728
774
|
| []
|
|
729
775
|
| ["always" | "any" | "never"]
|
|
@@ -747,6 +793,7 @@ export interface Rules {
|
|
|
747
793
|
}
|
|
748
794
|
];
|
|
749
795
|
|
|
796
|
+
/** Auto-escape certain characters that are input within block and tag descriptions. */
|
|
750
797
|
"jsdoc/text-escaping":
|
|
751
798
|
| []
|
|
752
799
|
| [
|
|
@@ -756,6 +803,7 @@ export interface Rules {
|
|
|
756
803
|
}
|
|
757
804
|
];
|
|
758
805
|
|
|
806
|
+
/** Formats JSDoc type values. */
|
|
759
807
|
"jsdoc/type-formatting":
|
|
760
808
|
| []
|
|
761
809
|
| [
|
|
@@ -776,6 +824,7 @@ export interface Rules {
|
|
|
776
824
|
}
|
|
777
825
|
];
|
|
778
826
|
|
|
827
|
+
/** Requires all types to be valid JSDoc or Closure compiler types without syntax errors. */
|
|
779
828
|
"jsdoc/valid-types":
|
|
780
829
|
| []
|
|
781
830
|
| [
|
package/package.json
CHANGED
package/src/rules.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export interface Rules {
|
|
2
|
+
/** Reports invalid alignment of JSDoc block asterisks. */
|
|
2
3
|
"jsdoc/check-alignment":
|
|
3
4
|
| []
|
|
4
5
|
| [
|
|
@@ -7,6 +8,7 @@ export interface Rules {
|
|
|
7
8
|
}
|
|
8
9
|
];
|
|
9
10
|
|
|
11
|
+
/** Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules. */
|
|
10
12
|
"jsdoc/check-examples":
|
|
11
13
|
| []
|
|
12
14
|
| [
|
|
@@ -33,6 +35,7 @@ export interface Rules {
|
|
|
33
35
|
}
|
|
34
36
|
];
|
|
35
37
|
|
|
38
|
+
/** Reports invalid padding inside JSDoc blocks. */
|
|
36
39
|
"jsdoc/check-indentation":
|
|
37
40
|
| []
|
|
38
41
|
| [
|
|
@@ -41,6 +44,7 @@ export interface Rules {
|
|
|
41
44
|
}
|
|
42
45
|
];
|
|
43
46
|
|
|
47
|
+
/** Reports invalid alignment of JSDoc block lines. */
|
|
44
48
|
"jsdoc/check-line-alignment":
|
|
45
49
|
| []
|
|
46
50
|
| ["always" | "never" | "any"]
|
|
@@ -61,6 +65,7 @@ export interface Rules {
|
|
|
61
65
|
}
|
|
62
66
|
];
|
|
63
67
|
|
|
68
|
+
/** Ensures that parameter names in JSDoc match those in the function declaration. */
|
|
64
69
|
"jsdoc/check-param-names":
|
|
65
70
|
| []
|
|
66
71
|
| [
|
|
@@ -76,6 +81,7 @@ export interface Rules {
|
|
|
76
81
|
}
|
|
77
82
|
];
|
|
78
83
|
|
|
84
|
+
/** Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots. */
|
|
79
85
|
"jsdoc/check-property-names":
|
|
80
86
|
| []
|
|
81
87
|
| [
|
|
@@ -84,6 +90,7 @@ export interface Rules {
|
|
|
84
90
|
}
|
|
85
91
|
];
|
|
86
92
|
|
|
93
|
+
/** Reports invalid block tag names. */
|
|
87
94
|
"jsdoc/check-tag-names":
|
|
88
95
|
| []
|
|
89
96
|
| [
|
|
@@ -95,6 +102,7 @@ export interface Rules {
|
|
|
95
102
|
}
|
|
96
103
|
];
|
|
97
104
|
|
|
105
|
+
/** Reports invalid types. */
|
|
98
106
|
"jsdoc/check-types":
|
|
99
107
|
| []
|
|
100
108
|
| [
|
|
@@ -108,6 +116,7 @@ export interface Rules {
|
|
|
108
116
|
}
|
|
109
117
|
];
|
|
110
118
|
|
|
119
|
+
/** This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`. */
|
|
111
120
|
"jsdoc/check-values":
|
|
112
121
|
| []
|
|
113
122
|
| [
|
|
@@ -119,6 +128,7 @@ export interface Rules {
|
|
|
119
128
|
}
|
|
120
129
|
];
|
|
121
130
|
|
|
131
|
+
/** Converts non-JSDoc comments preceding or following nodes into JSDoc ones */
|
|
122
132
|
"jsdoc/convert-to-jsdoc-comments":
|
|
123
133
|
| []
|
|
124
134
|
| [
|
|
@@ -151,6 +161,7 @@ export interface Rules {
|
|
|
151
161
|
}
|
|
152
162
|
];
|
|
153
163
|
|
|
164
|
+
/** Expects specific tags to be empty of any content. */
|
|
154
165
|
"jsdoc/empty-tags":
|
|
155
166
|
| []
|
|
156
167
|
| [
|
|
@@ -159,6 +170,7 @@ export interface Rules {
|
|
|
159
170
|
}
|
|
160
171
|
];
|
|
161
172
|
|
|
173
|
+
/** Reports an issue with any non-constructor function using `@implements`. */
|
|
162
174
|
"jsdoc/implements-on-classes":
|
|
163
175
|
| []
|
|
164
176
|
| [
|
|
@@ -173,6 +185,7 @@ export interface Rules {
|
|
|
173
185
|
}
|
|
174
186
|
];
|
|
175
187
|
|
|
188
|
+
/** This rule reports doc comments that only restate their attached name. */
|
|
176
189
|
"jsdoc/informative-docs":
|
|
177
190
|
| []
|
|
178
191
|
| [
|
|
@@ -189,6 +202,7 @@ export interface Rules {
|
|
|
189
202
|
}
|
|
190
203
|
];
|
|
191
204
|
|
|
205
|
+
/** Enforces minimum number of newlines before JSDoc comment blocks */
|
|
192
206
|
"jsdoc/lines-before-block":
|
|
193
207
|
| []
|
|
194
208
|
| [
|
|
@@ -201,6 +215,7 @@ export interface Rules {
|
|
|
201
215
|
}
|
|
202
216
|
];
|
|
203
217
|
|
|
218
|
+
/** Enforces a regular expression pattern on descriptions. */
|
|
204
219
|
"jsdoc/match-description":
|
|
205
220
|
| []
|
|
206
221
|
| [
|
|
@@ -238,6 +253,7 @@ export interface Rules {
|
|
|
238
253
|
}
|
|
239
254
|
];
|
|
240
255
|
|
|
256
|
+
/** Reports the name portion of a JSDoc tag if matching or not matching a given regular expression. */
|
|
241
257
|
"jsdoc/match-name":
|
|
242
258
|
| []
|
|
243
259
|
| [
|
|
@@ -254,6 +270,7 @@ export interface Rules {
|
|
|
254
270
|
}
|
|
255
271
|
];
|
|
256
272
|
|
|
273
|
+
/** Controls how and whether jsdoc blocks can be expressed as single or multiple line blocks. */
|
|
257
274
|
"jsdoc/multiline-blocks":
|
|
258
275
|
| []
|
|
259
276
|
| [
|
|
@@ -270,6 +287,7 @@ export interface Rules {
|
|
|
270
287
|
}
|
|
271
288
|
];
|
|
272
289
|
|
|
290
|
+
/** This rule checks for multi-line-style comments which fail to meet the criteria of a jsdoc block. */
|
|
273
291
|
"jsdoc/no-bad-blocks":
|
|
274
292
|
| []
|
|
275
293
|
| [
|
|
@@ -279,6 +297,7 @@ export interface Rules {
|
|
|
279
297
|
}
|
|
280
298
|
];
|
|
281
299
|
|
|
300
|
+
/** Removes empty blocks with nothing but possibly line breaks */
|
|
282
301
|
"jsdoc/no-blank-blocks":
|
|
283
302
|
| []
|
|
284
303
|
| [
|
|
@@ -287,6 +306,7 @@ export interface Rules {
|
|
|
287
306
|
}
|
|
288
307
|
];
|
|
289
308
|
|
|
309
|
+
/** This rule reports defaults being used on the relevant portion of `@param` or `@default`. */
|
|
290
310
|
"jsdoc/no-defaults":
|
|
291
311
|
| []
|
|
292
312
|
| [
|
|
@@ -302,6 +322,7 @@ export interface Rules {
|
|
|
302
322
|
}
|
|
303
323
|
];
|
|
304
324
|
|
|
325
|
+
/** Reports when certain comment structures are always expected. */
|
|
305
326
|
"jsdoc/no-missing-syntax":
|
|
306
327
|
| []
|
|
307
328
|
| [
|
|
@@ -318,6 +339,7 @@ export interface Rules {
|
|
|
318
339
|
}
|
|
319
340
|
];
|
|
320
341
|
|
|
342
|
+
/** Prevents use of multiple asterisks at the beginning of lines. */
|
|
321
343
|
"jsdoc/no-multi-asterisks":
|
|
322
344
|
| []
|
|
323
345
|
| [
|
|
@@ -328,6 +350,7 @@ export interface Rules {
|
|
|
328
350
|
}
|
|
329
351
|
];
|
|
330
352
|
|
|
353
|
+
/** Reports when certain comment structures are present. */
|
|
331
354
|
"jsdoc/no-restricted-syntax":
|
|
332
355
|
| []
|
|
333
356
|
| [
|
|
@@ -343,6 +366,7 @@ export interface Rules {
|
|
|
343
366
|
}
|
|
344
367
|
];
|
|
345
368
|
|
|
369
|
+
/** This rule reports types being used on `@param` or `@returns`. */
|
|
346
370
|
"jsdoc/no-types":
|
|
347
371
|
| []
|
|
348
372
|
| [
|
|
@@ -357,6 +381,7 @@ export interface Rules {
|
|
|
357
381
|
}
|
|
358
382
|
];
|
|
359
383
|
|
|
384
|
+
/** Checks that types in jsdoc comments are defined. */
|
|
360
385
|
"jsdoc/no-undefined-types":
|
|
361
386
|
| []
|
|
362
387
|
| [
|
|
@@ -367,6 +392,7 @@ export interface Rules {
|
|
|
367
392
|
}
|
|
368
393
|
];
|
|
369
394
|
|
|
395
|
+
/** Requires that each JSDoc line starts with an `*`. */
|
|
370
396
|
"jsdoc/require-asterisk-prefix":
|
|
371
397
|
| []
|
|
372
398
|
| ["always" | "never" | "any"]
|
|
@@ -381,6 +407,7 @@ export interface Rules {
|
|
|
381
407
|
}
|
|
382
408
|
];
|
|
383
409
|
|
|
410
|
+
/** Requires that all functions have a description. */
|
|
384
411
|
"jsdoc/require-description":
|
|
385
412
|
| []
|
|
386
413
|
| [
|
|
@@ -400,6 +427,7 @@ export interface Rules {
|
|
|
400
427
|
}
|
|
401
428
|
];
|
|
402
429
|
|
|
430
|
+
/** Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences. */
|
|
403
431
|
"jsdoc/require-description-complete-sentence":
|
|
404
432
|
| []
|
|
405
433
|
| [
|
|
@@ -410,6 +438,7 @@ export interface Rules {
|
|
|
410
438
|
}
|
|
411
439
|
];
|
|
412
440
|
|
|
441
|
+
/** Requires that all functions have examples. */
|
|
413
442
|
"jsdoc/require-example":
|
|
414
443
|
| []
|
|
415
444
|
| [
|
|
@@ -430,6 +459,7 @@ export interface Rules {
|
|
|
430
459
|
}
|
|
431
460
|
];
|
|
432
461
|
|
|
462
|
+
/** Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file. */
|
|
433
463
|
"jsdoc/require-file-overview":
|
|
434
464
|
| []
|
|
435
465
|
| [
|
|
@@ -448,6 +478,7 @@ export interface Rules {
|
|
|
448
478
|
}
|
|
449
479
|
];
|
|
450
480
|
|
|
481
|
+
/** Requires a hyphen before the `@param` description. */
|
|
451
482
|
"jsdoc/require-hyphen-before-param-description":
|
|
452
483
|
| []
|
|
453
484
|
| ["always" | "never"]
|
|
@@ -466,6 +497,7 @@ export interface Rules {
|
|
|
466
497
|
}
|
|
467
498
|
];
|
|
468
499
|
|
|
500
|
+
/** Require JSDoc comments */
|
|
469
501
|
"jsdoc/require-jsdoc":
|
|
470
502
|
| []
|
|
471
503
|
| [
|
|
@@ -507,6 +539,7 @@ export interface Rules {
|
|
|
507
539
|
}
|
|
508
540
|
];
|
|
509
541
|
|
|
542
|
+
/** Requires that all function parameters are documented. */
|
|
510
543
|
"jsdoc/require-param":
|
|
511
544
|
| []
|
|
512
545
|
| [
|
|
@@ -536,6 +569,7 @@ export interface Rules {
|
|
|
536
569
|
}
|
|
537
570
|
];
|
|
538
571
|
|
|
572
|
+
/** Requires that each `@param` tag has a `description` value. */
|
|
539
573
|
"jsdoc/require-param-description":
|
|
540
574
|
| []
|
|
541
575
|
| [
|
|
@@ -552,6 +586,7 @@ export interface Rules {
|
|
|
552
586
|
}
|
|
553
587
|
];
|
|
554
588
|
|
|
589
|
+
/** Requires that all function parameters have names. */
|
|
555
590
|
"jsdoc/require-param-name":
|
|
556
591
|
| []
|
|
557
592
|
| [
|
|
@@ -566,6 +601,7 @@ export interface Rules {
|
|
|
566
601
|
}
|
|
567
602
|
];
|
|
568
603
|
|
|
604
|
+
/** Requires that each `@param` tag has a `type` value. */
|
|
569
605
|
"jsdoc/require-param-type":
|
|
570
606
|
| []
|
|
571
607
|
| [
|
|
@@ -582,6 +618,7 @@ export interface Rules {
|
|
|
582
618
|
}
|
|
583
619
|
];
|
|
584
620
|
|
|
621
|
+
/** Requires that returns are documented. */
|
|
585
622
|
"jsdoc/require-returns":
|
|
586
623
|
| []
|
|
587
624
|
| [
|
|
@@ -611,6 +648,7 @@ export interface Rules {
|
|
|
611
648
|
}
|
|
612
649
|
];
|
|
613
650
|
|
|
651
|
+
/** Requires a return statement in function body if a `@returns` tag is specified in jsdoc comment. */
|
|
614
652
|
"jsdoc/require-returns-check":
|
|
615
653
|
| []
|
|
616
654
|
| [
|
|
@@ -621,6 +659,7 @@ export interface Rules {
|
|
|
621
659
|
}
|
|
622
660
|
];
|
|
623
661
|
|
|
662
|
+
/** Requires that the `@returns` tag has a `description` value. */
|
|
624
663
|
"jsdoc/require-returns-description":
|
|
625
664
|
| []
|
|
626
665
|
| [
|
|
@@ -635,6 +674,7 @@ export interface Rules {
|
|
|
635
674
|
}
|
|
636
675
|
];
|
|
637
676
|
|
|
677
|
+
/** Requires that `@returns` tag has `type` value. */
|
|
638
678
|
"jsdoc/require-returns-type":
|
|
639
679
|
| []
|
|
640
680
|
| [
|
|
@@ -649,6 +689,7 @@ export interface Rules {
|
|
|
649
689
|
}
|
|
650
690
|
];
|
|
651
691
|
|
|
692
|
+
/** Requires template tags for each generic type parameter */
|
|
652
693
|
"jsdoc/require-template":
|
|
653
694
|
| []
|
|
654
695
|
| [
|
|
@@ -658,6 +699,7 @@ export interface Rules {
|
|
|
658
699
|
}
|
|
659
700
|
];
|
|
660
701
|
|
|
702
|
+
/** Requires that throw statements are documented. */
|
|
661
703
|
"jsdoc/require-throws":
|
|
662
704
|
| []
|
|
663
705
|
| [
|
|
@@ -673,6 +715,7 @@ export interface Rules {
|
|
|
673
715
|
}
|
|
674
716
|
];
|
|
675
717
|
|
|
718
|
+
/** Requires yields are documented. */
|
|
676
719
|
"jsdoc/require-yields":
|
|
677
720
|
| []
|
|
678
721
|
| [
|
|
@@ -693,6 +736,7 @@ export interface Rules {
|
|
|
693
736
|
}
|
|
694
737
|
];
|
|
695
738
|
|
|
739
|
+
/** Requires a yield statement in function body if a `@yields` tag is specified in jsdoc comment. */
|
|
696
740
|
"jsdoc/require-yields-check":
|
|
697
741
|
| []
|
|
698
742
|
| [
|
|
@@ -710,6 +754,7 @@ export interface Rules {
|
|
|
710
754
|
}
|
|
711
755
|
];
|
|
712
756
|
|
|
757
|
+
/** Sorts tags by a specified sequence according to tag name. */
|
|
713
758
|
"jsdoc/sort-tags":
|
|
714
759
|
| []
|
|
715
760
|
| [
|
|
@@ -724,6 +769,7 @@ export interface Rules {
|
|
|
724
769
|
}
|
|
725
770
|
];
|
|
726
771
|
|
|
772
|
+
/** Enforces lines (or no lines) between tags. */
|
|
727
773
|
"jsdoc/tag-lines":
|
|
728
774
|
| []
|
|
729
775
|
| ["always" | "any" | "never"]
|
|
@@ -747,6 +793,7 @@ export interface Rules {
|
|
|
747
793
|
}
|
|
748
794
|
];
|
|
749
795
|
|
|
796
|
+
/** Auto-escape certain characters that are input within block and tag descriptions. */
|
|
750
797
|
"jsdoc/text-escaping":
|
|
751
798
|
| []
|
|
752
799
|
| [
|
|
@@ -756,6 +803,7 @@ export interface Rules {
|
|
|
756
803
|
}
|
|
757
804
|
];
|
|
758
805
|
|
|
806
|
+
/** Formats JSDoc type values. */
|
|
759
807
|
"jsdoc/type-formatting":
|
|
760
808
|
| []
|
|
761
809
|
| [
|
|
@@ -776,6 +824,7 @@ export interface Rules {
|
|
|
776
824
|
}
|
|
777
825
|
];
|
|
778
826
|
|
|
827
|
+
/** Requires all types to be valid JSDoc or Closure compiler types without syntax errors. */
|
|
779
828
|
"jsdoc/valid-types":
|
|
780
829
|
| []
|
|
781
830
|
| [
|