eslint-plugin-jsdoc 53.0.0 → 54.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 +35 -18
- package/dist/WarnSettings.cjs.map +1 -1
- package/dist/alignTransform.cjs +305 -224
- package/dist/alignTransform.cjs.map +1 -1
- package/dist/defaultTagOrder.cjs +43 -132
- package/dist/defaultTagOrder.cjs.map +1 -1
- package/dist/exportParser.cjs +696 -478
- package/dist/exportParser.cjs.map +1 -1
- package/dist/generateRule.cjs +242 -0
- package/dist/generateRule.cjs.map +1 -0
- package/dist/getDefaultTagStructureForMode.cjs +288 -184
- package/dist/getDefaultTagStructureForMode.cjs.map +1 -1
- package/dist/getJsdocProcessorPlugin.cjs +550 -364
- package/dist/getJsdocProcessorPlugin.cjs.map +1 -1
- package/dist/getJsdocProcessorPlugin.d.ts +65 -68
- package/dist/getJsdocProcessorPlugin.d.ts.map +1 -1
- package/dist/index.cjs +410 -2
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +17 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/iterateJsdoc.cjs +2005 -1528
- package/dist/iterateJsdoc.cjs.map +1 -1
- package/dist/iterateJsdoc.d.ts +350 -358
- package/dist/iterateJsdoc.d.ts.map +1 -1
- package/dist/jsdocUtils.cjs +1376 -1009
- package/dist/jsdocUtils.cjs.map +1 -1
- package/dist/rules/checkAccess.cjs +36 -29
- package/dist/rules/checkAccess.cjs.map +1 -1
- package/dist/rules/checkAlignment.cjs +54 -41
- package/dist/rules/checkAlignment.cjs.map +1 -1
- package/dist/rules/checkExamples.cjs +484 -327
- package/dist/rules/checkExamples.cjs.map +1 -1
- package/dist/rules/checkIndentation.cjs +65 -50
- package/dist/rules/checkIndentation.cjs.map +1 -1
- package/dist/rules/checkLineAlignment.cjs +311 -220
- package/dist/rules/checkLineAlignment.cjs.map +1 -1
- package/dist/rules/checkParamNames.cjs +335 -227
- package/dist/rules/checkParamNames.cjs.map +1 -1
- package/dist/rules/checkPropertyNames.cjs +106 -78
- package/dist/rules/checkPropertyNames.cjs.map +1 -1
- package/dist/rules/checkSyntax.cjs +34 -21
- package/dist/rules/checkSyntax.cjs.map +1 -1
- package/dist/rules/checkTagNames.cjs +210 -188
- package/dist/rules/checkTagNames.cjs.map +1 -1
- package/dist/rules/checkTemplateNames.cjs +178 -121
- package/dist/rules/checkTemplateNames.cjs.map +1 -1
- package/dist/rules/checkTypes.cjs +385 -291
- package/dist/rules/checkTypes.cjs.map +1 -1
- package/dist/rules/checkValues.cjs +146 -100
- package/dist/rules/checkValues.cjs.map +1 -1
- package/dist/rules/convertToJsdocComments.cjs +306 -228
- package/dist/rules/convertToJsdocComments.cjs.map +1 -1
- package/dist/rules/emptyTags.cjs +72 -62
- package/dist/rules/emptyTags.cjs.map +1 -1
- package/dist/rules/implementsOnClasses.cjs +56 -36
- package/dist/rules/implementsOnClasses.cjs.map +1 -1
- package/dist/rules/importsAsDependencies.cjs +99 -62
- package/dist/rules/importsAsDependencies.cjs.map +1 -1
- package/dist/rules/informativeDocs.cjs +142 -105
- package/dist/rules/informativeDocs.cjs.map +1 -1
- package/dist/rules/linesBeforeBlock.cjs +105 -70
- package/dist/rules/linesBeforeBlock.cjs.map +1 -1
- package/dist/rules/matchDescription.cjs +222 -160
- package/dist/rules/matchDescription.cjs.map +1 -1
- package/dist/rules/matchName.cjs +128 -73
- package/dist/rules/matchName.cjs.map +1 -1
- package/dist/rules/multilineBlocks.cjs +352 -235
- package/dist/rules/multilineBlocks.cjs.map +1 -1
- package/dist/rules/noBadBlocks.cjs +86 -63
- package/dist/rules/noBadBlocks.cjs.map +1 -1
- package/dist/rules/noBlankBlockDescriptions.cjs +57 -35
- package/dist/rules/noBlankBlockDescriptions.cjs.map +1 -1
- package/dist/rules/noBlankBlocks.cjs +48 -26
- package/dist/rules/noBlankBlocks.cjs.map +1 -1
- package/dist/rules/noDefaults.cjs +79 -52
- package/dist/rules/noDefaults.cjs.map +1 -1
- package/dist/rules/noMissingSyntax.cjs +165 -115
- package/dist/rules/noMissingSyntax.cjs.map +1 -1
- package/dist/rules/noMultiAsterisks.cjs +89 -48
- package/dist/rules/noMultiAsterisks.cjs.map +1 -1
- package/dist/rules/noRestrictedSyntax.cjs +79 -45
- package/dist/rules/noRestrictedSyntax.cjs.map +1 -1
- package/dist/rules/noTypes.cjs +80 -59
- package/dist/rules/noTypes.cjs.map +1 -1
- package/dist/rules/noUndefinedTypes.cjs +388 -297
- package/dist/rules/noUndefinedTypes.cjs.map +1 -1
- package/dist/rules/requireAsteriskPrefix.cjs +159 -108
- package/dist/rules/requireAsteriskPrefix.cjs.map +1 -1
- package/dist/rules/requireDescription.cjs +129 -89
- package/dist/rules/requireDescription.cjs.map +1 -1
- package/dist/rules/requireDescriptionCompleteSentence.cjs +262 -201
- package/dist/rules/requireDescriptionCompleteSentence.cjs.map +1 -1
- package/dist/rules/requireExample.cjs +104 -73
- package/dist/rules/requireExample.cjs.map +1 -1
- package/dist/rules/requireFileOverview.cjs +129 -75
- package/dist/rules/requireFileOverview.cjs.map +1 -1
- package/dist/rules/requireHyphenBeforeParamDescription.cjs +133 -85
- package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +1 -1
- package/dist/rules/requireJsdoc.cjs +557 -384
- package/dist/rules/requireJsdoc.cjs.map +1 -1
- package/dist/rules/requireParam.cjs +526 -336
- package/dist/rules/requireParam.cjs.map +1 -1
- package/dist/rules/requireParamDescription.cjs +80 -55
- package/dist/rules/requireParamDescription.cjs.map +1 -1
- package/dist/rules/requireParamName.cjs +50 -32
- package/dist/rules/requireParamName.cjs.map +1 -1
- package/dist/rules/requireParamType.cjs +80 -55
- package/dist/rules/requireParamType.cjs.map +1 -1
- package/dist/rules/requireProperty.cjs +42 -31
- package/dist/rules/requireProperty.cjs.map +1 -1
- package/dist/rules/requirePropertyDescription.cjs +25 -17
- package/dist/rules/requirePropertyDescription.cjs.map +1 -1
- package/dist/rules/requirePropertyName.cjs +25 -17
- package/dist/rules/requirePropertyName.cjs.map +1 -1
- package/dist/rules/requirePropertyType.cjs +25 -17
- package/dist/rules/requirePropertyType.cjs.map +1 -1
- package/dist/rules/requireReturns.cjs +203 -125
- package/dist/rules/requireReturns.cjs.map +1 -1
- package/dist/rules/requireReturnsCheck.cjs +103 -60
- package/dist/rules/requireReturnsCheck.cjs.map +1 -1
- package/dist/rules/requireReturnsDescription.cjs +54 -39
- package/dist/rules/requireReturnsDescription.cjs.map +1 -1
- package/dist/rules/requireReturnsType.cjs +50 -32
- package/dist/rules/requireReturnsType.cjs.map +1 -1
- package/dist/rules/requireTemplate.cjs +178 -119
- package/dist/rules/requireTemplate.cjs.map +1 -1
- package/dist/rules/requireThrows.cjs +95 -61
- package/dist/rules/requireThrows.cjs.map +1 -1
- package/dist/rules/requireYields.cjs +166 -106
- package/dist/rules/requireYields.cjs.map +1 -1
- package/dist/rules/requireYieldsCheck.cjs +152 -96
- package/dist/rules/requireYieldsCheck.cjs.map +1 -1
- package/dist/rules/sortTags.cjs +444 -258
- package/dist/rules/sortTags.cjs.map +1 -1
- package/dist/rules/tagLines.cjs +266 -179
- package/dist/rules/tagLines.cjs.map +1 -1
- package/dist/rules/textEscaping.cjs +127 -92
- package/dist/rules/textEscaping.cjs.map +1 -1
- package/dist/rules/validTypes.cjs +265 -252
- package/dist/rules/validTypes.cjs.map +1 -1
- package/dist/tagNames.cjs +170 -134
- package/dist/tagNames.cjs.map +1 -1
- package/dist/utils/hasReturnValue.cjs +474 -246
- package/dist/utils/hasReturnValue.cjs.map +1 -1
- package/package.json +24 -40
- package/src/WarnSettings.js +34 -0
- package/src/alignTransform.js +358 -0
- package/src/defaultTagOrder.js +169 -0
- package/src/exportParser.js +978 -0
- package/src/getDefaultTagStructureForMode.js +969 -0
- package/src/getJsdocProcessorPlugin.js +672 -0
- package/src/index.js +530 -0
- package/src/iterateJsdoc.js +2541 -0
- package/src/jsdocUtils.js +1896 -0
- package/src/rules/checkAccess.js +45 -0
- package/src/rules/checkAlignment.js +63 -0
- package/src/rules/checkExamples.js +589 -0
- package/src/rules/checkIndentation.js +75 -0
- package/src/rules/checkLineAlignment.js +372 -0
- package/src/rules/checkParamNames.js +474 -0
- package/src/rules/checkPropertyNames.js +152 -0
- package/src/rules/checkSyntax.js +30 -0
- package/src/rules/checkTagNames.js +314 -0
- package/src/rules/checkTemplateNames.js +204 -0
- package/src/rules/checkTypes.js +535 -0
- package/src/rules/checkValues.js +248 -0
- package/src/rules/convertToJsdocComments.js +398 -0
- package/src/rules/emptyTags.js +98 -0
- package/src/rules/implementsOnClasses.js +64 -0
- package/src/rules/importsAsDependencies.js +133 -0
- package/src/rules/informativeDocs.js +189 -0
- package/src/rules/linesBeforeBlock.js +134 -0
- package/src/rules/matchDescription.js +286 -0
- package/src/rules/matchName.js +151 -0
- package/src/rules/multilineBlocks.js +493 -0
- package/src/rules/noBadBlocks.js +119 -0
- package/src/rules/noBlankBlockDescriptions.js +69 -0
- package/src/rules/noBlankBlocks.js +53 -0
- package/src/rules/noDefaults.js +85 -0
- package/src/rules/noMissingSyntax.js +195 -0
- package/src/rules/noMultiAsterisks.js +134 -0
- package/src/rules/noRestrictedSyntax.js +91 -0
- package/src/rules/noTypes.js +93 -0
- package/src/rules/noUndefinedTypes.js +543 -0
- package/src/rules/requireAsteriskPrefix.js +190 -0
- package/src/rules/requireDescription.js +161 -0
- package/src/rules/requireDescriptionCompleteSentence.js +335 -0
- package/src/rules/requireExample.js +118 -0
- package/src/rules/requireFileOverview.js +154 -0
- package/src/rules/requireHyphenBeforeParamDescription.js +176 -0
- package/src/rules/requireJsdoc.js +743 -0
- package/src/rules/requireParam.js +602 -0
- package/src/rules/requireParamDescription.js +89 -0
- package/src/rules/requireParamName.js +55 -0
- package/src/rules/requireParamType.js +89 -0
- package/src/rules/requireProperty.js +48 -0
- package/src/rules/requirePropertyDescription.js +25 -0
- package/src/rules/requirePropertyName.js +25 -0
- package/src/rules/requirePropertyType.js +25 -0
- package/src/rules/requireReturns.js +238 -0
- package/src/rules/requireReturnsCheck.js +145 -0
- package/src/rules/requireReturnsDescription.js +59 -0
- package/src/rules/requireReturnsType.js +51 -0
- package/src/rules/requireTemplate.js +201 -0
- package/src/rules/requireThrows.js +111 -0
- package/src/rules/requireYields.js +216 -0
- package/src/rules/requireYieldsCheck.js +208 -0
- package/src/rules/sortTags.js +558 -0
- package/src/rules/tagLines.js +359 -0
- package/src/rules/textEscaping.js +154 -0
- package/src/rules/validTypes.js +401 -0
- package/src/tagNames.js +238 -0
- package/src/utils/hasReturnValue.js +572 -0
- package/dist/WarnSettings.js +0 -20
- package/dist/WarnSettings.js.map +0 -1
- package/dist/_virtual/rolldown_runtime.cjs +0 -32
- package/dist/_virtual/rolldown_runtime.js +0 -11
- package/dist/alignTransform.js +0 -241
- package/dist/alignTransform.js.map +0 -1
- package/dist/defaultTagOrder.js +0 -134
- package/dist/defaultTagOrder.js.map +0 -1
- package/dist/exportParser.js +0 -518
- package/dist/exportParser.js.map +0 -1
- package/dist/getDefaultTagStructureForMode.js +0 -188
- package/dist/getDefaultTagStructureForMode.js.map +0 -1
- package/dist/getJsdocProcessorPlugin.d.cts +0 -70
- package/dist/getJsdocProcessorPlugin.d.cts.map +0 -1
- package/dist/getJsdocProcessorPlugin.js +0 -383
- package/dist/getJsdocProcessorPlugin.js.map +0 -1
- package/dist/index.d.cts +0 -2
- package/dist/index.js +0 -3
- package/dist/iterateJsdoc.d.cts +0 -471
- package/dist/iterateJsdoc.d.cts.map +0 -1
- package/dist/iterateJsdoc.js +0 -1617
- package/dist/iterateJsdoc.js.map +0 -1
- package/dist/jsdocUtils.js +0 -1123
- package/dist/jsdocUtils.js.map +0 -1
- package/dist/plugin.cjs +0 -427
- package/dist/plugin.cjs.map +0 -1
- package/dist/plugin.js +0 -427
- package/dist/plugin.js.map +0 -1
- package/dist/rules/checkAccess.js +0 -33
- package/dist/rules/checkAccess.js.map +0 -1
- package/dist/rules/checkAlignment.js +0 -47
- package/dist/rules/checkAlignment.js.map +0 -1
- package/dist/rules/checkExamples.js +0 -348
- package/dist/rules/checkExamples.js.map +0 -1
- package/dist/rules/checkIndentation.js +0 -59
- package/dist/rules/checkIndentation.js.map +0 -1
- package/dist/rules/checkLineAlignment.js +0 -229
- package/dist/rules/checkLineAlignment.js.map +0 -1
- package/dist/rules/checkParamNames.js +0 -237
- package/dist/rules/checkParamNames.js.map +0 -1
- package/dist/rules/checkPropertyNames.js +0 -88
- package/dist/rules/checkPropertyNames.js.map +0 -1
- package/dist/rules/checkSyntax.js +0 -25
- package/dist/rules/checkSyntax.js.map +0 -1
- package/dist/rules/checkTagNames.js +0 -191
- package/dist/rules/checkTagNames.js.map +0 -1
- package/dist/rules/checkTemplateNames.js +0 -124
- package/dist/rules/checkTemplateNames.js.map +0 -1
- package/dist/rules/checkTypes.js +0 -299
- package/dist/rules/checkTypes.js.map +0 -1
- package/dist/rules/checkValues.js +0 -103
- package/dist/rules/checkValues.js.map +0 -1
- package/dist/rules/convertToJsdocComments.js +0 -231
- package/dist/rules/convertToJsdocComments.js.map +0 -1
- package/dist/rules/emptyTags.js +0 -67
- package/dist/rules/emptyTags.js.map +0 -1
- package/dist/rules/implementsOnClasses.js +0 -40
- package/dist/rules/implementsOnClasses.js.map +0 -1
- package/dist/rules/importsAsDependencies.js +0 -68
- package/dist/rules/importsAsDependencies.js.map +0 -1
- package/dist/rules/informativeDocs.js +0 -110
- package/dist/rules/informativeDocs.js.map +0 -1
- package/dist/rules/linesBeforeBlock.js +0 -75
- package/dist/rules/linesBeforeBlock.js.map +0 -1
- package/dist/rules/matchDescription.js +0 -167
- package/dist/rules/matchDescription.js.map +0 -1
- package/dist/rules/matchName.js +0 -77
- package/dist/rules/matchName.js.map +0 -1
- package/dist/rules/multilineBlocks.js +0 -245
- package/dist/rules/multilineBlocks.js.map +0 -1
- package/dist/rules/noBadBlocks.js +0 -68
- package/dist/rules/noBadBlocks.js.map +0 -1
- package/dist/rules/noBlankBlockDescriptions.js +0 -41
- package/dist/rules/noBlankBlockDescriptions.js.map +0 -1
- package/dist/rules/noBlankBlocks.js +0 -30
- package/dist/rules/noBlankBlocks.js.map +0 -1
- package/dist/rules/noDefaults.js +0 -56
- package/dist/rules/noDefaults.js.map +0 -1
- package/dist/rules/noMissingSyntax.js +0 -126
- package/dist/rules/noMissingSyntax.js.map +0 -1
- package/dist/rules/noMultiAsterisks.js +0 -58
- package/dist/rules/noMultiAsterisks.js.map +0 -1
- package/dist/rules/noRestrictedSyntax.js +0 -49
- package/dist/rules/noRestrictedSyntax.js.map +0 -1
- package/dist/rules/noTypes.js +0 -65
- package/dist/rules/noTypes.js.map +0 -1
- package/dist/rules/noUndefinedTypes.js +0 -303
- package/dist/rules/noUndefinedTypes.js.map +0 -1
- package/dist/rules/requireAsteriskPrefix.js +0 -112
- package/dist/rules/requireAsteriskPrefix.js.map +0 -1
- package/dist/rules/requireDescription.js +0 -95
- package/dist/rules/requireDescription.js.map +0 -1
- package/dist/rules/requireDescriptionCompleteSentence.js +0 -220
- package/dist/rules/requireDescriptionCompleteSentence.js.map +0 -1
- package/dist/rules/requireExample.js +0 -77
- package/dist/rules/requireExample.js.map +0 -1
- package/dist/rules/requireFileOverview.js +0 -81
- package/dist/rules/requireFileOverview.js.map +0 -1
- package/dist/rules/requireHyphenBeforeParamDescription.js +0 -89
- package/dist/rules/requireHyphenBeforeParamDescription.js.map +0 -1
- package/dist/rules/requireJsdoc.js +0 -404
- package/dist/rules/requireJsdoc.js.map +0 -1
- package/dist/rules/requireParam.js +0 -344
- package/dist/rules/requireParam.js.map +0 -1
- package/dist/rules/requireParamDescription.js +0 -59
- package/dist/rules/requireParamDescription.js.map +0 -1
- package/dist/rules/requireParamName.js +0 -36
- package/dist/rules/requireParamName.js.map +0 -1
- package/dist/rules/requireParamType.js +0 -59
- package/dist/rules/requireParamType.js.map +0 -1
- package/dist/rules/requireProperty.js +0 -35
- package/dist/rules/requireProperty.js.map +0 -1
- package/dist/rules/requirePropertyDescription.js +0 -21
- package/dist/rules/requirePropertyDescription.js.map +0 -1
- package/dist/rules/requirePropertyName.js +0 -21
- package/dist/rules/requirePropertyName.js.map +0 -1
- package/dist/rules/requirePropertyType.js +0 -21
- package/dist/rules/requirePropertyType.js.map +0 -1
- package/dist/rules/requireReturns.js +0 -131
- package/dist/rules/requireReturns.js.map +0 -1
- package/dist/rules/requireReturnsCheck.js +0 -66
- package/dist/rules/requireReturnsCheck.js.map +0 -1
- package/dist/rules/requireReturnsDescription.js +0 -43
- package/dist/rules/requireReturnsDescription.js.map +0 -1
- package/dist/rules/requireReturnsType.js +0 -36
- package/dist/rules/requireReturnsType.js.map +0 -1
- package/dist/rules/requireTemplate.js +0 -122
- package/dist/rules/requireTemplate.js.map +0 -1
- package/dist/rules/requireThrows.js +0 -67
- package/dist/rules/requireThrows.js.map +0 -1
- package/dist/rules/requireYields.js +0 -115
- package/dist/rules/requireYields.js.map +0 -1
- package/dist/rules/requireYieldsCheck.js +0 -105
- package/dist/rules/requireYieldsCheck.js.map +0 -1
- package/dist/rules/sortTags.js +0 -262
- package/dist/rules/sortTags.js.map +0 -1
- package/dist/rules/tagLines.js +0 -183
- package/dist/rules/tagLines.js.map +0 -1
- package/dist/rules/textEscaping.js +0 -102
- package/dist/rules/textEscaping.js.map +0 -1
- package/dist/rules/validTypes.js +0 -259
- package/dist/rules/validTypes.js.map +0 -1
- package/dist/tagNames.js +0 -144
- package/dist/tagNames.js.map +0 -1
- package/dist/utils/hasReturnValue.js +0 -265
- package/dist/utils/hasReturnValue.js.map +0 -1
package/dist/iterateJsdoc.d.ts
CHANGED
|
@@ -1,412 +1,405 @@
|
|
|
1
|
-
import * as _es_joy_jsdoccomment0 from "@es-joy/jsdoccomment";
|
|
2
|
-
import { parseComment } from "@es-joy/jsdoccomment";
|
|
3
|
-
import * as comment_parser0 from "comment-parser";
|
|
4
|
-
import * as eslint0 from "eslint";
|
|
5
|
-
import * as __jsdocUtils_js0 from "./jsdocUtils.js";
|
|
6
|
-
import * as __getDefaultTagStructureForMode_js0 from "./getDefaultTagStructureForMode.js";
|
|
7
|
-
import * as estree0 from "estree";
|
|
8
|
-
|
|
9
|
-
//#region src/iterateJsdoc.d.ts
|
|
10
1
|
/**
|
|
11
2
|
* @param {JsdocVisitor} iterator
|
|
12
3
|
* @param {RuleConfig} ruleConfig
|
|
13
4
|
* @returns {import('eslint').Rule.RuleModule}
|
|
14
5
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
type
|
|
18
|
-
type
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
6
|
+
export default function iterateJsdoc(iterator: JsdocVisitor, ruleConfig: RuleConfig): import("eslint").Rule.RuleModule;
|
|
7
|
+
export { parseComment } from "@es-joy/jsdoccomment";
|
|
8
|
+
export type Integer = number;
|
|
9
|
+
export type JsdocBlockWithInline = import("@es-joy/jsdoccomment").JsdocBlockWithInline;
|
|
10
|
+
export type ContextObject = {
|
|
11
|
+
disallowName?: string;
|
|
12
|
+
allowName?: string;
|
|
13
|
+
context?: string;
|
|
14
|
+
comment?: string;
|
|
15
|
+
tags?: string[];
|
|
16
|
+
replacement?: string;
|
|
17
|
+
minimum?: Integer;
|
|
18
|
+
message?: string;
|
|
19
|
+
forceRequireReturn?: boolean;
|
|
28
20
|
};
|
|
29
|
-
type Context = string | ContextObject;
|
|
30
|
-
type CheckJsdoc = (info: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, handler: null | ((jsdoc:
|
|
36
|
-
type ForEachPreferredTag = (tagName: string, arrayHandler: (matchingJsdocTag:
|
|
37
|
-
type ReportSettings = (message: string) => void;
|
|
38
|
-
type ParseClosureTemplateTag = (tag:
|
|
39
|
-
type GetPreferredTagNameObject = (cfg: {
|
|
40
|
-
|
|
21
|
+
export type Context = string | ContextObject;
|
|
22
|
+
export type CheckJsdoc = (info: {
|
|
23
|
+
lastIndex?: Integer;
|
|
24
|
+
isFunctionContext?: boolean;
|
|
25
|
+
selector?: string;
|
|
26
|
+
comment?: string;
|
|
27
|
+
}, handler: null | ((jsdoc: import("@es-joy/jsdoccomment").JsdocBlockWithInline) => boolean | undefined), node: import("eslint").Rule.Node) => void;
|
|
28
|
+
export type ForEachPreferredTag = (tagName: string, arrayHandler: (matchingJsdocTag: import("@es-joy/jsdoccomment").JsdocTagWithInline, targetTagName: string) => void, skipReportingBlockedTag?: boolean | undefined) => void;
|
|
29
|
+
export type ReportSettings = (message: string) => void;
|
|
30
|
+
export type ParseClosureTemplateTag = (tag: import("comment-parser").Spec) => string[];
|
|
31
|
+
export type GetPreferredTagNameObject = (cfg: {
|
|
32
|
+
tagName: string;
|
|
41
33
|
}) => string | false | {
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
message: string;
|
|
35
|
+
replacement?: string | undefined;
|
|
44
36
|
} | {
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
blocked: true;
|
|
38
|
+
tagName: string;
|
|
47
39
|
};
|
|
48
|
-
type BasicUtils = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
40
|
+
export type BasicUtils = {
|
|
41
|
+
forEachPreferredTag: ForEachPreferredTag;
|
|
42
|
+
reportSettings: ReportSettings;
|
|
43
|
+
parseClosureTemplateTag: ParseClosureTemplateTag;
|
|
44
|
+
getPreferredTagNameObject: GetPreferredTagNameObject;
|
|
45
|
+
pathDoesNotBeginWith: import("./jsdocUtils.js").PathDoesNotBeginWith;
|
|
54
46
|
};
|
|
55
|
-
type IsIteratingFunction = () => boolean;
|
|
56
|
-
type IsVirtualFunction = () => boolean;
|
|
57
|
-
type Stringify = (tagBlock:
|
|
58
|
-
type ReportJSDoc = (msg: string, tag?:
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
export type IsIteratingFunction = () => boolean;
|
|
48
|
+
export type IsVirtualFunction = () => boolean;
|
|
49
|
+
export type Stringify = (tagBlock: import("comment-parser").Block, specRewire?: boolean | undefined) => string;
|
|
50
|
+
export type ReportJSDoc = (msg: string, tag?: import("comment-parser").Spec | {
|
|
51
|
+
line: Integer;
|
|
52
|
+
column?: Integer;
|
|
61
53
|
} | null | undefined, handler?: (() => void) | null | undefined, specRewire?: boolean | undefined, data?: undefined | {
|
|
62
|
-
|
|
54
|
+
[key: string]: string;
|
|
63
55
|
}) => any;
|
|
64
|
-
type GetRegexFromString = (str: string, requiredFlags?: string | undefined) => RegExp;
|
|
65
|
-
type GetTagDescription = (tg:
|
|
66
|
-
type SetTagDescription = (tg:
|
|
67
|
-
type GetDescription = () => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
56
|
+
export type GetRegexFromString = (str: string, requiredFlags?: string | undefined) => RegExp;
|
|
57
|
+
export type GetTagDescription = (tg: import("comment-parser").Spec, returnArray?: boolean | undefined) => string[] | string;
|
|
58
|
+
export type SetTagDescription = (tg: import("comment-parser").Spec, matcher: RegExp, setter: (description: string) => string) => Integer;
|
|
59
|
+
export type GetDescription = () => {
|
|
60
|
+
description: string;
|
|
61
|
+
descriptions: string[];
|
|
62
|
+
lastDescriptionLine: Integer;
|
|
71
63
|
};
|
|
72
|
-
type SetBlockDescription = (setter: (info: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}, seedTokens: (tokens?: Partial<
|
|
77
|
-
type SetDescriptionLines = (matcher: RegExp, setter: (description: string) => string) => Integer;
|
|
78
|
-
type ChangeTag = (tag:
|
|
79
|
-
type SetTag = (tag:
|
|
80
|
-
|
|
81
|
-
}, tokens?: Partial<
|
|
82
|
-
type RemoveTag = (tagIndex: Integer, cfg?: {
|
|
83
|
-
|
|
84
|
-
|
|
64
|
+
export type SetBlockDescription = (setter: (info: {
|
|
65
|
+
delimiter: string;
|
|
66
|
+
postDelimiter: string;
|
|
67
|
+
start: string;
|
|
68
|
+
}, seedTokens: (tokens?: Partial<import("comment-parser").Tokens>) => import("comment-parser").Tokens, descLines: string[]) => import("comment-parser").Line[]) => void;
|
|
69
|
+
export type SetDescriptionLines = (matcher: RegExp, setter: (description: string) => string) => Integer;
|
|
70
|
+
export type ChangeTag = (tag: import("comment-parser").Spec, ...tokens: Partial<import("comment-parser").Tokens>[]) => void;
|
|
71
|
+
export type SetTag = (tag: import("comment-parser").Spec & {
|
|
72
|
+
line: Integer;
|
|
73
|
+
}, tokens?: Partial<import("comment-parser").Tokens> | undefined) => void;
|
|
74
|
+
export type RemoveTag = (tagIndex: Integer, cfg?: {
|
|
75
|
+
removeEmptyBlock?: boolean;
|
|
76
|
+
tagSourceOffset?: Integer;
|
|
85
77
|
} | undefined) => void;
|
|
86
|
-
type AddTag = (targetTagName: string, number?: number | undefined, tokens?: {} |
|
|
87
|
-
type GetFirstLine = () => Integer | undefined;
|
|
88
|
-
type SeedTokens = (tokens?: Partial<
|
|
78
|
+
export type AddTag = (targetTagName: string, number?: number | undefined, tokens?: {} | import("comment-parser").Tokens | undefined) => void;
|
|
79
|
+
export type GetFirstLine = () => Integer | undefined;
|
|
80
|
+
export type SeedTokens = (tokens?: Partial<import("comment-parser").Tokens> | undefined) => import("comment-parser").Tokens;
|
|
89
81
|
/**
|
|
90
82
|
* Sets tokens to empty string.
|
|
91
83
|
*/
|
|
92
|
-
type EmptyTokens = (tokens:
|
|
93
|
-
type AddLine = (sourceIndex: Integer, tokens: Partial<
|
|
94
|
-
type AddLines = (tagIndex: Integer, tagSourceOffset: Integer, numLines: Integer) => void;
|
|
95
|
-
type MakeMultiline = () => void;
|
|
96
|
-
type GetFunctionParameterNames = (useDefaultObjectProperties?: boolean | undefined) =>
|
|
97
|
-
type HasParams = () => Integer;
|
|
98
|
-
type IsGenerator = () => boolean;
|
|
99
|
-
type IsConstructor = () => boolean;
|
|
100
|
-
type GetJsdocTagsDeep = (tagName: string) => false | {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
84
|
+
export type EmptyTokens = (tokens: import("comment-parser").Tokens) => void;
|
|
85
|
+
export type AddLine = (sourceIndex: Integer, tokens: Partial<import("comment-parser").Tokens>) => void;
|
|
86
|
+
export type AddLines = (tagIndex: Integer, tagSourceOffset: Integer, numLines: Integer) => void;
|
|
87
|
+
export type MakeMultiline = () => void;
|
|
88
|
+
export type GetFunctionParameterNames = (useDefaultObjectProperties?: boolean | undefined) => import("./jsdocUtils.js").ParamNameInfo[];
|
|
89
|
+
export type HasParams = () => Integer;
|
|
90
|
+
export type IsGenerator = () => boolean;
|
|
91
|
+
export type IsConstructor = () => boolean;
|
|
92
|
+
export type GetJsdocTagsDeep = (tagName: string) => false | {
|
|
93
|
+
idx: Integer;
|
|
94
|
+
name: string;
|
|
95
|
+
type: string;
|
|
104
96
|
}[];
|
|
105
|
-
type GetPreferredTagName = (cfg: {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
97
|
+
export type GetPreferredTagName = (cfg: {
|
|
98
|
+
tagName: string;
|
|
99
|
+
skipReportingBlockedTag?: boolean;
|
|
100
|
+
allowObjectReturn?: boolean;
|
|
101
|
+
defaultMessage?: string;
|
|
110
102
|
}) => string | undefined | false | {
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
message: string;
|
|
104
|
+
replacement?: string | undefined;
|
|
113
105
|
} | {
|
|
114
|
-
|
|
115
|
-
|
|
106
|
+
blocked: true;
|
|
107
|
+
tagName: string;
|
|
116
108
|
};
|
|
117
|
-
type IsValidTag = (name: string, definedTags: string[]) => boolean;
|
|
118
|
-
type HasATag = (names: string[]) => boolean;
|
|
119
|
-
type HasTag = (name: string) => boolean;
|
|
120
|
-
type ComparePaths = (name: string) => (otherPathName: string) => boolean;
|
|
121
|
-
type DropPathSegmentQuotes = (name: string) => string;
|
|
122
|
-
type AvoidDocs = () => boolean;
|
|
123
|
-
type TagMightHaveNamePositionTypePosition = (tagName: string, otherModeMaps?:
|
|
124
|
-
|
|
109
|
+
export type IsValidTag = (name: string, definedTags: string[]) => boolean;
|
|
110
|
+
export type HasATag = (names: string[]) => boolean;
|
|
111
|
+
export type HasTag = (name: string) => boolean;
|
|
112
|
+
export type ComparePaths = (name: string) => (otherPathName: string) => boolean;
|
|
113
|
+
export type DropPathSegmentQuotes = (name: string) => string;
|
|
114
|
+
export type AvoidDocs = () => boolean;
|
|
115
|
+
export type TagMightHaveNamePositionTypePosition = (tagName: string, otherModeMaps?: import("./getDefaultTagStructureForMode.js").TagStructure[] | undefined) => boolean | {
|
|
116
|
+
otherMode: true;
|
|
125
117
|
};
|
|
126
|
-
type TagMustHave = (tagName: string, otherModeMaps:
|
|
127
|
-
|
|
118
|
+
export type TagMustHave = (tagName: string, otherModeMaps: import("./getDefaultTagStructureForMode.js").TagStructure[]) => boolean | {
|
|
119
|
+
otherMode: false;
|
|
128
120
|
};
|
|
129
|
-
type TagMissingRequiredTypeOrNamepath = (tag:
|
|
130
|
-
|
|
121
|
+
export type TagMissingRequiredTypeOrNamepath = (tag: import("comment-parser").Spec, otherModeMaps: import("./getDefaultTagStructureForMode.js").TagStructure[]) => boolean | {
|
|
122
|
+
otherMode: false;
|
|
131
123
|
};
|
|
132
|
-
type IsNamepathX = (tagName: string) => boolean;
|
|
133
|
-
type GetTagStructureForMode = (mde:
|
|
134
|
-
type MayBeUndefinedTypeTag = (tag:
|
|
135
|
-
type HasValueOrExecutorHasNonEmptyResolveValue = (anyPromiseAsReturn: boolean, allBranches?: boolean | undefined) => boolean;
|
|
136
|
-
type HasYieldValue = () => boolean;
|
|
137
|
-
type HasYieldReturnValue = () => boolean;
|
|
138
|
-
type HasThrowValue = () => boolean;
|
|
139
|
-
type IsAsync = () => boolean | undefined;
|
|
140
|
-
type GetTags = (tagName: string) =>
|
|
141
|
-
type GetPresentTags = (tagList: string[]) =>
|
|
142
|
-
type FilterTags = (filter: (tag:
|
|
143
|
-
type FilterAllTags = (filter: (tag: (
|
|
144
|
-
type GetTagsByType = (tags:
|
|
145
|
-
|
|
146
|
-
|
|
124
|
+
export type IsNamepathX = (tagName: string) => boolean;
|
|
125
|
+
export type GetTagStructureForMode = (mde: import("./jsdocUtils.js").ParserMode) => import("./getDefaultTagStructureForMode.js").TagStructure;
|
|
126
|
+
export type MayBeUndefinedTypeTag = (tag: import("comment-parser").Spec) => boolean;
|
|
127
|
+
export type HasValueOrExecutorHasNonEmptyResolveValue = (anyPromiseAsReturn: boolean, allBranches?: boolean | undefined) => boolean;
|
|
128
|
+
export type HasYieldValue = () => boolean;
|
|
129
|
+
export type HasYieldReturnValue = () => boolean;
|
|
130
|
+
export type HasThrowValue = () => boolean;
|
|
131
|
+
export type IsAsync = () => boolean | undefined;
|
|
132
|
+
export type GetTags = (tagName: string) => import("comment-parser").Spec[];
|
|
133
|
+
export type GetPresentTags = (tagList: string[]) => import("@es-joy/jsdoccomment").JsdocTagWithInline[];
|
|
134
|
+
export type FilterTags = (filter: (tag: import("@es-joy/jsdoccomment").JsdocTagWithInline) => boolean) => import("@es-joy/jsdoccomment").JsdocTagWithInline[];
|
|
135
|
+
export type FilterAllTags = (filter: (tag: (import("comment-parser").Spec | import("@es-joy/jsdoccomment").JsdocInlineTagNoType)) => boolean) => (import("comment-parser").Spec | import("@es-joy/jsdoccomment").JsdocInlineTagNoType)[];
|
|
136
|
+
export type GetTagsByType = (tags: import("comment-parser").Spec[]) => {
|
|
137
|
+
tagsWithNames: import("comment-parser").Spec[];
|
|
138
|
+
tagsWithoutNames: import("comment-parser").Spec[];
|
|
147
139
|
};
|
|
148
|
-
type HasOptionTag = (tagName: string) => boolean;
|
|
149
|
-
type GetClassNode = () => Node | null;
|
|
150
|
-
type GetClassJsdoc = () => null | JsdocBlockWithInline;
|
|
151
|
-
type ClassHasTag = (tagName: string) => boolean;
|
|
152
|
-
type FindContext = (contexts: Context[], comment: string | undefined) => {
|
|
153
|
-
|
|
154
|
-
|
|
140
|
+
export type HasOptionTag = (tagName: string) => boolean;
|
|
141
|
+
export type GetClassNode = () => Node | null;
|
|
142
|
+
export type GetClassJsdoc = () => null | JsdocBlockWithInline;
|
|
143
|
+
export type ClassHasTag = (tagName: string) => boolean;
|
|
144
|
+
export type FindContext = (contexts: Context[], comment: string | undefined) => {
|
|
145
|
+
foundContext: Context | undefined;
|
|
146
|
+
contextStr: string;
|
|
155
147
|
};
|
|
156
|
-
type Utils = BasicUtils & {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
148
|
+
export type Utils = BasicUtils & {
|
|
149
|
+
isIteratingFunction: IsIteratingFunction;
|
|
150
|
+
isIteratingFunctionOrVariable: IsIteratingFunction;
|
|
151
|
+
isVirtualFunction: IsVirtualFunction;
|
|
152
|
+
stringify: Stringify;
|
|
153
|
+
reportJSDoc: ReportJSDoc;
|
|
154
|
+
getRegexFromString: GetRegexFromString;
|
|
155
|
+
getTagDescription: GetTagDescription;
|
|
156
|
+
setTagDescription: SetTagDescription;
|
|
157
|
+
getDescription: GetDescription;
|
|
158
|
+
setBlockDescription: SetBlockDescription;
|
|
159
|
+
setDescriptionLines: SetDescriptionLines;
|
|
160
|
+
changeTag: ChangeTag;
|
|
161
|
+
setTag: SetTag;
|
|
162
|
+
removeTag: RemoveTag;
|
|
163
|
+
addTag: AddTag;
|
|
164
|
+
getFirstLine: GetFirstLine;
|
|
165
|
+
seedTokens: SeedTokens;
|
|
166
|
+
emptyTokens: EmptyTokens;
|
|
167
|
+
addLine: AddLine;
|
|
168
|
+
addLines: AddLines;
|
|
169
|
+
makeMultiline: MakeMultiline;
|
|
170
|
+
flattenRoots: import("./jsdocUtils.js").FlattenRoots;
|
|
171
|
+
getFunctionParameterNames: GetFunctionParameterNames;
|
|
172
|
+
hasParams: HasParams;
|
|
173
|
+
isGenerator: IsGenerator;
|
|
174
|
+
isConstructor: IsConstructor;
|
|
175
|
+
getJsdocTagsDeep: GetJsdocTagsDeep;
|
|
176
|
+
getPreferredTagName: GetPreferredTagName;
|
|
177
|
+
isValidTag: IsValidTag;
|
|
178
|
+
hasATag: HasATag;
|
|
179
|
+
hasTag: HasTag;
|
|
180
|
+
comparePaths: ComparePaths;
|
|
181
|
+
dropPathSegmentQuotes: DropPathSegmentQuotes;
|
|
182
|
+
avoidDocs: AvoidDocs;
|
|
183
|
+
tagMightHaveNamePosition: TagMightHaveNamePositionTypePosition;
|
|
184
|
+
tagMightHaveTypePosition: TagMightHaveNamePositionTypePosition;
|
|
185
|
+
tagMustHaveNamePosition: TagMustHave;
|
|
186
|
+
tagMustHaveTypePosition: TagMustHave;
|
|
187
|
+
tagMissingRequiredTypeOrNamepath: TagMissingRequiredTypeOrNamepath;
|
|
188
|
+
isNamepathDefiningTag: IsNamepathX;
|
|
189
|
+
isNamepathReferencingTag: IsNamepathX;
|
|
190
|
+
isNamepathOrUrlReferencingTag: IsNamepathX;
|
|
191
|
+
tagMightHaveNamepath: IsNamepathX;
|
|
192
|
+
getTagStructureForMode: GetTagStructureForMode;
|
|
193
|
+
mayBeUndefinedTypeTag: MayBeUndefinedTypeTag;
|
|
194
|
+
hasValueOrExecutorHasNonEmptyResolveValue: HasValueOrExecutorHasNonEmptyResolveValue;
|
|
195
|
+
hasYieldValue: HasYieldValue;
|
|
196
|
+
hasYieldReturnValue: HasYieldReturnValue;
|
|
197
|
+
hasThrowValue: HasThrowValue;
|
|
198
|
+
isAsync: IsAsync;
|
|
199
|
+
getTags: GetTags;
|
|
200
|
+
getPresentTags: GetPresentTags;
|
|
201
|
+
filterTags: FilterTags;
|
|
202
|
+
filterAllTags: FilterAllTags;
|
|
203
|
+
getTagsByType: GetTagsByType;
|
|
204
|
+
hasOptionTag: HasOptionTag;
|
|
205
|
+
getClassNode: GetClassNode;
|
|
206
|
+
getClassJsdoc: GetClassJsdoc;
|
|
207
|
+
classHasTag: ClassHasTag;
|
|
208
|
+
findContext: FindContext;
|
|
216
209
|
};
|
|
217
210
|
/**
|
|
218
211
|
* Should use ESLint rule's typing.
|
|
219
212
|
*/
|
|
220
|
-
type EslintRuleMeta =
|
|
213
|
+
export type EslintRuleMeta = import("eslint").Rule.RuleMetaData;
|
|
221
214
|
/**
|
|
222
215
|
* A plain object for tracking state as needed by rules across iterations.
|
|
223
216
|
*/
|
|
224
|
-
type StateObject = {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
217
|
+
export type StateObject = {
|
|
218
|
+
globalTags: {};
|
|
219
|
+
hasDuplicates: {
|
|
220
|
+
[key: string]: boolean;
|
|
221
|
+
};
|
|
222
|
+
selectorMap: {
|
|
223
|
+
[selector: string]: {
|
|
224
|
+
[comment: string]: Integer;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
hasTag: {
|
|
228
|
+
[key: string]: boolean;
|
|
229
|
+
};
|
|
230
|
+
hasNonComment: number;
|
|
231
|
+
hasNonCommentBeforeTag: {
|
|
232
|
+
[key: string]: boolean | number;
|
|
232
233
|
};
|
|
233
|
-
};
|
|
234
|
-
hasTag: {
|
|
235
|
-
[key: string]: boolean;
|
|
236
|
-
};
|
|
237
|
-
hasNonComment: number;
|
|
238
|
-
hasNonCommentBeforeTag: {
|
|
239
|
-
[key: string]: boolean | number;
|
|
240
|
-
};
|
|
241
234
|
};
|
|
242
235
|
/**
|
|
243
236
|
* The Node AST as supplied by the parser.
|
|
244
237
|
*/
|
|
245
|
-
type Node =
|
|
246
|
-
type Report = (message: string, fix?:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
} | (
|
|
250
|
-
|
|
238
|
+
export type Node = import("eslint").Rule.Node;
|
|
239
|
+
export type Report = (message: string, fix?: import("eslint").Rule.ReportFixer | null | undefined, jsdocLoc?: {
|
|
240
|
+
line?: Integer;
|
|
241
|
+
column?: Integer;
|
|
242
|
+
} | (import("comment-parser").Spec & {
|
|
243
|
+
line?: Integer;
|
|
251
244
|
}) | null | undefined, data?: undefined | {
|
|
252
|
-
|
|
245
|
+
[key: string]: string;
|
|
253
246
|
}) => void;
|
|
254
|
-
type PreferredTypes = {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
247
|
+
export type PreferredTypes = {
|
|
248
|
+
[key: string]: false | string | {
|
|
249
|
+
message: string;
|
|
250
|
+
replacement?: false | string;
|
|
251
|
+
skipRootChecking?: boolean;
|
|
252
|
+
};
|
|
260
253
|
};
|
|
261
|
-
type StructuredTags = {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
254
|
+
export type StructuredTags = {
|
|
255
|
+
[key: string]: {
|
|
256
|
+
name?: "text" | "namepath-defining" | "namepath-referencing" | false;
|
|
257
|
+
type?: boolean | string[];
|
|
258
|
+
required?: ("name" | "type" | "typeOrNameRequired")[];
|
|
259
|
+
};
|
|
267
260
|
};
|
|
268
261
|
/**
|
|
269
262
|
* Settings from ESLint types.
|
|
270
263
|
*/
|
|
271
|
-
type Settings = {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
264
|
+
export type Settings = {
|
|
265
|
+
maxLines: Integer;
|
|
266
|
+
minLines: Integer;
|
|
267
|
+
tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
|
|
268
|
+
mode: import("./jsdocUtils.js").ParserMode;
|
|
269
|
+
preferredTypes: PreferredTypes;
|
|
270
|
+
structuredTags: StructuredTags;
|
|
271
|
+
[name: string]: any;
|
|
272
|
+
contexts?: Context[];
|
|
280
273
|
};
|
|
281
|
-
type JSDocSettings = {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
274
|
+
export type JSDocSettings = {
|
|
275
|
+
settings?: {
|
|
276
|
+
jsdoc?: {
|
|
277
|
+
ignorePrivate: boolean;
|
|
278
|
+
ignoreInternal: boolean;
|
|
279
|
+
maxLines: Integer;
|
|
280
|
+
minLines: Integer;
|
|
281
|
+
tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
|
|
282
|
+
preferredTypes: PreferredTypes;
|
|
283
|
+
structuredTags: StructuredTags;
|
|
284
|
+
overrideReplacesDocs: boolean;
|
|
285
|
+
ignoreReplacesDocs: boolean;
|
|
286
|
+
implementsReplacesDocs: boolean;
|
|
287
|
+
augmentsExtendsReplacesDocs: boolean;
|
|
288
|
+
exemptDestructuredRootsFromChecks: boolean;
|
|
289
|
+
mode: import("./jsdocUtils.js").ParserMode;
|
|
290
|
+
contexts: Context[];
|
|
291
|
+
};
|
|
298
292
|
};
|
|
299
|
-
};
|
|
300
293
|
};
|
|
301
294
|
/**
|
|
302
295
|
* Create the report function
|
|
303
296
|
*/
|
|
304
|
-
type MakeReport = (context:
|
|
305
|
-
type JsdocVisitorBasic = (arg: {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}) => any;
|
|
326
|
-
type JsdocVisitor = (arg: {
|
|
327
|
-
context: eslint0.Rule.RuleContext;
|
|
328
|
-
sourceCode: eslint0.SourceCode;
|
|
329
|
-
indent: string;
|
|
330
|
-
info: {
|
|
331
|
-
comment?: string | undefined;
|
|
332
|
-
lastIndex?: Integer | undefined;
|
|
333
|
-
};
|
|
334
|
-
state: StateObject;
|
|
335
|
-
globalState: Map<string, Map<string, string>>;
|
|
336
|
-
jsdoc: JsdocBlockWithInline;
|
|
337
|
-
jsdocNode: eslint0.Rule.Node & {
|
|
338
|
-
range: [number, number];
|
|
339
|
-
};
|
|
340
|
-
node: Node | null;
|
|
341
|
-
allComments?: estree0.Node[];
|
|
342
|
-
report: Report;
|
|
343
|
-
makeReport?: MakeReport;
|
|
344
|
-
settings: Settings;
|
|
345
|
-
utils: Utils;
|
|
297
|
+
export type MakeReport = (context: import("eslint").Rule.RuleContext, commentNode: import("estree").Node) => Report;
|
|
298
|
+
export type JsdocVisitorBasic = (arg: {
|
|
299
|
+
context: import("eslint").Rule.RuleContext;
|
|
300
|
+
sourceCode: import("eslint").SourceCode;
|
|
301
|
+
indent?: string;
|
|
302
|
+
info?: {
|
|
303
|
+
comment?: string | undefined;
|
|
304
|
+
lastIndex?: Integer | undefined;
|
|
305
|
+
};
|
|
306
|
+
state?: StateObject;
|
|
307
|
+
globalState?: Map<string, Map<string, string>>;
|
|
308
|
+
jsdoc?: JsdocBlockWithInline;
|
|
309
|
+
jsdocNode?: import("eslint").Rule.Node & {
|
|
310
|
+
range: [number, number];
|
|
311
|
+
};
|
|
312
|
+
node?: Node;
|
|
313
|
+
allComments?: import("estree").Node[];
|
|
314
|
+
report?: Report;
|
|
315
|
+
makeReport?: MakeReport;
|
|
316
|
+
settings: Settings;
|
|
317
|
+
utils: BasicUtils;
|
|
346
318
|
}) => any;
|
|
347
|
-
type
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
* ESLint rule meta
|
|
356
|
-
*/
|
|
357
|
-
meta: EslintRuleMeta;
|
|
358
|
-
/**
|
|
359
|
-
* Any default contexts
|
|
360
|
-
*/
|
|
361
|
-
contextDefaults?: __jsdocUtils_js0.DefaultContexts | undefined;
|
|
362
|
-
/**
|
|
363
|
-
* Whether to force a `contexts` check
|
|
364
|
-
*/
|
|
365
|
-
contextSelected?: true | undefined;
|
|
366
|
-
/**
|
|
367
|
-
* Whether to iterate all JSDoc blocks by default
|
|
368
|
-
* regardless of context
|
|
369
|
-
*/
|
|
370
|
-
iterateAllJsdocs?: true | undefined;
|
|
371
|
-
/**
|
|
372
|
-
* Whether to check `@private` blocks (normally exempted)
|
|
373
|
-
*/
|
|
374
|
-
checkPrivate?: true | undefined;
|
|
375
|
-
/**
|
|
376
|
-
* Whether to check `@internal` blocks (normally exempted)
|
|
377
|
-
*/
|
|
378
|
-
checkInternal?: true | undefined;
|
|
379
|
-
/**
|
|
380
|
-
* Whether to iterates over all JSDoc blocks regardless of attachment
|
|
381
|
-
*/
|
|
382
|
-
checkFile?: true | undefined;
|
|
383
|
-
/**
|
|
384
|
-
* Whether to avoid relying on settings for global contexts
|
|
385
|
-
*/
|
|
386
|
-
nonGlobalSettings?: true | undefined;
|
|
387
|
-
/**
|
|
388
|
-
* Whether to disable the tracking of visited comment nodes (as
|
|
389
|
-
* non-tracked may conduct further actions)
|
|
390
|
-
*/
|
|
391
|
-
noTracking?: true | undefined;
|
|
392
|
-
/**
|
|
393
|
-
* Whether the rule expects contexts to be based on a match option
|
|
394
|
-
*/
|
|
395
|
-
matchContext?: true | undefined;
|
|
396
|
-
/**
|
|
397
|
-
* Handler to be executed upon exiting iteration of program AST
|
|
398
|
-
*/
|
|
399
|
-
exit?: ((args: {
|
|
400
|
-
context: eslint0.Rule.RuleContext;
|
|
319
|
+
export type JsdocVisitor = (arg: {
|
|
320
|
+
context: import("eslint").Rule.RuleContext;
|
|
321
|
+
sourceCode: import("eslint").SourceCode;
|
|
322
|
+
indent: string;
|
|
323
|
+
info: {
|
|
324
|
+
comment?: string | undefined;
|
|
325
|
+
lastIndex?: Integer | undefined;
|
|
326
|
+
};
|
|
401
327
|
state: StateObject;
|
|
328
|
+
globalState: Map<string, Map<string, string>>;
|
|
329
|
+
jsdoc: JsdocBlockWithInline;
|
|
330
|
+
jsdocNode: import("eslint").Rule.Node & {
|
|
331
|
+
range: [number, number];
|
|
332
|
+
};
|
|
333
|
+
node: Node | null;
|
|
334
|
+
allComments?: import("estree").Node[];
|
|
335
|
+
report: Report;
|
|
336
|
+
makeReport?: MakeReport;
|
|
402
337
|
settings: Settings;
|
|
403
|
-
utils:
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
338
|
+
utils: Utils;
|
|
339
|
+
}) => any;
|
|
340
|
+
export type NonCommentArgs = {
|
|
341
|
+
node: Node & {
|
|
342
|
+
range: [number, number];
|
|
343
|
+
};
|
|
344
|
+
state: StateObject;
|
|
345
|
+
};
|
|
346
|
+
export type RuleConfig = {
|
|
347
|
+
/**
|
|
348
|
+
* ESLint rule meta
|
|
349
|
+
*/
|
|
350
|
+
meta: EslintRuleMeta;
|
|
351
|
+
/**
|
|
352
|
+
* Any default contexts
|
|
353
|
+
*/
|
|
354
|
+
contextDefaults?: jsdocUtils.DefaultContexts | undefined;
|
|
355
|
+
/**
|
|
356
|
+
* Whether to force a `contexts` check
|
|
357
|
+
*/
|
|
358
|
+
contextSelected?: true | undefined;
|
|
359
|
+
/**
|
|
360
|
+
* Whether to iterate all JSDoc blocks by default
|
|
361
|
+
* regardless of context
|
|
362
|
+
*/
|
|
363
|
+
iterateAllJsdocs?: true | undefined;
|
|
364
|
+
/**
|
|
365
|
+
* Whether to check `@private` blocks (normally exempted)
|
|
366
|
+
*/
|
|
367
|
+
checkPrivate?: true | undefined;
|
|
368
|
+
/**
|
|
369
|
+
* Whether to check `@internal` blocks (normally exempted)
|
|
370
|
+
*/
|
|
371
|
+
checkInternal?: true | undefined;
|
|
372
|
+
/**
|
|
373
|
+
* Whether to iterates over all JSDoc blocks regardless of attachment
|
|
374
|
+
*/
|
|
375
|
+
checkFile?: true | undefined;
|
|
376
|
+
/**
|
|
377
|
+
* Whether to avoid relying on settings for global contexts
|
|
378
|
+
*/
|
|
379
|
+
nonGlobalSettings?: true | undefined;
|
|
380
|
+
/**
|
|
381
|
+
* Whether to disable the tracking of visited comment nodes (as
|
|
382
|
+
* non-tracked may conduct further actions)
|
|
383
|
+
*/
|
|
384
|
+
noTracking?: true | undefined;
|
|
385
|
+
/**
|
|
386
|
+
* Whether the rule expects contexts to be based on a match option
|
|
387
|
+
*/
|
|
388
|
+
matchContext?: true | undefined;
|
|
389
|
+
/**
|
|
390
|
+
* Handler to be executed upon exiting iteration of program AST
|
|
391
|
+
*/
|
|
392
|
+
exit?: ((args: {
|
|
393
|
+
context: import("eslint").Rule.RuleContext;
|
|
394
|
+
state: StateObject;
|
|
395
|
+
settings: Settings;
|
|
396
|
+
utils: BasicUtils;
|
|
397
|
+
}) => void) | undefined;
|
|
398
|
+
/**
|
|
399
|
+
* Handler to be executed if rule wishes
|
|
400
|
+
* to be supplied nodes without comments
|
|
401
|
+
*/
|
|
402
|
+
nonComment?: ((nca: NonCommentArgs) => void) | undefined;
|
|
410
403
|
};
|
|
411
404
|
/**
|
|
412
405
|
* @typedef {{
|
|
@@ -465,7 +458,6 @@ type RuleConfig = {
|
|
|
465
458
|
* @param {import('eslint').Rule.RuleContext & JSDocSettings} context
|
|
466
459
|
* @returns {Settings|false}
|
|
467
460
|
*/
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
export { AddLine, AddLines, AddTag, AvoidDocs, BasicUtils, ChangeTag, CheckJsdoc, ClassHasTag, ComparePaths, Context, ContextObject, DropPathSegmentQuotes, EmptyTokens, EslintRuleMeta, FilterAllTags, FilterTags, FindContext, ForEachPreferredTag, GetClassJsdoc, GetClassNode, GetDescription, GetFirstLine, GetFunctionParameterNames, GetJsdocTagsDeep, GetPreferredTagName, GetPreferredTagNameObject, GetPresentTags, GetRegexFromString, GetTagDescription, GetTagStructureForMode, GetTags, GetTagsByType, HasATag, HasOptionTag, HasParams, HasTag, HasThrowValue, HasValueOrExecutorHasNonEmptyResolveValue, HasYieldReturnValue, HasYieldValue, Integer, IsAsync, IsConstructor, IsGenerator, IsIteratingFunction, IsNamepathX, IsValidTag, IsVirtualFunction, JSDocSettings, JsdocBlockWithInline, JsdocVisitor, JsdocVisitorBasic, MakeMultiline, MakeReport, MayBeUndefinedTypeTag, Node, NonCommentArgs, ParseClosureTemplateTag, PreferredTypes, RemoveTag, Report, ReportJSDoc, ReportSettings, RuleConfig, SeedTokens, SetBlockDescription, SetDescriptionLines, SetTag, SetTagDescription, Settings, StateObject, Stringify, StructuredTags, TagMightHaveNamePositionTypePosition, TagMissingRequiredTypeOrNamepath, TagMustHave, Utils, iterateJsdoc as default, getSettings, parseComment };
|
|
461
|
+
export function getSettings(context: import("eslint").Rule.RuleContext & JSDocSettings): Settings | false;
|
|
462
|
+
import * as jsdocUtils from './jsdocUtils.js';
|
|
471
463
|
//# sourceMappingURL=iterateJsdoc.d.ts.map
|