@sheplu/eslint-config-jsdoc 0.1.1 → 0.2.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.
@@ -0,0 +1,519 @@
1
+ export const jsdocRules = {
2
+ rules: {
3
+ "jsdoc/check-access": [
4
+ "error",
5
+ ],
6
+ "jsdoc/check-alignment": [
7
+ "error", {
8
+ "innerIndent": 1,
9
+ },
10
+ ],
11
+ "jsdoc/check-examples": [
12
+ "error", {
13
+ "captionRequired": true,
14
+ "exampleCodeRegex": "",
15
+ "rejectExampleCodeRegex": "",
16
+ "paddedIndent": 4,
17
+ "reportUnusedDisableDirectives": true,
18
+ },
19
+ ],
20
+ "jsdoc/check-indentation": [
21
+ "error", {
22
+ "excludeTags": ["example"],
23
+ },
24
+ ],
25
+ "jsdoc/check-line-alignment": [
26
+ "error", "always", {
27
+ "customSpacings": {
28
+ "postDelimiter": 1,
29
+ "postHyphen": 1,
30
+ "postName": 1,
31
+ "postTag": 1,
32
+ "postType": 1,
33
+ },
34
+ "disableWrapIndent": false,
35
+ "preserveMainDescriptionPostDelimiter": true,
36
+ "tags": ['param', 'arg', 'argument', 'property', 'prop', 'returns', 'return', 'template'],
37
+ "wrapIndent": "",
38
+ },
39
+ ],
40
+ "jsdoc/check-param-names": [
41
+ "error", {
42
+ "allowExtraTrailingParamDocs": false,
43
+ "checkDestructured": true,
44
+ "checkRestProperty": true,
45
+ "checkTypesPattern": "/^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$/v",
46
+ "disableExtraPropertyReporting": false,
47
+ "disableMissingParamChecks": false,
48
+ "enableFixer": true,
49
+ "useDefaultObjectProperties": true,
50
+ },
51
+ ],
52
+ "jsdoc/check-property-names": [
53
+ "error", {
54
+ "enableFixer": true,
55
+ },
56
+ ],
57
+ "jsdonc/check-syntax": [
58
+ "error",
59
+ ],
60
+ "jsdoc/check-tag-names": [
61
+ "error", {
62
+ "definedTags": ["note", "record"],
63
+ "enableFixer": true,
64
+ "inlineTags": ["link", "linkcode", "linkplain", "tutorial"],
65
+ "jsxTags": true,
66
+ "typed": true,
67
+ },
68
+ ],
69
+ "jsdoc/check-template-names": [
70
+ "error",
71
+ ],
72
+ "jsdoc/check-types": [
73
+ "error", {
74
+ "exemptTagContexts": [],
75
+ "noDefaults": false,
76
+ },
77
+ ],
78
+ "jsdoc/check-values": [
79
+ "error", {
80
+ "allowedAuthors": [],
81
+ "allowedLicenses": [],
82
+ "licensePattern": "",
83
+ "numericOnlyVariation": false,
84
+ },
85
+ ],
86
+ "jsdoc/convert-to-jsdoc-comments": [
87
+ "error", {
88
+ "allowedPrefixes": ["@ts-", "istanbul ", "c8 ", "v8 ", "eslint", "prettier-"],
89
+ "contexts": {
90
+ "context": [
91
+ "ArrowFunctionExpression",
92
+ "FunctionDeclaration",
93
+ "FunctionExpression",
94
+ "TSDeclareFunction"
95
+ ],
96
+ "contextsAfter": [],
97
+ "contextsBeforeAndAfter": [
98
+ "VariableDeclarator",
99
+ "TSPropertySignature",
100
+ "PropertyDefinition"
101
+ ],
102
+ },
103
+ "enableFixer": true,
104
+ "enforceJsdocLineStyle": "multi",
105
+ "lineOrBlockStyle": "block",
106
+ }
107
+ ],
108
+ "jsdoc/empty-tags": [
109
+ "error", {
110
+ "tags": [],
111
+ },
112
+ ],
113
+ "jsdoc/escape-inline-tags": [
114
+ "error", {
115
+ "allowedInlineTags": [],
116
+ "enableFixer": true,
117
+ "fixType": "backslash"
118
+ },
119
+ ],
120
+ "jsdoc/implements-on-classes": [
121
+ "error", {
122
+ "contexts": ["any"],
123
+ },
124
+ ],
125
+ "jsdoc/imports-as-dependencies": [
126
+ "error",
127
+ ],
128
+ "jsdoc/informative-docs": [
129
+ "error", {
130
+ "aliases": {
131
+ "a": ["an", "our"]
132
+ },
133
+ "excludedTags": [],
134
+ "uselessWords": ["a", "an", "i", "in", "of", "s", "the"],
135
+ },
136
+ ],
137
+ "jsdoc/lines-before-block": [
138
+ "error", {
139
+ "checkBlockStarts": true,
140
+ "excludedTags": ["type"],
141
+ "ignoreSameLine": false,
142
+ "lines": 2,
143
+ },
144
+ ],
145
+ "jsdoc/match-description": [
146
+ "error",
147
+ ],
148
+ "jsdoc/match-name": [
149
+ "error", {
150
+ "match": [],
151
+ },
152
+ ],
153
+ "jsdoc/multiline-blocks": [
154
+ "error", {
155
+ "allowMultipleTags": true,
156
+ "minimumLengthForMultiline": 30,
157
+ "multilineTags": ["*"],
158
+ "noFinalLineText": true,
159
+ "noSingleLineBlocks": false,
160
+ "noZeroLineText": true,
161
+ "requireSingleLineUnderCount": 40,
162
+ "singleLineTags": ["lends", "type"],
163
+ },
164
+ ],
165
+ "jsdoc/no-bad-blocks": [
166
+ "error", {
167
+ "ignore": ["ts-check", "ts-expect-error", "ts-ignore", "ts-nocheck"],
168
+ "preventAllMultiAsteriskBlocks": true,
169
+ },
170
+ ],
171
+ "jsdoc/no-blank-block-descriptions": [
172
+ "error",
173
+ ],
174
+ "jsdoc/no-blank-blocks": [
175
+ "error", {
176
+ "enableFixer": true,
177
+ },
178
+ ],
179
+ "jsdoc/no-defaults": [
180
+ "error", {
181
+ "contexts": ["any"],
182
+ "noOptionalParamNames": true,
183
+ },
184
+ ],
185
+ "jsdoc/no-missing-syntax": [
186
+ "error", {
187
+ "contexts": ["any"],
188
+ },
189
+ ],
190
+ "jsdoc/no-multi-asterisks": [
191
+ "error", {
192
+ "allowWhitespace": true,
193
+ "preventAtEnd": true,
194
+ "preventAtMiddleLines": true,
195
+ },
196
+ ],
197
+ "jsdoc/no-restricted-syntax": [
198
+ "error", {
199
+ "contexts": ["any"],
200
+ },
201
+ ],
202
+ "jsdoc/no-types": [
203
+ "error", {
204
+ "contexts": ["any"],
205
+ },
206
+ ],
207
+ "jsdoc/no-undefined-types": [
208
+ "error", {
209
+ "checkUsedTypedefs": true,
210
+ "definedTypes": [],
211
+ "disableReporting": false,
212
+ "markVariablesAsUsed": false,
213
+ },
214
+ ],
215
+ "jsdoc/prefer-import-tag": [
216
+ "error", {
217
+ "enableFixer": true,
218
+ "exemptTypedefs": true,
219
+ "outputType": "named-import",
220
+ },
221
+ ],
222
+ "jsdoc/reject-any-type": [
223
+ "error",
224
+ ],
225
+ "jsdoc/reject-function-type": [
226
+ "error",
227
+ ],
228
+ "jsdoc/require-asterisk-prefix": [
229
+ "error", "always",
230
+ ],
231
+ "jsdoc/require-description-complete-sentence": [
232
+ "error", {
233
+ "abbreviations": [],
234
+ "newlineBeforeCapsAssumesBadSentenceEnd": false,
235
+ "tags": [],
236
+ },
237
+ ],
238
+ "jsdoc/require-description": [
239
+ "error", {
240
+ "checkConstructors": true,
241
+ "checkGetters": true,
242
+ "checkSetters": true,
243
+ "descriptionStyle": "body",
244
+ "exemptedBy": [],
245
+ "contexts": ["any"],
246
+ },
247
+ ],
248
+ "jsdoc/require-example": [
249
+ "error", {
250
+ "checkConstructors": true,
251
+ "checkGetters": true,
252
+ "checkSetters": true,
253
+ "enableFixer": true,
254
+ "exemptedBy": [],
255
+ "exemptNoArguments": false,
256
+ "contexts": ["any"],
257
+ },
258
+ ],
259
+ "jsdoc/require-file-overview": [
260
+ "error", {
261
+ "tags": {
262
+ "file": {
263
+ "initialCommentsOnly": true,
264
+ "mustExist": true,
265
+ "preventDuplicates": true,
266
+ },
267
+ },
268
+ },
269
+ ],
270
+ "jsdoc/require-hyphen-before-param-description": [
271
+ "error", "always", {
272
+ "tags": {
273
+ "*": "always",
274
+ },
275
+ },
276
+ ],
277
+ "jsdoc/require-jsdoc": [
278
+ "error", {
279
+ "checkConstructors": true,
280
+ "checkGetters": true,
281
+ "checkSetters": true,
282
+ "contexts": ["any"],
283
+ "enableFixer": true,
284
+ "exemptEmptyConstructors": true,
285
+ "exemptEmptyFunctions": false,
286
+ "exemptOverloadedImplementations": false,
287
+ "fixerMessage": "Automatic JSdoc",
288
+ "minLineCount": undefined,
289
+ "publicOnly": {
290
+ "ancestorsOnly": false,
291
+ "esm": true,
292
+ "cjs": true,
293
+ "window": true,
294
+ },
295
+ "require": {
296
+ "ArrowFunctionExpression": true,
297
+ "ClassDeclaration": true,
298
+ "ClassExpression": true,
299
+ "FunctionDeclaration": true,
300
+ "FunctionExpression": true,
301
+ "MethodDefinition": true,
302
+ "skipInterveningOverloadedDeclarations": false,
303
+ },
304
+ },
305
+ ],
306
+ "jsdoc/require-next-description": [
307
+ "error",
308
+ ],
309
+ "jsdoc/require-next-type": [
310
+ "error",
311
+ ],
312
+ "jsdoc/require-param-description": [
313
+ "error", {
314
+ "contexts": ["any"],
315
+ "defaultDestructuredRootDescription": "The root object",
316
+ "setDefaultDestructuredRootDescription": false,
317
+ },
318
+ ],
319
+ "jsdoc/require-param-name": [
320
+ "error", {
321
+ "contexts": ["any"],
322
+ },
323
+ ],
324
+ "jsdoc/require-param-type": [
325
+ "error", {
326
+ "contexts": ["any"],
327
+ "defaultDestructuredRootType": "object",
328
+ "setDefaultDestructuredRootType": false
329
+ },
330
+ ],
331
+ "jsdoc/require-param": [
332
+ "error",
333
+ ],
334
+ "jsdoc/require-property-description": [
335
+ "error",
336
+ ],
337
+ "jsdoc/require-property-name": [
338
+ "error",
339
+ ],
340
+ "jsdoc/require-property-type": [
341
+ "error",
342
+ ],
343
+ "jsdoc/require-property": [
344
+ "error",
345
+ ],
346
+ "jsdoc/require-rejects": [
347
+ "error", {
348
+ "contexts": ["any"],
349
+ "exemptedBy": ["type", "abstract", "virtual"],
350
+ },
351
+ ],
352
+ "jsdoc/require-returns-check": [
353
+ "error", {
354
+ "exemptAsync": false,
355
+ "exemptGenerators": false,
356
+ "noNativeTypes": true,
357
+ "reportMissingReturnForUndefinedTypes": true,
358
+ },
359
+ ],
360
+ "jsdoc/require-returns-description": [
361
+ "error", {
362
+ "contexts": ["any"],
363
+ },
364
+ ],
365
+ "jsdoc/require-returns-type": [
366
+ "error", {
367
+ "contexts": ["any"],
368
+ },
369
+ ],
370
+ "jsdoc/require-returns": [
371
+ "error", {
372
+ "checkConstructors": true,
373
+ "checkGetters": true,
374
+ "contexts": ["any"],
375
+ "enableFixer": true,
376
+ "exemptedBy": ["inheritdoc"],
377
+ "forceRequireReturn": true,
378
+ "forceReturnsWithAsync": true,
379
+ "publicOnly": false,
380
+ },
381
+ ],
382
+ "jsdoc/require-tags": [
383
+ "error",
384
+ ],
385
+ "jsdoc/require-template-description": [
386
+ "error",
387
+ ],
388
+ "jsdoc/require-template": [
389
+ "error", {
390
+ "exemptedBy": ["inheritdoc"],
391
+ "requireSeparateTemplates": true,
392
+ },
393
+ ],
394
+ "jsdoc/require-throws-description": [
395
+ "error",
396
+ ],
397
+ "jsdoc/require-throws-type": [
398
+ "error",
399
+ ],
400
+ "jsdoc/require-throws": [
401
+ "error", {
402
+ "contexts": ["any"],
403
+ "exemptedBy": ["inheritdoc"],
404
+ },
405
+ ],
406
+ "jsdoc/require-yields-check": [
407
+ "error", {
408
+ "checkGeneratorsOnly": false,
409
+ "contexts": ["any"],
410
+ "next": true,
411
+ },
412
+ ],
413
+ "jsdoc/require-yields-description": [
414
+ "error",
415
+ ],
416
+ "jsdoc/require-yields-type": [
417
+ "error",
418
+ ],
419
+ "jsdoc/require-yields": [
420
+ "error", {
421
+ "contexts": ["any"],
422
+ "exemptedBy": ["inheritdoc"],
423
+ "forceRequireNext": true,
424
+ "forceRequireYields": true,
425
+ "next": true,
426
+ "nextWithGeneratorTag": true,
427
+ "withGeneratorTag": true,
428
+ },
429
+ ],
430
+ "jsdoc/required-tags": [
431
+ "error",
432
+ ],
433
+ "jsdoc/sort-tags": [
434
+ "error", {
435
+ "alphabetizeExtras": true,
436
+ "linesBetween": 0,
437
+ "reportIntraTagGroupSpacing": true,
438
+ "reportTagGroupSpacing": true,
439
+ "tagExceptions": {},
440
+ "tagSequence": [],
441
+ },
442
+ ],
443
+ "jsdoc/tag-lines": [
444
+ "error", "always", {
445
+ "applyToEndTag": true,
446
+ "count": 1,
447
+ "endLines": 0,
448
+ "maxBlockLines": null,
449
+ "startLines": 0,
450
+ "tags": {
451
+ "params": {
452
+ "lines": "any",
453
+ },
454
+ },
455
+ },
456
+ ],
457
+ "jsdoc/text-escaping": [
458
+ "error", {
459
+ "escapeHTML": false,
460
+ "escapeMarkdown": false,
461
+ },
462
+ ],
463
+ "jsdoc/ts-method-signature-style": [
464
+ "error", "property", {
465
+ "enableFixer": true,
466
+ },
467
+ ],
468
+ "jsdoc/ts-no-empty-object-type": [
469
+ "error",
470
+ ],
471
+ "jsdoc/ts-no-unnecessary-template-expression": [
472
+ "error", {
473
+ "enableFixer": true,
474
+ },
475
+ ],
476
+ "jsdoc/ts-prefer-function-type": [
477
+ "error", {
478
+ "enableFixer": true,
479
+ },
480
+ ],
481
+ "jsdoc/type-formatting": [
482
+ "error", {
483
+ "arrayBrackets": "angle",
484
+ "arrowFunctionPostReturnMarkerSpacing": " ",
485
+ "arrowFunctionPreReturnMarkerSpacing": " ",
486
+ "enableFixer": true,
487
+ "functionOrClassParameterSpacing": " ",
488
+ "functionOrClassPostGenericSpacing": "",
489
+ "functionOrClassPostReturnMarkerSpacing": "",
490
+ "functionOrClassPreReturnMarkerSpacing": "",
491
+ "functionOrClassTypeParameterSpacing": " ",
492
+ "genericAndTupleElementSpacing": " ",
493
+ "genericDot": false,
494
+ "keyValuePostColonSpacing": " ",
495
+ "keyValuePostKeySpacing": "",
496
+ "keyValuePostOptionalSpacing": "",
497
+ "keyValuePostVariadicSpacing": "",
498
+ "methodQuotes": "simple",
499
+ "objectFieldIndent": "",
500
+ "objectFieldQuote": "simple",
501
+ "objectFieldSeparator": "comma",
502
+ "objectFieldSeparatorOptionalLinebreak": true,
503
+ "objectFieldSeparatorTrailingPunctuation": true,
504
+ "parameterDefaultValueSpacing": " ",
505
+ "postMethodNameSpacing": "",
506
+ "postNewSpacing": " ",
507
+ "separatorForSingleObjectField": false,
508
+ "stringQuotes": "single",
509
+ "typeBracketSpacing": "",
510
+ "unionSpacing": " ",
511
+ },
512
+ ],
513
+ "jsdoc/valid-types": [
514
+ "error", {
515
+ "allowEmptyNamepaths": false,
516
+ },
517
+ ],
518
+ },
519
+ };
package/index.js CHANGED
@@ -1 +1,9 @@
1
- console.log('hello');
1
+ import { jsdocRules as eslintJsdocRules } from './eslint-jsdoc.js';
2
+
3
+ export const jsdocRules = [
4
+ {
5
+ rules: {
6
+ ...eslintJsdocRules.rules,
7
+ },
8
+ },
9
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheplu/eslint-config-jsdoc",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {