eslint-plugin-jsdoc 63.3.3 → 64.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +14 -0
- package/package.json +23 -48
- package/src/index.js +22 -6
- package/dist/WarnSettings.cjs +0 -38
- package/dist/WarnSettings.cjs.map +0 -1
- package/dist/alignTransform.cjs +0 -402
- package/dist/alignTransform.cjs.map +0 -1
- package/dist/buildForbidRuleDefinition.cjs +0 -101
- package/dist/buildForbidRuleDefinition.cjs.map +0 -1
- package/dist/buildRejectOrPreferRuleDefinition.cjs +0 -352
- package/dist/buildRejectOrPreferRuleDefinition.cjs.map +0 -1
- package/dist/cjs/WarnSettings.d.ts +0 -16
- package/dist/cjs/alignTransform.d.ts +0 -33
- package/dist/cjs/buildForbidRuleDefinition.d.ts +0 -14
- package/dist/cjs/buildRejectOrPreferRuleDefinition.d.ts +0 -8
- package/dist/cjs/defaultTagOrder.d.ts +0 -4
- package/dist/cjs/exportParser.d.ts +0 -40
- package/dist/cjs/getDefaultTagStructureForMode.d.ts +0 -10
- package/dist/cjs/getJsdocProcessorPlugin.d.cts +0 -5
- package/dist/cjs/getJsdocProcessorPlugin.d.ts +0 -66
- package/dist/cjs/index-cjs.d.ts +0 -26
- package/dist/cjs/index.cjs.d.cts +0 -2
- package/dist/cjs/iterateJsdoc.d.cts +0 -7
- package/dist/cjs/iterateJsdoc.d.ts +0 -495
- package/dist/cjs/jsdocUtils.d.ts +0 -500
- package/dist/cjs/rules/checkAccess.d.ts +0 -2
- package/dist/cjs/rules/checkAlignment.d.ts +0 -2
- package/dist/cjs/rules/checkExamples.d.ts +0 -3
- package/dist/cjs/rules/checkIndentation.d.ts +0 -2
- package/dist/cjs/rules/checkLineAlignment.d.ts +0 -9
- package/dist/cjs/rules/checkParamNames.d.ts +0 -2
- package/dist/cjs/rules/checkPropertyNames.d.ts +0 -2
- package/dist/cjs/rules/checkSyntax.d.ts +0 -2
- package/dist/cjs/rules/checkTagNames.d.ts +0 -2
- package/dist/cjs/rules/checkTemplateNames.d.ts +0 -2
- package/dist/cjs/rules/checkTypes.d.ts +0 -7
- package/dist/cjs/rules/checkValues.d.ts +0 -2
- package/dist/cjs/rules/convertToJsdocComments.d.ts +0 -266
- package/dist/cjs/rules/emptyTags.d.ts +0 -2
- package/dist/cjs/rules/escapeInlineTags.d.ts +0 -2
- package/dist/cjs/rules/implementsOnClasses.d.ts +0 -2
- package/dist/cjs/rules/importsAsDependencies.d.ts +0 -2
- package/dist/cjs/rules/informativeDocs.d.ts +0 -2
- package/dist/cjs/rules/linesBeforeBlock.d.ts +0 -2
- package/dist/cjs/rules/matchDescription.d.ts +0 -2
- package/dist/cjs/rules/matchName.d.ts +0 -2
- package/dist/cjs/rules/multilineBlocks.d.ts +0 -2
- package/dist/cjs/rules/noBadBlocks.d.ts +0 -2
- package/dist/cjs/rules/noBlankBlockDescriptions.d.ts +0 -2
- package/dist/cjs/rules/noBlankBlocks.d.ts +0 -2
- package/dist/cjs/rules/noDefaults.d.ts +0 -2
- package/dist/cjs/rules/noMissingSyntax.d.ts +0 -9
- package/dist/cjs/rules/noMultiAsterisks.d.ts +0 -2
- package/dist/cjs/rules/noRestrictedSyntax.d.ts +0 -2
- package/dist/cjs/rules/noTypes.d.ts +0 -2
- package/dist/cjs/rules/noUndefinedTypes.d.ts +0 -2
- package/dist/cjs/rules/normalizeSeeLinks.d.ts +0 -2
- package/dist/cjs/rules/preferImportTag.d.ts +0 -2
- package/dist/cjs/rules/requireAsteriskPrefix.d.ts +0 -2
- package/dist/cjs/rules/requireDescription.d.ts +0 -2
- package/dist/cjs/rules/requireDescriptionCompleteSentence.d.ts +0 -2
- package/dist/cjs/rules/requireExample.d.ts +0 -2
- package/dist/cjs/rules/requireFileOverview.d.ts +0 -2
- package/dist/cjs/rules/requireHyphenBeforeParamDescription.d.ts +0 -2
- package/dist/cjs/rules/requireJsdoc.d.ts +0 -24
- package/dist/cjs/rules/requireParam.d.ts +0 -3
- package/dist/cjs/rules/requireParamDescription.d.ts +0 -2
- package/dist/cjs/rules/requireParamName.d.ts +0 -2
- package/dist/cjs/rules/requireParamType.d.ts +0 -2
- package/dist/cjs/rules/requireProperty.d.ts +0 -2
- package/dist/cjs/rules/requirePropertyDescription.d.ts +0 -2
- package/dist/cjs/rules/requirePropertyName.d.ts +0 -2
- package/dist/cjs/rules/requirePropertyType.d.ts +0 -2
- package/dist/cjs/rules/requireRejects.d.ts +0 -2
- package/dist/cjs/rules/requireReturns.d.ts +0 -2
- package/dist/cjs/rules/requireReturnsCheck.d.ts +0 -2
- package/dist/cjs/rules/requireReturnsDescription.d.ts +0 -2
- package/dist/cjs/rules/requireReturnsType.d.ts +0 -2
- package/dist/cjs/rules/requireTags.d.ts +0 -2
- package/dist/cjs/rules/requireTemplate.d.ts +0 -2
- package/dist/cjs/rules/requireThrows.d.ts +0 -2
- package/dist/cjs/rules/requireYields.d.ts +0 -2
- package/dist/cjs/rules/requireYieldsCheck.d.ts +0 -2
- package/dist/cjs/rules/sortTags.d.ts +0 -2
- package/dist/cjs/rules/tagLines.d.ts +0 -2
- package/dist/cjs/rules/textEscaping.d.ts +0 -2
- package/dist/cjs/rules/tsMethodSignatureStyle.d.ts +0 -2
- package/dist/cjs/rules/tsNoEmptyObjectType.d.ts +0 -2
- package/dist/cjs/rules/tsNoUnnecessaryTemplateExpression.d.ts +0 -2
- package/dist/cjs/rules/tsPreferFunctionType.d.ts +0 -2
- package/dist/cjs/rules/typeFormatting.d.ts +0 -2
- package/dist/cjs/rules/validTypes.d.ts +0 -2
- package/dist/cjs/tagNames.d.ts +0 -15
- package/dist/cjs/utils/hasReturnValue.d.ts +0 -19
- package/dist/defaultTagOrder.cjs +0 -46
- package/dist/defaultTagOrder.cjs.map +0 -1
- package/dist/exportParser.cjs +0 -732
- package/dist/exportParser.cjs.map +0 -1
- package/dist/generateDocs.cjs +0 -342
- package/dist/generateDocs.cjs.map +0 -1
- package/dist/generateOptions.cjs +0 -62
- package/dist/generateOptions.cjs.map +0 -1
- package/dist/generateRule.cjs +0 -248
- package/dist/generateRule.cjs.map +0 -1
- package/dist/generateRuleTypes.cjs +0 -24
- package/dist/generateRuleTypes.cjs.map +0 -1
- package/dist/getDefaultTagStructureForMode.cjs +0 -289
- package/dist/getDefaultTagStructureForMode.cjs.map +0 -1
- package/dist/getJsdocProcessorPlugin.cjs +0 -587
- package/dist/getJsdocProcessorPlugin.cjs.map +0 -1
- package/dist/getJsdocProcessorPlugin.cts +0 -5
- package/dist/index-cjs.cjs +0 -600
- package/dist/index-cjs.cjs.map +0 -1
- package/dist/index-cjs.d.ts +0 -27
- package/dist/index-esm.cjs +0 -162
- package/dist/index-esm.cjs.map +0 -1
- package/dist/index-esm.d.ts +0 -72
- package/dist/index.cjs +0 -748
- package/dist/index.cjs.cts +0 -3
- package/dist/index.cjs.map +0 -1
- package/dist/iterateJsdoc.cjs +0 -2150
- package/dist/iterateJsdoc.cjs.map +0 -1
- package/dist/iterateJsdoc.cts +0 -7
- package/dist/jsdocUtils.cjs +0 -1786
- package/dist/jsdocUtils.cjs.map +0 -1
- package/dist/rules/checkAccess.cjs +0 -40
- package/dist/rules/checkAccess.cjs.map +0 -1
- package/dist/rules/checkAlignment.cjs +0 -78
- package/dist/rules/checkAlignment.cjs.map +0 -1
- package/dist/rules/checkExamples.cjs +0 -521
- package/dist/rules/checkExamples.cjs.map +0 -1
- package/dist/rules/checkIndentation.cjs +0 -170
- package/dist/rules/checkIndentation.cjs.map +0 -1
- package/dist/rules/checkLineAlignment.cjs +0 -398
- package/dist/rules/checkLineAlignment.cjs.map +0 -1
- package/dist/rules/checkParamNames.cjs +0 -407
- package/dist/rules/checkParamNames.cjs.map +0 -1
- package/dist/rules/checkPropertyNames.cjs +0 -135
- package/dist/rules/checkPropertyNames.cjs.map +0 -1
- package/dist/rules/checkSyntax.cjs +0 -38
- package/dist/rules/checkSyntax.cjs.map +0 -1
- package/dist/rules/checkTagNames.cjs +0 -312
- package/dist/rules/checkTagNames.cjs.map +0 -1
- package/dist/rules/checkTemplateNames.cjs +0 -192
- package/dist/rules/checkTemplateNames.cjs.map +0 -1
- package/dist/rules/checkTypes.cjs +0 -111
- package/dist/rules/checkTypes.cjs.map +0 -1
- package/dist/rules/checkValues.cjs +0 -166
- package/dist/rules/checkValues.cjs.map +0 -1
- package/dist/rules/convertToJsdocComments.cjs +0 -356
- package/dist/rules/convertToJsdocComments.cjs.map +0 -1
- package/dist/rules/emptyTags.cjs +0 -98
- package/dist/rules/emptyTags.cjs.map +0 -1
- package/dist/rules/escapeInlineTags.cjs +0 -234
- package/dist/rules/escapeInlineTags.cjs.map +0 -1
- package/dist/rules/implementsOnClasses.cjs +0 -74
- package/dist/rules/implementsOnClasses.cjs.map +0 -1
- package/dist/rules/importsAsDependencies.cjs +0 -104
- package/dist/rules/importsAsDependencies.cjs.map +0 -1
- package/dist/rules/informativeDocs.cjs +0 -187
- package/dist/rules/informativeDocs.cjs.map +0 -1
- package/dist/rules/linesBeforeBlock.cjs +0 -120
- package/dist/rules/linesBeforeBlock.cjs.map +0 -1
- package/dist/rules/matchDescription.cjs +0 -356
- package/dist/rules/matchDescription.cjs.map +0 -1
- package/dist/rules/matchName.cjs +0 -160
- package/dist/rules/matchName.cjs.map +0 -1
- package/dist/rules/multilineBlocks.cjs +0 -431
- package/dist/rules/multilineBlocks.cjs.map +0 -1
- package/dist/rules/noBadBlocks.cjs +0 -100
- package/dist/rules/noBadBlocks.cjs.map +0 -1
- package/dist/rules/noBlankBlockDescriptions.cjs +0 -63
- package/dist/rules/noBlankBlockDescriptions.cjs.map +0 -1
- package/dist/rules/noBlankBlocks.cjs +0 -54
- package/dist/rules/noBlankBlocks.cjs.map +0 -1
- package/dist/rules/noDefaults.cjs +0 -102
- package/dist/rules/noDefaults.cjs.map +0 -1
- package/dist/rules/noMissingSyntax.cjs +0 -196
- package/dist/rules/noMissingSyntax.cjs.map +0 -1
- package/dist/rules/noMultiAsterisks.cjs +0 -126
- package/dist/rules/noMultiAsterisks.cjs.map +0 -1
- package/dist/rules/noRestrictedSyntax.cjs +0 -68
- package/dist/rules/noRestrictedSyntax.cjs.map +0 -1
- package/dist/rules/noTypes.cjs +0 -101
- package/dist/rules/noTypes.cjs.map +0 -1
- package/dist/rules/noUndefinedTypes.cjs +0 -616
- package/dist/rules/noUndefinedTypes.cjs.map +0 -1
- package/dist/rules/normalizeSeeLinks.cjs +0 -271
- package/dist/rules/normalizeSeeLinks.cjs.map +0 -1
- package/dist/rules/preferImportTag.cjs +0 -362
- package/dist/rules/preferImportTag.cjs.map +0 -1
- package/dist/rules/requireAsteriskPrefix.cjs +0 -190
- package/dist/rules/requireAsteriskPrefix.cjs.map +0 -1
- package/dist/rules/requireDescription.cjs +0 -164
- package/dist/rules/requireDescription.cjs.map +0 -1
- package/dist/rules/requireDescriptionCompleteSentence.cjs +0 -321
- package/dist/rules/requireDescriptionCompleteSentence.cjs.map +0 -1
- package/dist/rules/requireExample.cjs +0 -136
- package/dist/rules/requireExample.cjs.map +0 -1
- package/dist/rules/requireFileOverview.cjs +0 -194
- package/dist/rules/requireFileOverview.cjs.map +0 -1
- package/dist/rules/requireHyphenBeforeParamDescription.cjs +0 -166
- package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +0 -1
- package/dist/rules/requireJsdoc.cjs +0 -721
- package/dist/rules/requireJsdoc.cjs.map +0 -1
- package/dist/rules/requireParam.cjs +0 -772
- package/dist/rules/requireParam.cjs.map +0 -1
- package/dist/rules/requireParamDescription.cjs +0 -105
- package/dist/rules/requireParamDescription.cjs.map +0 -1
- package/dist/rules/requireParamName.cjs +0 -68
- package/dist/rules/requireParamName.cjs.map +0 -1
- package/dist/rules/requireParamType.cjs +0 -104
- package/dist/rules/requireParamType.cjs.map +0 -1
- package/dist/rules/requireProperty.cjs +0 -63
- package/dist/rules/requireProperty.cjs.map +0 -1
- package/dist/rules/requirePropertyDescription.cjs +0 -29
- package/dist/rules/requirePropertyDescription.cjs.map +0 -1
- package/dist/rules/requirePropertyName.cjs +0 -29
- package/dist/rules/requirePropertyName.cjs.map +0 -1
- package/dist/rules/requirePropertyType.cjs +0 -29
- package/dist/rules/requirePropertyType.cjs.map +0 -1
- package/dist/rules/requireRejects.cjs +0 -226
- package/dist/rules/requireRejects.cjs.map +0 -1
- package/dist/rules/requireReturns.cjs +0 -262
- package/dist/rules/requireReturns.cjs.map +0 -1
- package/dist/rules/requireReturnsCheck.cjs +0 -225
- package/dist/rules/requireReturnsCheck.cjs.map +0 -1
- package/dist/rules/requireReturnsDescription.cjs +0 -72
- package/dist/rules/requireReturnsDescription.cjs.map +0 -1
- package/dist/rules/requireReturnsType.cjs +0 -68
- package/dist/rules/requireReturnsType.cjs.map +0 -1
- package/dist/rules/requireTags.cjs +0 -74
- package/dist/rules/requireTags.cjs.map +0 -1
- package/dist/rules/requireTemplate.cjs +0 -220
- package/dist/rules/requireTemplate.cjs.map +0 -1
- package/dist/rules/requireThrows.cjs +0 -118
- package/dist/rules/requireThrows.cjs.map +0 -1
- package/dist/rules/requireYields.cjs +0 -224
- package/dist/rules/requireYields.cjs.map +0 -1
- package/dist/rules/requireYieldsCheck.cjs +0 -179
- package/dist/rules/requireYieldsCheck.cjs.map +0 -1
- package/dist/rules/sortTags.cjs +0 -656
- package/dist/rules/sortTags.cjs.map +0 -1
- package/dist/rules/tagLines.cjs +0 -374
- package/dist/rules/tagLines.cjs.map +0 -1
- package/dist/rules/textEscaping.cjs +0 -141
- package/dist/rules/textEscaping.cjs.map +0 -1
- package/dist/rules/tsMethodSignatureStyle.cjs +0 -240
- package/dist/rules/tsMethodSignatureStyle.cjs.map +0 -1
- package/dist/rules/tsNoEmptyObjectType.cjs +0 -62
- package/dist/rules/tsNoEmptyObjectType.cjs.map +0 -1
- package/dist/rules/tsNoUnnecessaryTemplateExpression.cjs +0 -104
- package/dist/rules/tsNoUnnecessaryTemplateExpression.cjs.map +0 -1
- package/dist/rules/tsPreferFunctionType.cjs +0 -110
- package/dist/rules/tsPreferFunctionType.cjs.map +0 -1
- package/dist/rules/typeFormatting.cjs +0 -607
- package/dist/rules/typeFormatting.cjs.map +0 -1
- package/dist/rules/validTypes.cjs +0 -324
- package/dist/rules/validTypes.cjs.map +0 -1
- package/dist/tagNames.cjs +0 -244
- package/dist/tagNames.cjs.map +0 -1
- package/dist/to-valid-identifier.cjs +0 -263
- package/dist/utils/hasReturnValue.cjs +0 -495
- package/dist/utils/hasReturnValue.cjs.map +0 -1
- package/rollup.config.js +0 -16
- package/src/getJsdocProcessorPlugin.cts +0 -5
- package/src/index-cjs.js +0 -760
- package/src/index-esm.js +0 -196
- package/src/index.cjs.cts +0 -3
- package/src/iterateJsdoc.cts +0 -7
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
declare namespace _default {
|
|
2
|
-
export { isUncommentedExport };
|
|
3
|
-
export { parse };
|
|
4
|
-
}
|
|
5
|
-
export default _default;
|
|
6
|
-
export type ValueObject = {
|
|
7
|
-
value: string;
|
|
8
|
-
};
|
|
9
|
-
export type CreatedNode = {
|
|
10
|
-
type?: string;
|
|
11
|
-
value?: ValueObject | import("eslint").Rule.Node | import("@typescript-eslint/types").TSESTree.Node;
|
|
12
|
-
props: {
|
|
13
|
-
[key: string]: CreatedNode | null;
|
|
14
|
-
};
|
|
15
|
-
special?: true;
|
|
16
|
-
globalVars?: CreatedNode;
|
|
17
|
-
exported?: boolean;
|
|
18
|
-
ANONYMOUS_DEFAULT?: import("eslint").Rule.Node;
|
|
19
|
-
};
|
|
20
|
-
export type CreateSymbol = (node: import("eslint").Rule.Node | null, globals: CreatedNode, value: import("eslint").Rule.Node | import("@typescript-eslint/types").TSESTree.Node | null, scope?: CreatedNode | undefined, isGlobal?: boolean | SymbolOptions | undefined) => CreatedNode | null;
|
|
21
|
-
export type SymbolOptions = {
|
|
22
|
-
simpleIdentifier?: boolean;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {import('eslint').Rule.Node} node
|
|
27
|
-
* @param {import('eslint').SourceCode} sourceCode
|
|
28
|
-
* @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt
|
|
29
|
-
* @param {import('./iterateJsdoc.js').Settings} settings
|
|
30
|
-
* @returns {boolean}
|
|
31
|
-
*/
|
|
32
|
-
declare function isUncommentedExport(node: import("eslint").Rule.Node, sourceCode: import("eslint").SourceCode, opt: import("./rules/requireJsdoc.js").RequireJsdocOpts, settings: import("./iterateJsdoc.js").Settings): boolean;
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
35
|
-
* @param {import('eslint').Rule.Node} ast
|
|
36
|
-
* @param {import('eslint').Rule.Node} node
|
|
37
|
-
* @param {import('./rules/requireJsdoc.js').RequireJsdocOpts} opt
|
|
38
|
-
* @returns {CreatedNode}
|
|
39
|
-
*/
|
|
40
|
-
declare function parse(ast: import("eslint").Rule.Node, node: import("eslint").Rule.Node, opt: import("./rules/requireJsdoc.js").RequireJsdocOpts): CreatedNode;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default getDefaultTagStructureForMode;
|
|
2
|
-
export type TagStructure = Map<string, Map<string, (string | boolean)>>;
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {Map<string, Map<string, (string|boolean)>>} TagStructure
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* @param {import('./jsdocUtils.js').ParserMode} mode
|
|
8
|
-
* @returns {TagStructure}
|
|
9
|
-
*/
|
|
10
|
-
declare function getDefaultTagStructureForMode(mode: import("./jsdocUtils.js").ParserMode): TagStructure;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export function getJsdocProcessorPlugin(options?: JsdocProcessorOptions): ESLint.Plugin;
|
|
2
|
-
export type Integer = number;
|
|
3
|
-
export type JsdocProcessorOptions = {
|
|
4
|
-
/**
|
|
5
|
-
* Require captions for example tags
|
|
6
|
-
*/
|
|
7
|
-
captionRequired?: boolean | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* See docs
|
|
10
|
-
*/
|
|
11
|
-
paddedIndent?: number | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* See docs
|
|
14
|
-
*/
|
|
15
|
-
checkDefaults?: boolean | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* See docs
|
|
18
|
-
*/
|
|
19
|
-
checkParams?: boolean | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* See docs
|
|
22
|
-
*/
|
|
23
|
-
checkExamples?: boolean | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* See docs
|
|
26
|
-
*/
|
|
27
|
-
checkProperties?: boolean | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* See docs
|
|
30
|
-
*/
|
|
31
|
-
matchingFileName?: string | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* See docs
|
|
34
|
-
*/
|
|
35
|
-
matchingFileNameDefaults?: string | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* See docs
|
|
38
|
-
*/
|
|
39
|
-
matchingFileNameParams?: string | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* See docs
|
|
42
|
-
*/
|
|
43
|
-
matchingFileNameProperties?: string | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* See docs
|
|
46
|
-
*/
|
|
47
|
-
exampleCodeRegex?: string | RegExp | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* See docs
|
|
50
|
-
*/
|
|
51
|
-
rejectExampleCodeRegex?: string | RegExp | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* See docs
|
|
54
|
-
*/
|
|
55
|
-
allowedLanguagesToProcess?: string[] | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* See docs
|
|
58
|
-
*/
|
|
59
|
-
sourceType?: "module" | "script" | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* See docs
|
|
62
|
-
*/
|
|
63
|
-
parser?: Linter.ESTreeParser | Linter.NonESTreeParser | undefined;
|
|
64
|
-
};
|
|
65
|
-
import type { ESLint } from 'eslint';
|
|
66
|
-
import type { Linter } from 'eslint';
|
package/dist/cjs/index-cjs.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export default index;
|
|
2
|
-
export type ConfigGroups = "recommended" | "stylistic" | "contents" | "logical" | "requirements";
|
|
3
|
-
export type ConfigVariants = "" | "-typescript" | "-typescript-flavor";
|
|
4
|
-
export type ErrorLevelVariants = "" | "-error";
|
|
5
|
-
export type FlatConfigNames = `flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}` | "flat/recommended-tsdoc" | "flat/recommended-tsdoc-error";
|
|
6
|
-
/**
|
|
7
|
-
* @typedef {"recommended" | "stylistic" | "contents" | "logical" | "requirements"} ConfigGroups
|
|
8
|
-
* @typedef {"" | "-typescript" | "-typescript-flavor"} ConfigVariants
|
|
9
|
-
* @typedef {"" | "-error"} ErrorLevelVariants
|
|
10
|
-
* @typedef {`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}` |
|
|
11
|
-
* "flat/recommended-tsdoc" | "flat/recommended-tsdoc-error"} FlatConfigNames
|
|
12
|
-
* @type {import('eslint').ESLint.Plugin & {
|
|
13
|
-
* configs: Record<
|
|
14
|
-
* FlatConfigNames,
|
|
15
|
-
* import('eslint').Linter.Config
|
|
16
|
-
* > &
|
|
17
|
-
* Record<
|
|
18
|
-
* "examples"|"default-expressions"|"examples-and-default-expressions",
|
|
19
|
-
* import('eslint').Linter.Config[]
|
|
20
|
-
* > &
|
|
21
|
-
* Record<"flat/recommended-mixed", import('eslint').Linter.Config[]>
|
|
22
|
-
* }}
|
|
23
|
-
*/
|
|
24
|
-
declare const index: import("eslint").ESLint.Plugin & {
|
|
25
|
-
configs: Record<FlatConfigNames, import("eslint").Linter.Config> & Record<"examples" | "default-expressions" | "examples-and-default-expressions", import("eslint").Linter.Config[]> & Record<"flat/recommended-mixed", import("eslint").Linter.Config[]>;
|
|
26
|
-
};
|
package/dist/cjs/index.cjs.d.cts
DELETED
|
@@ -1,495 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {JsdocVisitor} iterator
|
|
3
|
-
* @param {RuleConfig} ruleConfig
|
|
4
|
-
* @returns {import('eslint').Rule.RuleModule}
|
|
5
|
-
*/
|
|
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;
|
|
20
|
-
};
|
|
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;
|
|
33
|
-
}) => string | false | {
|
|
34
|
-
message: string;
|
|
35
|
-
replacement?: string | undefined;
|
|
36
|
-
} | {
|
|
37
|
-
blocked: true;
|
|
38
|
-
tagName: string;
|
|
39
|
-
};
|
|
40
|
-
export type BasicUtils = {
|
|
41
|
-
forEachPreferredTag: ForEachPreferredTag;
|
|
42
|
-
reportSettings: ReportSettings;
|
|
43
|
-
parseClosureTemplateTag: ParseClosureTemplateTag;
|
|
44
|
-
getPreferredTagNameObject: GetPreferredTagNameObject;
|
|
45
|
-
pathDoesNotBeginWith: import("./jsdocUtils.js").PathDoesNotBeginWith;
|
|
46
|
-
isNameOrNamepathDefiningTag: IsNamepathX;
|
|
47
|
-
isNamepathReferencingTag: IsNamepathX;
|
|
48
|
-
isNamepathOrUrlReferencingTag: IsNamepathX;
|
|
49
|
-
tagMightHaveNameOrNamepath: IsNamepathX;
|
|
50
|
-
tagMightHaveName: IsNamepathX;
|
|
51
|
-
};
|
|
52
|
-
export type IsIteratingFunction = () => boolean;
|
|
53
|
-
export type IsVirtualFunction = () => boolean;
|
|
54
|
-
export type Stringify = (tagBlock: import("comment-parser").Block, specRewire?: boolean | undefined) => string;
|
|
55
|
-
export type ReportJSDoc = (msg: string, tag?: import("comment-parser").Spec | {
|
|
56
|
-
line: Integer;
|
|
57
|
-
column?: Integer;
|
|
58
|
-
} | null | undefined, handler?: ((fixer: import("eslint").Rule.RuleFixer) => import("eslint").Rule.Fix | void) | null | undefined, specRewire?: boolean | undefined, data?: undefined | {
|
|
59
|
-
[key: string]: string;
|
|
60
|
-
}) => any;
|
|
61
|
-
export type GetRegexFromString = (str: string, requiredFlags?: string | undefined) => RegExp;
|
|
62
|
-
export type GetTagDescription = (tg: import("comment-parser").Spec, returnArray?: boolean | undefined) => string[] | string;
|
|
63
|
-
export type SetTagDescription = (tg: import("comment-parser").Spec, matcher: RegExp, setter: (description: string) => string) => Integer;
|
|
64
|
-
export type GetDescription = () => {
|
|
65
|
-
description: string;
|
|
66
|
-
descriptions: string[];
|
|
67
|
-
lastDescriptionLine: Integer;
|
|
68
|
-
};
|
|
69
|
-
export type SetBlockDescription = (setter: (info: {
|
|
70
|
-
delimiter: string;
|
|
71
|
-
postDelimiter: string;
|
|
72
|
-
start: string;
|
|
73
|
-
}, seedTokens: (tokens?: Partial<import("comment-parser").Tokens>) => import("comment-parser").Tokens, descLines: string[], postDelims: string[]) => import("comment-parser").Line[]) => void;
|
|
74
|
-
export type SetDescriptionLines = (matcher: RegExp, setter: (description: string) => string) => Integer;
|
|
75
|
-
export type ChangeTag = (tag: import("comment-parser").Spec, ...tokens: Partial<import("comment-parser").Tokens>[]) => void;
|
|
76
|
-
export type SetTag = (tag: import("comment-parser").Spec & {
|
|
77
|
-
line: Integer;
|
|
78
|
-
}, tokens?: Partial<import("comment-parser").Tokens> | undefined) => void;
|
|
79
|
-
export type RemoveTag = (tagIndex: Integer, cfg?: {
|
|
80
|
-
removeEmptyBlock?: boolean;
|
|
81
|
-
tagSourceOffset?: Integer;
|
|
82
|
-
} | undefined) => void;
|
|
83
|
-
export type AddTag = (targetTagName: string, number?: number | undefined, tokens?: Partial<import("comment-parser").Tokens> | undefined) => void;
|
|
84
|
-
export type GetFirstLine = () => Integer | undefined;
|
|
85
|
-
export type SeedTokens = (tokens?: Partial<import("comment-parser").Tokens> | undefined) => import("comment-parser").Tokens;
|
|
86
|
-
/**
|
|
87
|
-
* Sets tokens to empty string.
|
|
88
|
-
*/
|
|
89
|
-
export type EmptyTokens = (tokens: import("comment-parser").Tokens) => void;
|
|
90
|
-
export type AddLine = (sourceIndex: Integer, tokens: Partial<import("comment-parser").Tokens>) => void;
|
|
91
|
-
export type AddLines = (tagIndex: Integer, tagSourceOffset: Integer, numLines: Integer) => void;
|
|
92
|
-
export type MakeMultiline = () => void;
|
|
93
|
-
export type GetFunctionParameterNames = (useDefaultObjectProperties?: boolean | undefined, ignoreInterfacedParameters?: boolean | undefined) => import("./jsdocUtils.js").ParamNameInfo[];
|
|
94
|
-
export type HasParams = () => Integer;
|
|
95
|
-
export type IsGenerator = () => boolean;
|
|
96
|
-
export type IsConstructor = () => boolean;
|
|
97
|
-
export type GetJsdocTagsDeep = (tagName: string) => false | {
|
|
98
|
-
idx: Integer;
|
|
99
|
-
name: string;
|
|
100
|
-
type: string;
|
|
101
|
-
}[];
|
|
102
|
-
export type GetPreferredTagName = (cfg: {
|
|
103
|
-
tagName: string;
|
|
104
|
-
skipReportingBlockedTag?: boolean;
|
|
105
|
-
allowObjectReturn?: boolean;
|
|
106
|
-
defaultMessage?: string;
|
|
107
|
-
}) => string | undefined | false | {
|
|
108
|
-
message: string;
|
|
109
|
-
replacement?: string | undefined;
|
|
110
|
-
} | {
|
|
111
|
-
blocked: true;
|
|
112
|
-
tagName: string;
|
|
113
|
-
};
|
|
114
|
-
export type IsValidTag = (name: string, definedTags: string[]) => boolean;
|
|
115
|
-
export type HasATag = (names: string[]) => boolean;
|
|
116
|
-
export type HasTag = (name: string) => boolean;
|
|
117
|
-
export type ComparePaths = (name: string) => (otherPathName: string) => boolean;
|
|
118
|
-
export type DropPathSegmentQuotes = (name: string) => string;
|
|
119
|
-
export type AvoidDocs = (exemptSpecialMethods?: boolean | undefined) => boolean;
|
|
120
|
-
export type TagMightHaveNamePositionTypePosition = (tagName: string, otherModeMaps?: import("./getDefaultTagStructureForMode.js").TagStructure[] | undefined) => boolean | {
|
|
121
|
-
otherMode: true;
|
|
122
|
-
};
|
|
123
|
-
export type TagMustHave = (tagName: string, otherModeMaps: import("./getDefaultTagStructureForMode.js").TagStructure[]) => boolean | {
|
|
124
|
-
otherMode: false;
|
|
125
|
-
};
|
|
126
|
-
export type TagMissingRequiredTypeOrNamepath = (tag: import("comment-parser").Spec, otherModeMaps: import("./getDefaultTagStructureForMode.js").TagStructure[]) => boolean | {
|
|
127
|
-
otherMode: false;
|
|
128
|
-
};
|
|
129
|
-
export type IsNamepathX = (tagName: string) => boolean;
|
|
130
|
-
export type GetTagStructureForMode = (mde: import("./jsdocUtils.js").ParserMode) => import("./getDefaultTagStructureForMode.js").TagStructure;
|
|
131
|
-
export type MayBeUndefinedTypeTag = (tag: import("comment-parser").Spec) => boolean;
|
|
132
|
-
export type HasValueOrExecutorHasNonEmptyResolveValue = (anyPromiseAsReturn: boolean, allBranches?: boolean | undefined) => boolean;
|
|
133
|
-
export type HasYieldValue = () => boolean;
|
|
134
|
-
export type HasYieldReturnValue = () => boolean;
|
|
135
|
-
export type HasThrowValue = () => boolean;
|
|
136
|
-
export type IsAsync = () => boolean | undefined;
|
|
137
|
-
export type GetTags = (tagName: string) => import("comment-parser").Spec[];
|
|
138
|
-
export type GetPresentTags = (tagList: string[]) => import("@es-joy/jsdoccomment").JsdocTagWithInline[];
|
|
139
|
-
export type FilterTags = (filter: (tag: import("@es-joy/jsdoccomment").JsdocTagWithInline) => boolean) => import("@es-joy/jsdoccomment").JsdocTagWithInline[];
|
|
140
|
-
export type FilterAllTags = (filter: (tag: (import("comment-parser").Spec | import("@es-joy/jsdoccomment").JsdocInlineTagNoType)) => boolean) => (import("comment-parser").Spec | import("@es-joy/jsdoccomment").JsdocInlineTagNoType)[];
|
|
141
|
-
export type getInlineTags = () => (import("comment-parser").Spec | (import("@es-joy/jsdoccomment").JsdocInlineTagNoType & {
|
|
142
|
-
line?: number | undefined;
|
|
143
|
-
column?: number | undefined;
|
|
144
|
-
}))[];
|
|
145
|
-
export type GetTagsByType = (tags: import("comment-parser").Spec[]) => {
|
|
146
|
-
tagsWithNames: import("comment-parser").Spec[];
|
|
147
|
-
tagsWithoutNames: import("comment-parser").Spec[];
|
|
148
|
-
};
|
|
149
|
-
export type HasOptionTag = (tagName: string) => boolean;
|
|
150
|
-
export type GetClassNode = () => Node | null;
|
|
151
|
-
export type GetClassJsdoc = () => null | JsdocBlockWithInline;
|
|
152
|
-
export type ClassHasTag = (tagName: string) => boolean;
|
|
153
|
-
export type FindContext = (contexts: Context[], comment: string | undefined) => {
|
|
154
|
-
foundContext: Context | undefined;
|
|
155
|
-
contextStr: string;
|
|
156
|
-
};
|
|
157
|
-
export type Utils = BasicUtils & {
|
|
158
|
-
isIteratingFunction: IsIteratingFunction;
|
|
159
|
-
isIteratingFunctionOrVariable: IsIteratingFunction;
|
|
160
|
-
isVirtualFunction: IsVirtualFunction;
|
|
161
|
-
stringify: Stringify;
|
|
162
|
-
reportJSDoc: ReportJSDoc;
|
|
163
|
-
getRegexFromString: GetRegexFromString;
|
|
164
|
-
getTagDescription: GetTagDescription;
|
|
165
|
-
setTagDescription: SetTagDescription;
|
|
166
|
-
getDescription: GetDescription;
|
|
167
|
-
setBlockDescription: SetBlockDescription;
|
|
168
|
-
setDescriptionLines: SetDescriptionLines;
|
|
169
|
-
changeTag: ChangeTag;
|
|
170
|
-
setTag: SetTag;
|
|
171
|
-
removeTag: RemoveTag;
|
|
172
|
-
addTag: AddTag;
|
|
173
|
-
getFirstLine: GetFirstLine;
|
|
174
|
-
seedTokens: SeedTokens;
|
|
175
|
-
emptyTokens: EmptyTokens;
|
|
176
|
-
addLine: AddLine;
|
|
177
|
-
addLines: AddLines;
|
|
178
|
-
makeMultiline: MakeMultiline;
|
|
179
|
-
flattenRoots: import("./jsdocUtils.js").FlattenRoots;
|
|
180
|
-
getFunctionParameterNames: GetFunctionParameterNames;
|
|
181
|
-
hasParams: HasParams;
|
|
182
|
-
isGenerator: IsGenerator;
|
|
183
|
-
isConstructor: IsConstructor;
|
|
184
|
-
getJsdocTagsDeep: GetJsdocTagsDeep;
|
|
185
|
-
getPreferredTagName: GetPreferredTagName;
|
|
186
|
-
isValidTag: IsValidTag;
|
|
187
|
-
hasATag: HasATag;
|
|
188
|
-
hasTag: HasTag;
|
|
189
|
-
comparePaths: ComparePaths;
|
|
190
|
-
dropPathSegmentQuotes: DropPathSegmentQuotes;
|
|
191
|
-
avoidDocs: AvoidDocs;
|
|
192
|
-
tagMightHaveNamePosition: TagMightHaveNamePositionTypePosition;
|
|
193
|
-
tagMightHaveTypePosition: TagMightHaveNamePositionTypePosition;
|
|
194
|
-
tagMustHaveNamePosition: TagMustHave;
|
|
195
|
-
tagMustHaveTypePosition: TagMustHave;
|
|
196
|
-
tagMissingRequiredTypeOrNamepath: TagMissingRequiredTypeOrNamepath;
|
|
197
|
-
isNameOrNamepathDefiningTag: IsNamepathX;
|
|
198
|
-
isNamepathReferencingTag: IsNamepathX;
|
|
199
|
-
isNamepathOrUrlReferencingTag: IsNamepathX;
|
|
200
|
-
tagMightHaveNameOrNamepath: IsNamepathX;
|
|
201
|
-
tagMightHaveName: IsNamepathX;
|
|
202
|
-
tagMightHaveNamepath: IsNamepathX;
|
|
203
|
-
getTagStructureForMode: GetTagStructureForMode;
|
|
204
|
-
mayBeUndefinedTypeTag: MayBeUndefinedTypeTag;
|
|
205
|
-
hasValueOrExecutorHasNonEmptyResolveValue: HasValueOrExecutorHasNonEmptyResolveValue;
|
|
206
|
-
hasYieldValue: HasYieldValue;
|
|
207
|
-
hasYieldReturnValue: HasYieldReturnValue;
|
|
208
|
-
hasThrowValue: HasThrowValue;
|
|
209
|
-
isAsync: IsAsync;
|
|
210
|
-
getTags: GetTags;
|
|
211
|
-
getPresentTags: GetPresentTags;
|
|
212
|
-
filterTags: FilterTags;
|
|
213
|
-
filterAllTags: FilterAllTags;
|
|
214
|
-
getInlineTags: getInlineTags;
|
|
215
|
-
getTagsByType: GetTagsByType;
|
|
216
|
-
hasOptionTag: HasOptionTag;
|
|
217
|
-
getClassNode: GetClassNode;
|
|
218
|
-
getClassJsdoc: GetClassJsdoc;
|
|
219
|
-
classHasTag: ClassHasTag;
|
|
220
|
-
findContext: FindContext;
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* Should use ESLint rule's typing.
|
|
224
|
-
*/
|
|
225
|
-
export type EslintRuleMeta = import("eslint").Rule.RuleMetaData;
|
|
226
|
-
/**
|
|
227
|
-
* A plain object for tracking state as needed by rules across iterations.
|
|
228
|
-
*/
|
|
229
|
-
export type StateObject = {
|
|
230
|
-
globalTags: boolean;
|
|
231
|
-
hasDuplicates: {
|
|
232
|
-
[key: string]: boolean;
|
|
233
|
-
};
|
|
234
|
-
selectorMap: {
|
|
235
|
-
[selector: string]: {
|
|
236
|
-
[comment: string]: Integer;
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
hasTag: {
|
|
240
|
-
[key: string]: boolean;
|
|
241
|
-
};
|
|
242
|
-
hasNonComment: number;
|
|
243
|
-
hasNonCommentBeforeTag: {
|
|
244
|
-
[key: string]: boolean | number;
|
|
245
|
-
};
|
|
246
|
-
foundTypedefValues: string[];
|
|
247
|
-
};
|
|
248
|
-
/**
|
|
249
|
-
* The Node AST as supplied by the parser.
|
|
250
|
-
*/
|
|
251
|
-
export type Node = import("eslint").Rule.Node;
|
|
252
|
-
export type Report = (message: string, fix?: import("@eslint/core").RuleFixer | null | undefined, jsdocLoc?: {
|
|
253
|
-
line?: Integer;
|
|
254
|
-
column?: Integer;
|
|
255
|
-
} | (import("comment-parser").Spec & {
|
|
256
|
-
line?: Integer;
|
|
257
|
-
}) | null | undefined, data?: undefined | {
|
|
258
|
-
[key: string]: string;
|
|
259
|
-
}) => void;
|
|
260
|
-
export type PreferredTypes = {
|
|
261
|
-
[key: string]: false | string | {
|
|
262
|
-
message: string;
|
|
263
|
-
replacement?: false | string;
|
|
264
|
-
skipRootChecking?: boolean;
|
|
265
|
-
unifyParentAndChildTypeChecks?: boolean;
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
export type StructuredTags = {
|
|
269
|
-
[key: string]: {
|
|
270
|
-
name?: "text" | "name-defining" | "namepath-defining" | "namepath-referencing" | false;
|
|
271
|
-
type?: boolean | string[];
|
|
272
|
-
required?: ("name" | "type" | "typeOrNameRequired")[];
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
/**
|
|
276
|
-
* Settings from ESLint types.
|
|
277
|
-
*/
|
|
278
|
-
export type Settings = {
|
|
279
|
-
maxLines: Integer;
|
|
280
|
-
minLines: Integer;
|
|
281
|
-
tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
|
|
282
|
-
mode: import("./jsdocUtils.js").ParserMode;
|
|
283
|
-
preferredTypes: PreferredTypes;
|
|
284
|
-
structuredTags: StructuredTags;
|
|
285
|
-
contexts?: Context[];
|
|
286
|
-
augmentsExtendsReplacesDocs?: boolean;
|
|
287
|
-
ignoreReplacesDocs?: boolean;
|
|
288
|
-
implementsReplacesDocs?: boolean;
|
|
289
|
-
overrideReplacesDocs?: boolean;
|
|
290
|
-
ignoreInternal?: boolean;
|
|
291
|
-
ignorePrivate?: boolean;
|
|
292
|
-
exemptDestructuredRootsFromChecks?: boolean;
|
|
293
|
-
skipInvokedExpressionsForCommentFinding?: boolean;
|
|
294
|
-
};
|
|
295
|
-
export type JSDocSettings = {
|
|
296
|
-
settings?: {
|
|
297
|
-
jsdoc?: {
|
|
298
|
-
ignorePrivate: boolean;
|
|
299
|
-
ignoreInternal: boolean;
|
|
300
|
-
maxLines: Integer;
|
|
301
|
-
minLines: Integer;
|
|
302
|
-
tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
|
|
303
|
-
preferredTypes: PreferredTypes;
|
|
304
|
-
structuredTags: StructuredTags;
|
|
305
|
-
overrideReplacesDocs: boolean;
|
|
306
|
-
ignoreReplacesDocs: boolean;
|
|
307
|
-
implementsReplacesDocs: boolean;
|
|
308
|
-
augmentsExtendsReplacesDocs: boolean;
|
|
309
|
-
exemptDestructuredRootsFromChecks: boolean;
|
|
310
|
-
skipInvokedExpressionsForCommentFinding: boolean;
|
|
311
|
-
mode: import("./jsdocUtils.js").ParserMode;
|
|
312
|
-
contexts: Context[];
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
|
-
/**
|
|
317
|
-
* Create the report function
|
|
318
|
-
*/
|
|
319
|
-
export type MakeReport = (context: import("eslint").Rule.RuleContext, commentNode: import("estree").Node) => Report;
|
|
320
|
-
export type JsdocVisitorBasic = (arg: {
|
|
321
|
-
context: import("eslint").Rule.RuleContext;
|
|
322
|
-
sourceCode: import("eslint").SourceCode;
|
|
323
|
-
indent?: string;
|
|
324
|
-
info?: {
|
|
325
|
-
comment?: string | undefined;
|
|
326
|
-
lastIndex?: Integer | undefined;
|
|
327
|
-
};
|
|
328
|
-
state?: StateObject;
|
|
329
|
-
globalState?: Map<string, Map<string, string>>;
|
|
330
|
-
jsdoc?: JsdocBlockWithInline;
|
|
331
|
-
jsdocNode?: import("eslint").Rule.Node & {
|
|
332
|
-
range: [number, number];
|
|
333
|
-
};
|
|
334
|
-
node?: Node;
|
|
335
|
-
allComments?: import("estree").Node[];
|
|
336
|
-
report?: Report;
|
|
337
|
-
makeReport?: MakeReport;
|
|
338
|
-
settings: Settings;
|
|
339
|
-
utils: BasicUtils;
|
|
340
|
-
}) => void;
|
|
341
|
-
export type JsdocVisitor = (arg: {
|
|
342
|
-
context: import("eslint").Rule.RuleContext;
|
|
343
|
-
sourceCode: import("eslint").SourceCode;
|
|
344
|
-
indent: string;
|
|
345
|
-
info: {
|
|
346
|
-
comment?: string | undefined;
|
|
347
|
-
lastIndex?: Integer | undefined;
|
|
348
|
-
};
|
|
349
|
-
state: StateObject;
|
|
350
|
-
globalState: Map<string, Map<string, string>>;
|
|
351
|
-
jsdoc: JsdocBlockWithInline;
|
|
352
|
-
jsdocNode: import("eslint").Rule.Node & {
|
|
353
|
-
range: [number, number];
|
|
354
|
-
};
|
|
355
|
-
node: Node | null;
|
|
356
|
-
allComments?: import("estree").Node[];
|
|
357
|
-
report: Report;
|
|
358
|
-
makeReport?: MakeReport;
|
|
359
|
-
settings: Settings;
|
|
360
|
-
utils: Utils;
|
|
361
|
-
}) => void;
|
|
362
|
-
export type NonCommentArgs = {
|
|
363
|
-
node: Node;
|
|
364
|
-
state: StateObject;
|
|
365
|
-
};
|
|
366
|
-
export type RuleConfig = {
|
|
367
|
-
/**
|
|
368
|
-
* ESLint rule meta
|
|
369
|
-
*/
|
|
370
|
-
meta: EslintRuleMeta;
|
|
371
|
-
/**
|
|
372
|
-
* Any default contexts
|
|
373
|
-
*/
|
|
374
|
-
contextDefaults?: jsdocUtils.DefaultContexts | undefined;
|
|
375
|
-
/**
|
|
376
|
-
* Whether to force a `contexts` check
|
|
377
|
-
*/
|
|
378
|
-
contextSelected?: true | undefined;
|
|
379
|
-
/**
|
|
380
|
-
* Modify the rule's context object
|
|
381
|
-
*/
|
|
382
|
-
modifyContext?: ((context: import("eslint").Rule.RuleContext) => import("eslint").Rule.RuleContext) | undefined;
|
|
383
|
-
/**
|
|
384
|
-
* Whether to iterate all JSDoc blocks by default
|
|
385
|
-
* regardless of context
|
|
386
|
-
*/
|
|
387
|
-
iterateAllJsdocs?: true | undefined;
|
|
388
|
-
/**
|
|
389
|
-
* Whether to check `@private` blocks (normally exempted)
|
|
390
|
-
*/
|
|
391
|
-
checkPrivate?: true | undefined;
|
|
392
|
-
/**
|
|
393
|
-
* Whether to check `@internal` blocks (normally exempted)
|
|
394
|
-
*/
|
|
395
|
-
checkInternal?: true | undefined;
|
|
396
|
-
/**
|
|
397
|
-
* Whether to iterates over all JSDoc blocks regardless of attachment
|
|
398
|
-
*/
|
|
399
|
-
checkFile?: true | undefined;
|
|
400
|
-
/**
|
|
401
|
-
* Whether to avoid relying on settings for global contexts
|
|
402
|
-
*/
|
|
403
|
-
nonGlobalSettings?: true | undefined;
|
|
404
|
-
/**
|
|
405
|
-
* Whether to disable the tracking of visited comment nodes (as
|
|
406
|
-
* non-tracked may conduct further actions)
|
|
407
|
-
*/
|
|
408
|
-
noTracking?: true | undefined;
|
|
409
|
-
/**
|
|
410
|
-
* Whether the rule expects contexts to be based on a match option
|
|
411
|
-
*/
|
|
412
|
-
matchContext?: true | undefined;
|
|
413
|
-
/**
|
|
414
|
-
* Handler to be executed upon exiting iteration of program AST
|
|
415
|
-
*/
|
|
416
|
-
exit?: ((args: {
|
|
417
|
-
context: import("eslint").Rule.RuleContext;
|
|
418
|
-
state: StateObject;
|
|
419
|
-
settings: Settings;
|
|
420
|
-
utils: BasicUtils;
|
|
421
|
-
}) => void) | undefined;
|
|
422
|
-
/**
|
|
423
|
-
* Handler to be executed if rule wishes
|
|
424
|
-
* to be supplied nodes without comments
|
|
425
|
-
*/
|
|
426
|
-
nonComment?: ((nca: NonCommentArgs) => void) | undefined;
|
|
427
|
-
};
|
|
428
|
-
/**
|
|
429
|
-
* @typedef {{
|
|
430
|
-
* [key: string]: false|string|{
|
|
431
|
-
* message: string,
|
|
432
|
-
* replacement?: false|string
|
|
433
|
-
* skipRootChecking?: boolean
|
|
434
|
-
* unifyParentAndChildTypeChecks?: boolean
|
|
435
|
-
* }
|
|
436
|
-
* }} PreferredTypes
|
|
437
|
-
*/
|
|
438
|
-
/**
|
|
439
|
-
* @typedef {{
|
|
440
|
-
* [key: string]: {
|
|
441
|
-
* name?: "text"|"name-defining"|"namepath-defining"|"namepath-referencing"|false,
|
|
442
|
-
* type?: boolean|string[],
|
|
443
|
-
* required?: ("name"|"type"|"typeOrNameRequired")[]
|
|
444
|
-
* }
|
|
445
|
-
* }} StructuredTags
|
|
446
|
-
*/
|
|
447
|
-
/**
|
|
448
|
-
* Settings from ESLint types.
|
|
449
|
-
* @typedef {{
|
|
450
|
-
* maxLines: Integer,
|
|
451
|
-
* minLines: Integer,
|
|
452
|
-
* tagNamePreference: import('./jsdocUtils.js').TagNamePreference,
|
|
453
|
-
* mode: import('./jsdocUtils.js').ParserMode,
|
|
454
|
-
* preferredTypes: PreferredTypes,
|
|
455
|
-
* structuredTags: StructuredTags,
|
|
456
|
-
* contexts?: Context[],
|
|
457
|
-
* augmentsExtendsReplacesDocs?: boolean,
|
|
458
|
-
* ignoreReplacesDocs?: boolean,
|
|
459
|
-
* implementsReplacesDocs?: boolean,
|
|
460
|
-
* overrideReplacesDocs?: boolean,
|
|
461
|
-
* ignoreInternal?: boolean,
|
|
462
|
-
* ignorePrivate?: boolean,
|
|
463
|
-
* exemptDestructuredRootsFromChecks?: boolean,
|
|
464
|
-
* skipInvokedExpressionsForCommentFinding?: boolean
|
|
465
|
-
* }} Settings
|
|
466
|
-
*/
|
|
467
|
-
/**
|
|
468
|
-
* @typedef {{
|
|
469
|
-
* settings?: {
|
|
470
|
-
* jsdoc?: {
|
|
471
|
-
* ignorePrivate: boolean,
|
|
472
|
-
* ignoreInternal: boolean,
|
|
473
|
-
* maxLines: Integer,
|
|
474
|
-
* minLines: Integer,
|
|
475
|
-
* tagNamePreference: import('./jsdocUtils.js').TagNamePreference,
|
|
476
|
-
* preferredTypes: PreferredTypes,
|
|
477
|
-
* structuredTags: StructuredTags,
|
|
478
|
-
* overrideReplacesDocs: boolean,
|
|
479
|
-
* ignoreReplacesDocs: boolean,
|
|
480
|
-
* implementsReplacesDocs: boolean,
|
|
481
|
-
* augmentsExtendsReplacesDocs: boolean,
|
|
482
|
-
* exemptDestructuredRootsFromChecks: boolean,
|
|
483
|
-
* skipInvokedExpressionsForCommentFinding: boolean,
|
|
484
|
-
* mode: import('./jsdocUtils.js').ParserMode,
|
|
485
|
-
* contexts: Context[],
|
|
486
|
-
* }
|
|
487
|
-
* }
|
|
488
|
-
* }} JSDocSettings
|
|
489
|
-
*/
|
|
490
|
-
/**
|
|
491
|
-
* @param {import('eslint').Rule.RuleContext & JSDocSettings} context
|
|
492
|
-
* @returns {Settings|false}
|
|
493
|
-
*/
|
|
494
|
-
export function getSettings(context: import("eslint").Rule.RuleContext & JSDocSettings): Settings | false;
|
|
495
|
-
import * as jsdocUtils from './jsdocUtils.js';
|