eslint-plugin-jsdoc 52.0.4 → 53.0.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/dist/WarnSettings.cjs +18 -35
- package/dist/WarnSettings.cjs.map +1 -1
- package/dist/WarnSettings.js +20 -0
- package/dist/WarnSettings.js.map +1 -0
- package/dist/_virtual/rolldown_runtime.cjs +32 -0
- package/dist/_virtual/rolldown_runtime.js +11 -0
- package/dist/alignTransform.cjs +224 -305
- package/dist/alignTransform.cjs.map +1 -1
- package/dist/alignTransform.js +241 -0
- package/dist/alignTransform.js.map +1 -0
- package/dist/defaultTagOrder.cjs +132 -43
- package/dist/defaultTagOrder.cjs.map +1 -1
- package/dist/defaultTagOrder.js +134 -0
- package/dist/defaultTagOrder.js.map +1 -0
- package/dist/exportParser.cjs +478 -696
- package/dist/exportParser.cjs.map +1 -1
- package/dist/exportParser.js +518 -0
- package/dist/exportParser.js.map +1 -0
- package/dist/getDefaultTagStructureForMode.cjs +184 -288
- package/dist/getDefaultTagStructureForMode.cjs.map +1 -1
- package/dist/getDefaultTagStructureForMode.js +188 -0
- package/dist/getDefaultTagStructureForMode.js.map +1 -0
- package/dist/getJsdocProcessorPlugin.cjs +364 -550
- package/dist/getJsdocProcessorPlugin.cjs.map +1 -1
- package/dist/getJsdocProcessorPlugin.d.cts +70 -0
- package/dist/getJsdocProcessorPlugin.d.cts.map +1 -0
- package/dist/getJsdocProcessorPlugin.d.ts +68 -65
- package/dist/getJsdocProcessorPlugin.d.ts.map +1 -1
- package/dist/getJsdocProcessorPlugin.js +383 -0
- package/dist/getJsdocProcessorPlugin.js.map +1 -0
- package/dist/index.cjs +2 -410
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -17
- package/dist/index.js +3 -0
- package/dist/iterateJsdoc.cjs +1528 -1988
- package/dist/iterateJsdoc.cjs.map +1 -1
- package/dist/iterateJsdoc.d.cts +471 -0
- package/dist/iterateJsdoc.d.cts.map +1 -0
- package/dist/iterateJsdoc.d.ts +358 -349
- package/dist/iterateJsdoc.d.ts.map +1 -1
- package/dist/iterateJsdoc.js +1617 -0
- package/dist/iterateJsdoc.js.map +1 -0
- package/dist/jsdocUtils.cjs +1009 -1376
- package/dist/jsdocUtils.cjs.map +1 -1
- package/dist/jsdocUtils.js +1123 -0
- package/dist/jsdocUtils.js.map +1 -0
- package/dist/plugin.cjs +427 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.js +427 -0
- package/dist/plugin.js.map +1 -0
- package/dist/rules/checkAccess.cjs +29 -36
- package/dist/rules/checkAccess.cjs.map +1 -1
- package/dist/rules/checkAccess.js +33 -0
- package/dist/rules/checkAccess.js.map +1 -0
- package/dist/rules/checkAlignment.cjs +41 -54
- package/dist/rules/checkAlignment.cjs.map +1 -1
- package/dist/rules/checkAlignment.js +47 -0
- package/dist/rules/checkAlignment.js.map +1 -0
- package/dist/rules/checkExamples.cjs +327 -484
- package/dist/rules/checkExamples.cjs.map +1 -1
- package/dist/rules/checkExamples.js +348 -0
- package/dist/rules/checkExamples.js.map +1 -0
- package/dist/rules/checkIndentation.cjs +50 -65
- package/dist/rules/checkIndentation.cjs.map +1 -1
- package/dist/rules/checkIndentation.js +59 -0
- package/dist/rules/checkIndentation.js.map +1 -0
- package/dist/rules/checkLineAlignment.cjs +220 -311
- package/dist/rules/checkLineAlignment.cjs.map +1 -1
- package/dist/rules/checkLineAlignment.js +229 -0
- package/dist/rules/checkLineAlignment.js.map +1 -0
- package/dist/rules/checkParamNames.cjs +227 -335
- package/dist/rules/checkParamNames.cjs.map +1 -1
- package/dist/rules/checkParamNames.js +237 -0
- package/dist/rules/checkParamNames.js.map +1 -0
- package/dist/rules/checkPropertyNames.cjs +78 -106
- package/dist/rules/checkPropertyNames.cjs.map +1 -1
- package/dist/rules/checkPropertyNames.js +88 -0
- package/dist/rules/checkPropertyNames.js.map +1 -0
- package/dist/rules/checkSyntax.cjs +21 -34
- package/dist/rules/checkSyntax.cjs.map +1 -1
- package/dist/rules/checkSyntax.js +25 -0
- package/dist/rules/checkSyntax.js.map +1 -0
- package/dist/rules/checkTagNames.cjs +188 -210
- package/dist/rules/checkTagNames.cjs.map +1 -1
- package/dist/rules/checkTagNames.js +191 -0
- package/dist/rules/checkTagNames.js.map +1 -0
- package/dist/rules/checkTemplateNames.cjs +121 -178
- package/dist/rules/checkTemplateNames.cjs.map +1 -1
- package/dist/rules/checkTemplateNames.js +124 -0
- package/dist/rules/checkTemplateNames.js.map +1 -0
- package/dist/rules/checkTypes.cjs +291 -385
- package/dist/rules/checkTypes.cjs.map +1 -1
- package/dist/rules/checkTypes.js +299 -0
- package/dist/rules/checkTypes.js.map +1 -0
- package/dist/rules/checkValues.cjs +100 -146
- package/dist/rules/checkValues.cjs.map +1 -1
- package/dist/rules/checkValues.js +103 -0
- package/dist/rules/checkValues.js.map +1 -0
- package/dist/rules/convertToJsdocComments.cjs +228 -306
- package/dist/rules/convertToJsdocComments.cjs.map +1 -1
- package/dist/rules/convertToJsdocComments.js +231 -0
- package/dist/rules/convertToJsdocComments.js.map +1 -0
- package/dist/rules/emptyTags.cjs +62 -72
- package/dist/rules/emptyTags.cjs.map +1 -1
- package/dist/rules/emptyTags.js +67 -0
- package/dist/rules/emptyTags.js.map +1 -0
- package/dist/rules/implementsOnClasses.cjs +36 -56
- package/dist/rules/implementsOnClasses.cjs.map +1 -1
- package/dist/rules/implementsOnClasses.js +40 -0
- package/dist/rules/implementsOnClasses.js.map +1 -0
- package/dist/rules/importsAsDependencies.cjs +62 -99
- package/dist/rules/importsAsDependencies.cjs.map +1 -1
- package/dist/rules/importsAsDependencies.js +68 -0
- package/dist/rules/importsAsDependencies.js.map +1 -0
- package/dist/rules/informativeDocs.cjs +105 -142
- package/dist/rules/informativeDocs.cjs.map +1 -1
- package/dist/rules/informativeDocs.js +110 -0
- package/dist/rules/informativeDocs.js.map +1 -0
- package/dist/rules/linesBeforeBlock.cjs +70 -105
- package/dist/rules/linesBeforeBlock.cjs.map +1 -1
- package/dist/rules/linesBeforeBlock.js +75 -0
- package/dist/rules/linesBeforeBlock.js.map +1 -0
- package/dist/rules/matchDescription.cjs +160 -222
- package/dist/rules/matchDescription.cjs.map +1 -1
- package/dist/rules/matchDescription.js +167 -0
- package/dist/rules/matchDescription.js.map +1 -0
- package/dist/rules/matchName.cjs +73 -128
- package/dist/rules/matchName.cjs.map +1 -1
- package/dist/rules/matchName.js +77 -0
- package/dist/rules/matchName.js.map +1 -0
- package/dist/rules/multilineBlocks.cjs +235 -352
- package/dist/rules/multilineBlocks.cjs.map +1 -1
- package/dist/rules/multilineBlocks.js +245 -0
- package/dist/rules/multilineBlocks.js.map +1 -0
- package/dist/rules/noBadBlocks.cjs +63 -86
- package/dist/rules/noBadBlocks.cjs.map +1 -1
- package/dist/rules/noBadBlocks.js +68 -0
- package/dist/rules/noBadBlocks.js.map +1 -0
- package/dist/rules/noBlankBlockDescriptions.cjs +35 -57
- package/dist/rules/noBlankBlockDescriptions.cjs.map +1 -1
- package/dist/rules/noBlankBlockDescriptions.js +41 -0
- package/dist/rules/noBlankBlockDescriptions.js.map +1 -0
- package/dist/rules/noBlankBlocks.cjs +26 -48
- package/dist/rules/noBlankBlocks.cjs.map +1 -1
- package/dist/rules/noBlankBlocks.js +30 -0
- package/dist/rules/noBlankBlocks.js.map +1 -0
- package/dist/rules/noDefaults.cjs +52 -79
- package/dist/rules/noDefaults.cjs.map +1 -1
- package/dist/rules/noDefaults.js +56 -0
- package/dist/rules/noDefaults.js.map +1 -0
- package/dist/rules/noMissingSyntax.cjs +115 -165
- package/dist/rules/noMissingSyntax.cjs.map +1 -1
- package/dist/rules/noMissingSyntax.js +126 -0
- package/dist/rules/noMissingSyntax.js.map +1 -0
- package/dist/rules/noMultiAsterisks.cjs +48 -89
- package/dist/rules/noMultiAsterisks.cjs.map +1 -1
- package/dist/rules/noMultiAsterisks.js +58 -0
- package/dist/rules/noMultiAsterisks.js.map +1 -0
- package/dist/rules/noRestrictedSyntax.cjs +45 -79
- package/dist/rules/noRestrictedSyntax.cjs.map +1 -1
- package/dist/rules/noRestrictedSyntax.js +49 -0
- package/dist/rules/noRestrictedSyntax.js.map +1 -0
- package/dist/rules/noTypes.cjs +59 -80
- package/dist/rules/noTypes.cjs.map +1 -1
- package/dist/rules/noTypes.js +65 -0
- package/dist/rules/noTypes.js.map +1 -0
- package/dist/rules/noUndefinedTypes.cjs +297 -388
- package/dist/rules/noUndefinedTypes.cjs.map +1 -1
- package/dist/rules/noUndefinedTypes.js +303 -0
- package/dist/rules/noUndefinedTypes.js.map +1 -0
- package/dist/rules/requireAsteriskPrefix.cjs +108 -159
- package/dist/rules/requireAsteriskPrefix.cjs.map +1 -1
- package/dist/rules/requireAsteriskPrefix.js +112 -0
- package/dist/rules/requireAsteriskPrefix.js.map +1 -0
- package/dist/rules/requireDescription.cjs +89 -129
- package/dist/rules/requireDescription.cjs.map +1 -1
- package/dist/rules/requireDescription.js +95 -0
- package/dist/rules/requireDescription.js.map +1 -0
- package/dist/rules/requireDescriptionCompleteSentence.cjs +201 -262
- package/dist/rules/requireDescriptionCompleteSentence.cjs.map +1 -1
- package/dist/rules/requireDescriptionCompleteSentence.js +220 -0
- package/dist/rules/requireDescriptionCompleteSentence.js.map +1 -0
- package/dist/rules/requireExample.cjs +73 -104
- package/dist/rules/requireExample.cjs.map +1 -1
- package/dist/rules/requireExample.js +77 -0
- package/dist/rules/requireExample.js.map +1 -0
- package/dist/rules/requireFileOverview.cjs +75 -129
- package/dist/rules/requireFileOverview.cjs.map +1 -1
- package/dist/rules/requireFileOverview.js +81 -0
- package/dist/rules/requireFileOverview.js.map +1 -0
- package/dist/rules/requireHyphenBeforeParamDescription.cjs +85 -133
- package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +1 -1
- package/dist/rules/requireHyphenBeforeParamDescription.js +89 -0
- package/dist/rules/requireHyphenBeforeParamDescription.js.map +1 -0
- package/dist/rules/requireJsdoc.cjs +384 -557
- package/dist/rules/requireJsdoc.cjs.map +1 -1
- package/dist/rules/requireJsdoc.js +404 -0
- package/dist/rules/requireJsdoc.js.map +1 -0
- package/dist/rules/requireParam.cjs +336 -526
- package/dist/rules/requireParam.cjs.map +1 -1
- package/dist/rules/requireParam.js +344 -0
- package/dist/rules/requireParam.js.map +1 -0
- package/dist/rules/requireParamDescription.cjs +55 -80
- package/dist/rules/requireParamDescription.cjs.map +1 -1
- package/dist/rules/requireParamDescription.js +59 -0
- package/dist/rules/requireParamDescription.js.map +1 -0
- package/dist/rules/requireParamName.cjs +32 -50
- package/dist/rules/requireParamName.cjs.map +1 -1
- package/dist/rules/requireParamName.js +36 -0
- package/dist/rules/requireParamName.js.map +1 -0
- package/dist/rules/requireParamType.cjs +55 -80
- package/dist/rules/requireParamType.cjs.map +1 -1
- package/dist/rules/requireParamType.js +59 -0
- package/dist/rules/requireParamType.js.map +1 -0
- package/dist/rules/requireProperty.cjs +31 -42
- package/dist/rules/requireProperty.cjs.map +1 -1
- package/dist/rules/requireProperty.js +35 -0
- package/dist/rules/requireProperty.js.map +1 -0
- package/dist/rules/requirePropertyDescription.cjs +17 -25
- package/dist/rules/requirePropertyDescription.cjs.map +1 -1
- package/dist/rules/requirePropertyDescription.js +21 -0
- package/dist/rules/requirePropertyDescription.js.map +1 -0
- package/dist/rules/requirePropertyName.cjs +17 -25
- package/dist/rules/requirePropertyName.cjs.map +1 -1
- package/dist/rules/requirePropertyName.js +21 -0
- package/dist/rules/requirePropertyName.js.map +1 -0
- package/dist/rules/requirePropertyType.cjs +17 -25
- package/dist/rules/requirePropertyType.cjs.map +1 -1
- package/dist/rules/requirePropertyType.js +21 -0
- package/dist/rules/requirePropertyType.js.map +1 -0
- package/dist/rules/requireReturns.cjs +125 -203
- package/dist/rules/requireReturns.cjs.map +1 -1
- package/dist/rules/requireReturns.js +131 -0
- package/dist/rules/requireReturns.js.map +1 -0
- package/dist/rules/requireReturnsCheck.cjs +60 -103
- package/dist/rules/requireReturnsCheck.cjs.map +1 -1
- package/dist/rules/requireReturnsCheck.js +66 -0
- package/dist/rules/requireReturnsCheck.js.map +1 -0
- package/dist/rules/requireReturnsDescription.cjs +39 -54
- package/dist/rules/requireReturnsDescription.cjs.map +1 -1
- package/dist/rules/requireReturnsDescription.js +43 -0
- package/dist/rules/requireReturnsDescription.js.map +1 -0
- package/dist/rules/requireReturnsType.cjs +32 -50
- package/dist/rules/requireReturnsType.cjs.map +1 -1
- package/dist/rules/requireReturnsType.js +36 -0
- package/dist/rules/requireReturnsType.js.map +1 -0
- package/dist/rules/requireTemplate.cjs +119 -178
- package/dist/rules/requireTemplate.cjs.map +1 -1
- package/dist/rules/requireTemplate.js +122 -0
- package/dist/rules/requireTemplate.js.map +1 -0
- package/dist/rules/requireThrows.cjs +61 -95
- package/dist/rules/requireThrows.cjs.map +1 -1
- package/dist/rules/requireThrows.js +67 -0
- package/dist/rules/requireThrows.js.map +1 -0
- package/dist/rules/requireYields.cjs +106 -166
- package/dist/rules/requireYields.cjs.map +1 -1
- package/dist/rules/requireYields.js +115 -0
- package/dist/rules/requireYields.js.map +1 -0
- package/dist/rules/requireYieldsCheck.cjs +96 -152
- package/dist/rules/requireYieldsCheck.cjs.map +1 -1
- package/dist/rules/requireYieldsCheck.js +105 -0
- package/dist/rules/requireYieldsCheck.js.map +1 -0
- package/dist/rules/sortTags.cjs +258 -444
- package/dist/rules/sortTags.cjs.map +1 -1
- package/dist/rules/sortTags.js +262 -0
- package/dist/rules/sortTags.js.map +1 -0
- package/dist/rules/tagLines.cjs +179 -266
- package/dist/rules/tagLines.cjs.map +1 -1
- package/dist/rules/tagLines.js +183 -0
- package/dist/rules/tagLines.js.map +1 -0
- package/dist/rules/textEscaping.cjs +92 -127
- package/dist/rules/textEscaping.cjs.map +1 -1
- package/dist/rules/textEscaping.js +102 -0
- package/dist/rules/textEscaping.js.map +1 -0
- package/dist/rules/validTypes.cjs +252 -265
- package/dist/rules/validTypes.cjs.map +1 -1
- package/dist/rules/validTypes.js +259 -0
- package/dist/rules/validTypes.js.map +1 -0
- package/dist/tagNames.cjs +134 -170
- package/dist/tagNames.cjs.map +1 -1
- package/dist/tagNames.js +144 -0
- package/dist/tagNames.js.map +1 -0
- package/dist/utils/hasReturnValue.cjs +246 -474
- package/dist/utils/hasReturnValue.cjs.map +1 -1
- package/dist/utils/hasReturnValue.js +265 -0
- package/dist/utils/hasReturnValue.js.map +1 -0
- package/package.json +40 -24
- package/dist/generateRule.cjs +0 -242
- package/dist/generateRule.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/src/WarnSettings.js +0 -34
- package/src/alignTransform.js +0 -358
- package/src/defaultTagOrder.js +0 -169
- package/src/exportParser.js +0 -978
- package/src/getDefaultTagStructureForMode.js +0 -969
- package/src/getJsdocProcessorPlugin.js +0 -672
- package/src/index.js +0 -530
- package/src/iterateJsdoc.js +0 -2518
- package/src/jsdocUtils.js +0 -1896
- package/src/rules/checkAccess.js +0 -45
- package/src/rules/checkAlignment.js +0 -63
- package/src/rules/checkExamples.js +0 -589
- package/src/rules/checkIndentation.js +0 -75
- package/src/rules/checkLineAlignment.js +0 -372
- package/src/rules/checkParamNames.js +0 -474
- package/src/rules/checkPropertyNames.js +0 -152
- package/src/rules/checkSyntax.js +0 -30
- package/src/rules/checkTagNames.js +0 -314
- package/src/rules/checkTemplateNames.js +0 -204
- package/src/rules/checkTypes.js +0 -535
- package/src/rules/checkValues.js +0 -248
- package/src/rules/convertToJsdocComments.js +0 -398
- package/src/rules/emptyTags.js +0 -98
- package/src/rules/implementsOnClasses.js +0 -64
- package/src/rules/importsAsDependencies.js +0 -133
- package/src/rules/informativeDocs.js +0 -189
- package/src/rules/linesBeforeBlock.js +0 -134
- package/src/rules/matchDescription.js +0 -286
- package/src/rules/matchName.js +0 -151
- package/src/rules/multilineBlocks.js +0 -493
- package/src/rules/noBadBlocks.js +0 -119
- package/src/rules/noBlankBlockDescriptions.js +0 -69
- package/src/rules/noBlankBlocks.js +0 -53
- package/src/rules/noDefaults.js +0 -85
- package/src/rules/noMissingSyntax.js +0 -195
- package/src/rules/noMultiAsterisks.js +0 -134
- package/src/rules/noRestrictedSyntax.js +0 -91
- package/src/rules/noTypes.js +0 -93
- package/src/rules/noUndefinedTypes.js +0 -543
- package/src/rules/requireAsteriskPrefix.js +0 -190
- package/src/rules/requireDescription.js +0 -161
- package/src/rules/requireDescriptionCompleteSentence.js +0 -335
- package/src/rules/requireExample.js +0 -118
- package/src/rules/requireFileOverview.js +0 -154
- package/src/rules/requireHyphenBeforeParamDescription.js +0 -176
- package/src/rules/requireJsdoc.js +0 -743
- package/src/rules/requireParam.js +0 -602
- package/src/rules/requireParamDescription.js +0 -89
- package/src/rules/requireParamName.js +0 -55
- package/src/rules/requireParamType.js +0 -89
- package/src/rules/requireProperty.js +0 -48
- package/src/rules/requirePropertyDescription.js +0 -25
- package/src/rules/requirePropertyName.js +0 -25
- package/src/rules/requirePropertyType.js +0 -25
- package/src/rules/requireReturns.js +0 -238
- package/src/rules/requireReturnsCheck.js +0 -145
- package/src/rules/requireReturnsDescription.js +0 -59
- package/src/rules/requireReturnsType.js +0 -51
- package/src/rules/requireTemplate.js +0 -201
- package/src/rules/requireThrows.js +0 -111
- package/src/rules/requireYields.js +0 -216
- package/src/rules/requireYieldsCheck.js +0 -208
- package/src/rules/sortTags.js +0 -558
- package/src/rules/tagLines.js +0 -359
- package/src/rules/textEscaping.js +0 -154
- package/src/rules/validTypes.js +0 -401
- package/src/tagNames.js +0 -238
- package/src/utils/hasReturnValue.js +0 -572
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import iterateJsdoc from "../iterateJsdoc.js";
|
|
2
|
+
import alignTransform_default from "../alignTransform.js";
|
|
3
|
+
import { transforms } from "comment-parser";
|
|
4
|
+
|
|
5
|
+
//#region src/rules/checkLineAlignment.js
|
|
6
|
+
const { flow: commentFlow } = transforms;
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {{
|
|
9
|
+
* postDelimiter: import('../iterateJsdoc.js').Integer,
|
|
10
|
+
* postHyphen: import('../iterateJsdoc.js').Integer,
|
|
11
|
+
* postName: import('../iterateJsdoc.js').Integer,
|
|
12
|
+
* postTag: import('../iterateJsdoc.js').Integer,
|
|
13
|
+
* postType: import('../iterateJsdoc.js').Integer,
|
|
14
|
+
* }} CustomSpacings
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @param {import('../iterateJsdoc.js').Utils} utils
|
|
18
|
+
* @param {import('comment-parser').Spec & {
|
|
19
|
+
* line: import('../iterateJsdoc.js').Integer
|
|
20
|
+
* }} tag
|
|
21
|
+
* @param {CustomSpacings} customSpacings
|
|
22
|
+
*/
|
|
23
|
+
const checkNotAlignedPerTag = (utils, tag, customSpacings) => {
|
|
24
|
+
/**
|
|
25
|
+
* @typedef {"tag"|"type"|"name"|"description"} ContentProp
|
|
26
|
+
*/
|
|
27
|
+
/** @type {("postDelimiter"|"postTag"|"postType"|"postName")[]} */
|
|
28
|
+
let spacerProps;
|
|
29
|
+
/** @type {ContentProp[]} */
|
|
30
|
+
let contentProps;
|
|
31
|
+
const mightHaveNamepath = utils.tagMightHaveNamepath(tag.tag);
|
|
32
|
+
if (mightHaveNamepath) {
|
|
33
|
+
spacerProps = [
|
|
34
|
+
"postDelimiter",
|
|
35
|
+
"postTag",
|
|
36
|
+
"postType",
|
|
37
|
+
"postName"
|
|
38
|
+
];
|
|
39
|
+
contentProps = [
|
|
40
|
+
"tag",
|
|
41
|
+
"type",
|
|
42
|
+
"name",
|
|
43
|
+
"description"
|
|
44
|
+
];
|
|
45
|
+
} else {
|
|
46
|
+
spacerProps = [
|
|
47
|
+
"postDelimiter",
|
|
48
|
+
"postTag",
|
|
49
|
+
"postType"
|
|
50
|
+
];
|
|
51
|
+
contentProps = [
|
|
52
|
+
"tag",
|
|
53
|
+
"type",
|
|
54
|
+
"description"
|
|
55
|
+
];
|
|
56
|
+
}
|
|
57
|
+
const { tokens } = tag.source[0];
|
|
58
|
+
/**
|
|
59
|
+
* @param {import('../iterateJsdoc.js').Integer} idx
|
|
60
|
+
* @param {(notRet: boolean, contentProp: ContentProp) => void} [callbck]
|
|
61
|
+
*/
|
|
62
|
+
const followedBySpace = (idx, callbck) => {
|
|
63
|
+
const nextIndex = idx + 1;
|
|
64
|
+
return spacerProps.slice(nextIndex).some((spacerProp, innerIdx) => {
|
|
65
|
+
const contentProp = contentProps[nextIndex + innerIdx];
|
|
66
|
+
const spacePropVal = tokens[spacerProp];
|
|
67
|
+
const ret = spacePropVal;
|
|
68
|
+
if (callbck) callbck(!ret, contentProp);
|
|
69
|
+
return ret && (callbck || !contentProp);
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const postHyphenSpacing = customSpacings?.postHyphen ?? 1;
|
|
73
|
+
const exactHyphenSpacing = new RegExp(`^\\s*-\\s{${postHyphenSpacing},${postHyphenSpacing}}(?!\\s)`, "v");
|
|
74
|
+
const hasNoHyphen = !/^\s*-(?!$)(?=\s)/v.test(tokens.description);
|
|
75
|
+
const hasExactHyphenSpacing = exactHyphenSpacing.test(tokens.description);
|
|
76
|
+
const ok = !spacerProps.some((spacerProp, idx) => {
|
|
77
|
+
const contentProp = contentProps[idx];
|
|
78
|
+
const contentPropVal = tokens[contentProp];
|
|
79
|
+
const spacerPropVal = tokens[spacerProp];
|
|
80
|
+
const spacing = customSpacings?.[spacerProp] || 1;
|
|
81
|
+
return spacerPropVal.length !== spacing && spacerPropVal.length !== 0 || spacerPropVal && !contentPropVal && followedBySpace(idx);
|
|
82
|
+
}) && (hasNoHyphen || hasExactHyphenSpacing);
|
|
83
|
+
if (ok) return;
|
|
84
|
+
const fix = () => {
|
|
85
|
+
for (const [idx, spacerProp] of spacerProps.entries()) {
|
|
86
|
+
const contentProp = contentProps[idx];
|
|
87
|
+
const contentPropVal = tokens[contentProp];
|
|
88
|
+
if (contentPropVal) {
|
|
89
|
+
const spacing = customSpacings?.[spacerProp] || 1;
|
|
90
|
+
tokens[spacerProp] = "".padStart(spacing, " ");
|
|
91
|
+
followedBySpace(idx, (hasSpace, contentPrp) => {
|
|
92
|
+
if (hasSpace) tokens[contentPrp] = "";
|
|
93
|
+
});
|
|
94
|
+
} else tokens[spacerProp] = "";
|
|
95
|
+
}
|
|
96
|
+
if (!hasExactHyphenSpacing) {
|
|
97
|
+
const hyphenSpacing = /^\s*-\s+/v;
|
|
98
|
+
tokens.description = tokens.description.replace(hyphenSpacing, "-" + "".padStart(postHyphenSpacing, " "));
|
|
99
|
+
}
|
|
100
|
+
utils.setTag(tag, tokens);
|
|
101
|
+
};
|
|
102
|
+
utils.reportJSDoc("Expected JSDoc block lines to not be aligned.", tag, fix, true);
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* @param {object} cfg
|
|
106
|
+
* @param {CustomSpacings} cfg.customSpacings
|
|
107
|
+
* @param {string} cfg.indent
|
|
108
|
+
* @param {import('comment-parser').Block} cfg.jsdoc
|
|
109
|
+
* @param {import('eslint').Rule.Node & {
|
|
110
|
+
* range: [number, number]
|
|
111
|
+
* }} cfg.jsdocNode
|
|
112
|
+
* @param {boolean} cfg.preserveMainDescriptionPostDelimiter
|
|
113
|
+
* @param {import('../iterateJsdoc.js').Report} cfg.report
|
|
114
|
+
* @param {string[]} cfg.tags
|
|
115
|
+
* @param {import('../iterateJsdoc.js').Utils} cfg.utils
|
|
116
|
+
* @param {string} cfg.wrapIndent
|
|
117
|
+
* @param {boolean} cfg.disableWrapIndent
|
|
118
|
+
* @returns {void}
|
|
119
|
+
*/
|
|
120
|
+
const checkAlignment = ({ customSpacings, disableWrapIndent, indent, jsdoc, jsdocNode, preserveMainDescriptionPostDelimiter, report, tags, utils, wrapIndent }) => {
|
|
121
|
+
const transform = commentFlow(alignTransform_default({
|
|
122
|
+
customSpacings,
|
|
123
|
+
disableWrapIndent,
|
|
124
|
+
indent,
|
|
125
|
+
preserveMainDescriptionPostDelimiter,
|
|
126
|
+
tags,
|
|
127
|
+
wrapIndent
|
|
128
|
+
}));
|
|
129
|
+
const transformedJsdoc = transform(jsdoc);
|
|
130
|
+
const comment = "/*" + jsdocNode.value + "*/";
|
|
131
|
+
const formatted = utils.stringify(transformedJsdoc).trimStart();
|
|
132
|
+
if (comment !== formatted) report(
|
|
133
|
+
"Expected JSDoc block lines to be aligned.",
|
|
134
|
+
/** @type {import('eslint').Rule.ReportFixer} */
|
|
135
|
+
(fixer) => {
|
|
136
|
+
return fixer.replaceText(jsdocNode, formatted);
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
var checkLineAlignment_default = iterateJsdoc(({ context, indent, jsdoc, jsdocNode, report, utils }) => {
|
|
141
|
+
const { customSpacings, disableWrapIndent = false, preserveMainDescriptionPostDelimiter, tags: applicableTags = [
|
|
142
|
+
"param",
|
|
143
|
+
"arg",
|
|
144
|
+
"argument",
|
|
145
|
+
"property",
|
|
146
|
+
"prop",
|
|
147
|
+
"returns",
|
|
148
|
+
"return",
|
|
149
|
+
"template"
|
|
150
|
+
], wrapIndent = "" } = context.options[1] || {};
|
|
151
|
+
if (context.options[0] === "always") {
|
|
152
|
+
if (!jsdocNode.value.includes("\n")) return;
|
|
153
|
+
checkAlignment({
|
|
154
|
+
customSpacings,
|
|
155
|
+
disableWrapIndent,
|
|
156
|
+
indent,
|
|
157
|
+
jsdoc,
|
|
158
|
+
jsdocNode,
|
|
159
|
+
preserveMainDescriptionPostDelimiter,
|
|
160
|
+
report,
|
|
161
|
+
tags: applicableTags,
|
|
162
|
+
utils,
|
|
163
|
+
wrapIndent
|
|
164
|
+
});
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const foundTags = utils.getPresentTags(applicableTags);
|
|
168
|
+
if (context.options[0] !== "any") for (const tag of foundTags) checkNotAlignedPerTag(utils, tag, customSpacings);
|
|
169
|
+
for (const tag of foundTags) if (tag.source.length > 1) {
|
|
170
|
+
let idx = 0;
|
|
171
|
+
for (const { tokens } of tag.source.slice(1)) {
|
|
172
|
+
idx++;
|
|
173
|
+
if (!tokens.description || tokens.type || tokens.name) continue;
|
|
174
|
+
if (!disableWrapIndent && tokens.postDelimiter.slice(1) !== wrapIndent) {
|
|
175
|
+
utils.reportJSDoc("Expected wrap indent", { line: tag.source[0].number + idx }, () => {
|
|
176
|
+
tokens.postDelimiter = tokens.postDelimiter.charAt(0) + wrapIndent;
|
|
177
|
+
});
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}, {
|
|
183
|
+
iterateAllJsdocs: true,
|
|
184
|
+
meta: {
|
|
185
|
+
docs: {
|
|
186
|
+
description: "Reports invalid alignment of JSDoc block lines.",
|
|
187
|
+
url: "https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-line-alignment.md#repos-sticky-header"
|
|
188
|
+
},
|
|
189
|
+
fixable: "whitespace",
|
|
190
|
+
schema: [{
|
|
191
|
+
enum: [
|
|
192
|
+
"always",
|
|
193
|
+
"never",
|
|
194
|
+
"any"
|
|
195
|
+
],
|
|
196
|
+
type: "string"
|
|
197
|
+
}, {
|
|
198
|
+
additionalProperties: false,
|
|
199
|
+
properties: {
|
|
200
|
+
customSpacings: {
|
|
201
|
+
additionalProperties: false,
|
|
202
|
+
properties: {
|
|
203
|
+
postDelimiter: { type: "integer" },
|
|
204
|
+
postHyphen: { type: "integer" },
|
|
205
|
+
postName: { type: "integer" },
|
|
206
|
+
postTag: { type: "integer" },
|
|
207
|
+
postType: { type: "integer" }
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
disableWrapIndent: { type: "boolean" },
|
|
211
|
+
preserveMainDescriptionPostDelimiter: {
|
|
212
|
+
default: false,
|
|
213
|
+
type: "boolean"
|
|
214
|
+
},
|
|
215
|
+
tags: {
|
|
216
|
+
items: { type: "string" },
|
|
217
|
+
type: "array"
|
|
218
|
+
},
|
|
219
|
+
wrapIndent: { type: "string" }
|
|
220
|
+
},
|
|
221
|
+
type: "object"
|
|
222
|
+
}],
|
|
223
|
+
type: "layout"
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
//#endregion
|
|
228
|
+
export { checkLineAlignment_default as default };
|
|
229
|
+
//# sourceMappingURL=checkLineAlignment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkLineAlignment.js","names":["alignTransform"],"sources":["../../src/rules/checkLineAlignment.js"],"sourcesContent":["import alignTransform from '../alignTransform.js';\nimport iterateJsdoc from '../iterateJsdoc.js';\nimport {\n transforms,\n} from 'comment-parser';\n\nconst {\n flow: commentFlow,\n} = transforms;\n\n/**\n * @typedef {{\n * postDelimiter: import('../iterateJsdoc.js').Integer,\n * postHyphen: import('../iterateJsdoc.js').Integer,\n * postName: import('../iterateJsdoc.js').Integer,\n * postTag: import('../iterateJsdoc.js').Integer,\n * postType: import('../iterateJsdoc.js').Integer,\n * }} CustomSpacings\n */\n\n/**\n * @param {import('../iterateJsdoc.js').Utils} utils\n * @param {import('comment-parser').Spec & {\n * line: import('../iterateJsdoc.js').Integer\n * }} tag\n * @param {CustomSpacings} customSpacings\n */\nconst checkNotAlignedPerTag = (utils, tag, customSpacings) => {\n /*\n start +\n delimiter +\n postDelimiter +\n tag +\n postTag +\n type +\n postType +\n name +\n postName +\n description +\n end +\n lineEnd\n */\n\n /**\n * @typedef {\"tag\"|\"type\"|\"name\"|\"description\"} ContentProp\n */\n\n /** @type {(\"postDelimiter\"|\"postTag\"|\"postType\"|\"postName\")[]} */\n let spacerProps;\n /** @type {ContentProp[]} */\n let contentProps;\n const mightHaveNamepath = utils.tagMightHaveNamepath(tag.tag);\n if (mightHaveNamepath) {\n spacerProps = [\n 'postDelimiter', 'postTag', 'postType', 'postName',\n ];\n contentProps = [\n 'tag', 'type', 'name', 'description',\n ];\n } else {\n spacerProps = [\n 'postDelimiter', 'postTag', 'postType',\n ];\n contentProps = [\n 'tag', 'type', 'description',\n ];\n }\n\n const {\n tokens,\n } = tag.source[0];\n\n /**\n * @param {import('../iterateJsdoc.js').Integer} idx\n * @param {(notRet: boolean, contentProp: ContentProp) => void} [callbck]\n */\n const followedBySpace = (idx, callbck) => {\n const nextIndex = idx + 1;\n\n return spacerProps.slice(nextIndex).some((spacerProp, innerIdx) => {\n const contentProp = contentProps[nextIndex + innerIdx];\n\n const spacePropVal = tokens[spacerProp];\n\n const ret = spacePropVal;\n\n if (callbck) {\n callbck(!ret, contentProp);\n }\n\n return ret && (callbck || !contentProp);\n });\n };\n\n const postHyphenSpacing = customSpacings?.postHyphen ?? 1;\n const exactHyphenSpacing = new RegExp(`^\\\\s*-\\\\s{${postHyphenSpacing},${postHyphenSpacing}}(?!\\\\s)`, 'v');\n const hasNoHyphen = !(/^\\s*-(?!$)(?=\\s)/v).test(tokens.description);\n const hasExactHyphenSpacing = exactHyphenSpacing.test(\n tokens.description,\n );\n\n // If checking alignment on multiple lines, need to check other `source`\n // items\n // Go through `post*` spacing properties and exit to indicate problem if\n // extra spacing detected\n const ok = !spacerProps.some((spacerProp, idx) => {\n const contentProp = contentProps[idx];\n const contentPropVal = tokens[contentProp];\n const spacerPropVal = tokens[spacerProp];\n const spacing = customSpacings?.[spacerProp] || 1;\n\n // There will be extra alignment if...\n\n // 1. The spaces don't match the space it should have (1 or custom spacing) OR\n return spacerPropVal.length !== spacing && spacerPropVal.length !== 0 ||\n\n // 2. There is a (single) space, no immediate content, and yet another\n // space is found subsequently (not separated by intervening content)\n spacerPropVal && !contentPropVal && followedBySpace(idx);\n }) && (hasNoHyphen || hasExactHyphenSpacing);\n if (ok) {\n return;\n }\n\n const fix = () => {\n for (const [\n idx,\n spacerProp,\n ] of spacerProps.entries()) {\n const contentProp = contentProps[idx];\n const contentPropVal = tokens[contentProp];\n\n if (contentPropVal) {\n const spacing = customSpacings?.[spacerProp] || 1;\n tokens[spacerProp] = ''.padStart(spacing, ' ');\n followedBySpace(idx, (hasSpace, contentPrp) => {\n if (hasSpace) {\n tokens[contentPrp] = '';\n }\n });\n } else {\n tokens[spacerProp] = '';\n }\n }\n\n if (!hasExactHyphenSpacing) {\n const hyphenSpacing = /^\\s*-\\s+/v;\n tokens.description = tokens.description.replace(\n hyphenSpacing, '-' + ''.padStart(postHyphenSpacing, ' '),\n );\n }\n\n utils.setTag(tag, tokens);\n };\n\n utils.reportJSDoc('Expected JSDoc block lines to not be aligned.', tag, fix, true);\n};\n\n/**\n * @param {object} cfg\n * @param {CustomSpacings} cfg.customSpacings\n * @param {string} cfg.indent\n * @param {import('comment-parser').Block} cfg.jsdoc\n * @param {import('eslint').Rule.Node & {\n * range: [number, number]\n * }} cfg.jsdocNode\n * @param {boolean} cfg.preserveMainDescriptionPostDelimiter\n * @param {import('../iterateJsdoc.js').Report} cfg.report\n * @param {string[]} cfg.tags\n * @param {import('../iterateJsdoc.js').Utils} cfg.utils\n * @param {string} cfg.wrapIndent\n * @param {boolean} cfg.disableWrapIndent\n * @returns {void}\n */\nconst checkAlignment = ({\n customSpacings,\n disableWrapIndent,\n indent,\n jsdoc,\n jsdocNode,\n preserveMainDescriptionPostDelimiter,\n report,\n tags,\n utils,\n wrapIndent,\n}) => {\n const transform = commentFlow(\n alignTransform({\n customSpacings,\n disableWrapIndent,\n indent,\n preserveMainDescriptionPostDelimiter,\n tags,\n wrapIndent,\n }),\n );\n const transformedJsdoc = transform(jsdoc);\n\n const comment = '/*' +\n /**\n * @type {import('eslint').Rule.Node & {\n * range: [number, number], value: string\n * }}\n */ (jsdocNode).value + '*/';\n\n const formatted = utils.stringify(transformedJsdoc)\n .trimStart();\n\n if (comment !== formatted) {\n report(\n 'Expected JSDoc block lines to be aligned.',\n /** @type {import('eslint').Rule.ReportFixer} */ (fixer) => {\n return fixer.replaceText(jsdocNode, formatted);\n },\n );\n }\n};\n\nexport default iterateJsdoc(({\n context,\n indent,\n jsdoc,\n jsdocNode,\n report,\n utils,\n}) => {\n const {\n customSpacings,\n disableWrapIndent = false,\n preserveMainDescriptionPostDelimiter,\n tags: applicableTags = [\n 'param', 'arg', 'argument', 'property', 'prop', 'returns', 'return', 'template',\n ],\n wrapIndent = '',\n } = context.options[1] || {};\n\n if (context.options[0] === 'always') {\n // Skip if it contains only a single line.\n if (!(\n /**\n * @type {import('eslint').Rule.Node & {\n * range: [number, number], value: string\n * }}\n */\n (jsdocNode).value.includes('\\n')\n )) {\n return;\n }\n\n checkAlignment({\n customSpacings,\n disableWrapIndent,\n indent,\n jsdoc,\n jsdocNode,\n preserveMainDescriptionPostDelimiter,\n report,\n tags: applicableTags,\n utils,\n wrapIndent,\n });\n\n return;\n }\n\n const foundTags = utils.getPresentTags(applicableTags);\n if (context.options[0] !== 'any') {\n for (const tag of foundTags) {\n checkNotAlignedPerTag(\n utils,\n /**\n * @type {import('comment-parser').Spec & {\n * line: import('../iterateJsdoc.js').Integer\n * }}\n */\n (tag),\n customSpacings,\n );\n }\n }\n\n for (const tag of foundTags) {\n if (tag.source.length > 1) {\n let idx = 0;\n for (const {\n tokens,\n // Avoid the tag line\n } of tag.source.slice(1)) {\n idx++;\n\n if (\n !tokens.description ||\n // Avoid first lines after multiline type\n tokens.type ||\n tokens.name\n ) {\n continue;\n }\n\n // Don't include a single separating space/tab\n if (!disableWrapIndent && tokens.postDelimiter.slice(1) !== wrapIndent) {\n utils.reportJSDoc('Expected wrap indent', {\n line: tag.source[0].number + idx,\n }, () => {\n tokens.postDelimiter = tokens.postDelimiter.charAt(0) + wrapIndent;\n });\n return;\n }\n }\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Reports invalid alignment of JSDoc block lines.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-line-alignment.md#repos-sticky-header',\n },\n fixable: 'whitespace',\n schema: [\n {\n enum: [\n 'always', 'never', 'any',\n ],\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n customSpacings: {\n additionalProperties: false,\n properties: {\n postDelimiter: {\n type: 'integer',\n },\n postHyphen: {\n type: 'integer',\n },\n postName: {\n type: 'integer',\n },\n postTag: {\n type: 'integer',\n },\n postType: {\n type: 'integer',\n },\n },\n },\n disableWrapIndent: {\n type: 'boolean',\n },\n preserveMainDescriptionPostDelimiter: {\n default: false,\n type: 'boolean',\n },\n tags: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n wrapIndent: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n type: 'layout',\n },\n});\n"],"mappings":";;;;;AAMA,MAAM,EACJ,MAAM,aACP,GAAG;;;;;;;;;;;;;;;;;AAmBJ,MAAM,wBAAwB,CAAC,OAAO,KAAK,mBAAmB;;;;;CAqB5D,IAAI;;CAEJ,IAAI;CACJ,MAAM,oBAAoB,MAAM,qBAAqB,IAAI,IAAI;AAC7D,KAAI,mBAAmB;EACrB,cAAc;GACZ;GAAiB;GAAW;GAAY;EACzC;EACD,eAAe;GACb;GAAO;GAAQ;GAAQ;EACxB;CACF,OAAM;EACL,cAAc;GACZ;GAAiB;GAAW;EAC7B;EACD,eAAe;GACb;GAAO;GAAQ;EAChB;CACF;CAED,MAAM,EACJ,QACD,GAAG,IAAI,OAAO;;;;;CAMf,MAAM,kBAAkB,CAAC,KAAK,YAAY;EACxC,MAAM,YAAY,MAAM;AAExB,SAAO,YAAY,MAAM,UAAU,CAAC,KAAK,CAAC,YAAY,aAAa;GACjE,MAAM,cAAc,aAAa,YAAY;GAE7C,MAAM,eAAe,OAAO;GAE5B,MAAM,MAAM;AAEZ,OAAI,SACF,QAAQ,CAAC,KAAK,YAAY;AAG5B,UAAO,QAAQ,WAAW,CAAC;EAC5B,EAAC;CACH;CAED,MAAM,oBAAoB,gBAAgB,cAAc;CACxD,MAAM,qBAAqB,IAAI,OAAO,CAAC,UAAU,EAAE,kBAAkB,CAAC,EAAE,kBAAkB,QAAQ,CAAC,EAAE;CACrG,MAAM,cAAc,CAAE,oBAAqB,KAAK,OAAO,YAAY;CACnE,MAAM,wBAAwB,mBAAmB,KAC/C,OAAO,YACR;CAMD,MAAM,KAAK,CAAC,YAAY,KAAK,CAAC,YAAY,QAA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