eslint-plugin-jsdoc 55.1.0 → 55.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WarnSettings.d.ts +17 -0
- package/dist/alignTransform.d.ts +34 -0
- package/dist/defaultTagOrder.d.ts +5 -0
- package/dist/exportParser.d.ts +41 -0
- package/dist/getDefaultTagStructureForMode.d.ts +11 -0
- package/dist/index-cjs.d.ts +17 -0
- package/dist/index-esm.d.ts +19 -0
- package/dist/jsdocUtils.d.ts +455 -0
- package/dist/rules/checkAccess.d.ts +3 -0
- package/dist/rules/checkAlignment.d.ts +3 -0
- package/dist/rules/checkExamples.d.ts +4 -0
- package/dist/rules/checkIndentation.d.ts +3 -0
- package/dist/rules/checkLineAlignment.d.ts +10 -0
- package/dist/rules/checkParamNames.d.ts +3 -0
- package/dist/rules/checkPropertyNames.d.ts +3 -0
- package/dist/rules/checkSyntax.d.ts +3 -0
- package/dist/rules/checkTagNames.d.ts +3 -0
- package/dist/rules/checkTemplateNames.d.ts +3 -0
- package/dist/rules/checkTypes.d.ts +3 -0
- package/dist/rules/checkValues.d.ts +3 -0
- package/dist/rules/convertToJsdocComments.d.ts +252 -0
- package/dist/rules/emptyTags.d.ts +3 -0
- package/dist/rules/implementsOnClasses.d.ts +3 -0
- package/dist/rules/importsAsDependencies.d.ts +3 -0
- package/dist/rules/informativeDocs.d.ts +3 -0
- package/dist/rules/linesBeforeBlock.d.ts +3 -0
- package/dist/rules/matchDescription.d.ts +3 -0
- package/dist/rules/matchName.d.ts +3 -0
- package/dist/rules/multilineBlocks.d.ts +3 -0
- package/dist/rules/noBadBlocks.d.ts +3 -0
- package/dist/rules/noBlankBlockDescriptions.d.ts +3 -0
- package/dist/rules/noBlankBlocks.d.ts +3 -0
- package/dist/rules/noDefaults.d.ts +3 -0
- package/dist/rules/noMissingSyntax.d.ts +10 -0
- package/dist/rules/noMultiAsterisks.d.ts +3 -0
- package/dist/rules/noRestrictedSyntax.d.ts +3 -0
- package/dist/rules/noTypes.d.ts +3 -0
- package/dist/rules/noUndefinedTypes.d.ts +3 -0
- package/dist/rules/requireAsteriskPrefix.d.ts +3 -0
- package/dist/rules/requireDescription.d.ts +3 -0
- package/dist/rules/requireDescriptionCompleteSentence.d.ts +3 -0
- package/dist/rules/requireExample.d.ts +3 -0
- package/dist/rules/requireFileOverview.d.ts +3 -0
- package/dist/rules/requireHyphenBeforeParamDescription.d.ts +3 -0
- package/dist/rules/requireJsdoc.d.ts +26 -0
- package/dist/rules/requireParam.d.ts +4 -0
- package/dist/rules/requireParamDescription.d.ts +3 -0
- package/dist/rules/requireParamName.d.ts +3 -0
- package/dist/rules/requireParamType.d.ts +3 -0
- package/dist/rules/requireProperty.d.ts +3 -0
- package/dist/rules/requirePropertyDescription.d.ts +3 -0
- package/dist/rules/requirePropertyName.d.ts +3 -0
- package/dist/rules/requirePropertyType.d.ts +3 -0
- package/dist/rules/requireReturns.d.ts +3 -0
- package/dist/rules/requireReturnsCheck.d.ts +3 -0
- package/dist/rules/requireReturnsDescription.d.ts +3 -0
- package/dist/rules/requireReturnsType.d.ts +3 -0
- package/dist/rules/requireTemplate.d.ts +3 -0
- package/dist/rules/requireThrows.d.ts +3 -0
- package/dist/rules/requireYields.d.ts +3 -0
- package/dist/rules/requireYieldsCheck.d.ts +3 -0
- package/dist/rules/sortTags.d.ts +3 -0
- package/dist/rules/tagLines.d.ts +3 -0
- package/dist/rules/textEscaping.d.ts +3 -0
- package/dist/rules/validTypes.d.ts +3 -0
- package/dist/rules.d.ts +766 -0
- package/dist/tagNames.d.ts +16 -0
- package/dist/utils/hasReturnValue.d.ts +20 -0
- package/package.json +1 -1
- package/src/rules.d.ts +766 -0
- package/typings/babel__eslint-parser.d.ts +1 -0
- package/typings/gitdown.d.ts +12 -0
- package/dist/getJsdocProcessorPlugin.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/iterateJsdoc.d.ts.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default WarnSettings;
|
|
2
|
+
declare function WarnSettings(): {
|
|
3
|
+
/**
|
|
4
|
+
* Warn only once for each context and setting
|
|
5
|
+
* @param {{}} context
|
|
6
|
+
* @param {string} setting
|
|
7
|
+
* @returns {boolean}
|
|
8
|
+
*/
|
|
9
|
+
hasBeenWarned(context: {}, setting: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @param {{}} context
|
|
12
|
+
* @param {string} setting
|
|
13
|
+
* @returns {void}
|
|
14
|
+
*/
|
|
15
|
+
markSettingAsWarned(context: {}, setting: string): void;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=WarnSettings.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default alignTransform;
|
|
2
|
+
export type TypelessInfo = {
|
|
3
|
+
hasNoTypes: boolean;
|
|
4
|
+
maxNamedTagLength: import("./iterateJsdoc.js").Integer;
|
|
5
|
+
maxUnnamedTagLength: import("./iterateJsdoc.js").Integer;
|
|
6
|
+
};
|
|
7
|
+
export type Width = {
|
|
8
|
+
name: import("./iterateJsdoc.js").Integer;
|
|
9
|
+
start: import("./iterateJsdoc.js").Integer;
|
|
10
|
+
tag: import("./iterateJsdoc.js").Integer;
|
|
11
|
+
type: import("./iterateJsdoc.js").Integer;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @param {{
|
|
15
|
+
* customSpacings: import('../src/rules/checkLineAlignment.js').CustomSpacings,
|
|
16
|
+
* tags: string[],
|
|
17
|
+
* indent: string,
|
|
18
|
+
* preserveMainDescriptionPostDelimiter: boolean,
|
|
19
|
+
* wrapIndent: string,
|
|
20
|
+
* disableWrapIndent: boolean,
|
|
21
|
+
* }} cfg
|
|
22
|
+
* @returns {(
|
|
23
|
+
* block: import('comment-parser').Block
|
|
24
|
+
* ) => import('comment-parser').Block}
|
|
25
|
+
*/
|
|
26
|
+
declare function alignTransform({ customSpacings, disableWrapIndent, indent, preserveMainDescriptionPostDelimiter, tags, wrapIndent, }: {
|
|
27
|
+
customSpacings: import("../src/rules/checkLineAlignment.js").CustomSpacings;
|
|
28
|
+
tags: string[];
|
|
29
|
+
indent: string;
|
|
30
|
+
preserveMainDescriptionPostDelimiter: boolean;
|
|
31
|
+
wrapIndent: string;
|
|
32
|
+
disableWrapIndent: boolean;
|
|
33
|
+
}): (block: import("comment-parser").Block) => import("comment-parser").Block;
|
|
34
|
+
//# sourceMappingURL=alignTransform.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
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;
|
|
41
|
+
//# sourceMappingURL=exportParser.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
11
|
+
//# sourceMappingURL=getDefaultTagStructureForMode.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* @typedef {"recommended" | "stylistic" | "contents" | "logical" | "requirements"} ConfigGroups
|
|
7
|
+
* @typedef {"" | "-typescript" | "-typescript-flavor"} ConfigVariants
|
|
8
|
+
* @typedef {"" | "-error"} ErrorLevelVariants
|
|
9
|
+
* @type {import('eslint').ESLint.Plugin & {
|
|
10
|
+
* configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`,
|
|
11
|
+
* import('eslint').Linter.Config>
|
|
12
|
+
* }}
|
|
13
|
+
*/
|
|
14
|
+
declare const index: import("eslint").ESLint.Plugin & {
|
|
15
|
+
configs: Record<`flat/${ConfigGroups}${ConfigVariants}${ErrorLevelVariants}`, import("eslint").Linter.Config>;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index-cjs.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default index;
|
|
2
|
+
/**
|
|
3
|
+
* @type {((
|
|
4
|
+
* cfg?: {
|
|
5
|
+
* mergeSettings?: boolean,
|
|
6
|
+
* config?: `flat/${import('./index-cjs.js').ConfigGroups}${import('./index-cjs.js').ConfigVariants}${import('./index-cjs.js').ErrorLevelVariants}`,
|
|
7
|
+
* settings?: Partial<import('./iterateJsdoc.js').Settings>,
|
|
8
|
+
* rules?: {[key in keyof import('./rules.d.ts').Rules]?: ["error"|"warn"|"off", ...import('./rules.d.ts').Rules[key]]}
|
|
9
|
+
* }
|
|
10
|
+
* ) => import('eslint').Linter.Config)}
|
|
11
|
+
*/
|
|
12
|
+
export const jsdoc: ((cfg?: {
|
|
13
|
+
mergeSettings?: boolean;
|
|
14
|
+
config?: `flat/${import("./index-cjs.js").ConfigGroups}${import("./index-cjs.js").ConfigVariants}${import("./index-cjs.js").ErrorLevelVariants}`;
|
|
15
|
+
settings?: Partial<import("./iterateJsdoc.js").Settings>;
|
|
16
|
+
rules?: { [key in keyof import("./rules.d.ts").Rules]?: ["error" | "warn" | "off", ...import("./rules.d.ts").Rules[key]]; };
|
|
17
|
+
}) => import("eslint").Linter.Config);
|
|
18
|
+
import index from './index-cjs.js';
|
|
19
|
+
//# sourceMappingURL=index-esm.d.ts.map
|
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
export type Integer = number;
|
|
2
|
+
export type ESTreeOrTypeScriptNode = import("./utils/hasReturnValue.js").ESTreeOrTypeScriptNode;
|
|
3
|
+
export type ParserMode = "jsdoc" | "typescript" | "closure" | "permissive";
|
|
4
|
+
export type ParamCommon = undefined | string | {
|
|
5
|
+
name: Integer;
|
|
6
|
+
restElement: boolean;
|
|
7
|
+
} | {
|
|
8
|
+
isRestProperty: boolean | undefined;
|
|
9
|
+
name: string;
|
|
10
|
+
restElement: boolean;
|
|
11
|
+
} | {
|
|
12
|
+
name: string;
|
|
13
|
+
restElement: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type ParamNameInfo = ParamCommon | [string | undefined, (FlattendRootInfo & {
|
|
16
|
+
annotationParamName?: string;
|
|
17
|
+
})] | NestedParamInfo;
|
|
18
|
+
export type FlattendRootInfo = {
|
|
19
|
+
hasPropertyRest: boolean;
|
|
20
|
+
hasRestElement: boolean;
|
|
21
|
+
names: string[];
|
|
22
|
+
rests: boolean[];
|
|
23
|
+
};
|
|
24
|
+
export type NestedParamInfo = [string, (string[] | ParamInfo[])];
|
|
25
|
+
export type ParamInfo = ParamCommon | [string | undefined, (FlattendRootInfo & {
|
|
26
|
+
annotationParamName?: string;
|
|
27
|
+
})] | NestedParamInfo;
|
|
28
|
+
/**
|
|
29
|
+
* Given a nested array of property names, reduce them to a single array,
|
|
30
|
+
* appending the name of the root element along the way if present.
|
|
31
|
+
*/
|
|
32
|
+
export type FlattenRoots = (params: ParamInfo[], root?: string | undefined) => FlattendRootInfo;
|
|
33
|
+
export type Reporter = {
|
|
34
|
+
report: (descriptor: import("eslint").Rule.ReportDescriptor) => void;
|
|
35
|
+
};
|
|
36
|
+
export type DefaultContexts = true | string[];
|
|
37
|
+
export type TagNamePreference = {
|
|
38
|
+
[key: string]: false | string | {
|
|
39
|
+
message: string;
|
|
40
|
+
replacement?: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export type PathDoesNotBeginWith = (name: string, otherPathName: string) => boolean;
|
|
44
|
+
/**
|
|
45
|
+
* @param {string} name
|
|
46
|
+
* @returns {(otherPathName: string) => boolean}
|
|
47
|
+
*/
|
|
48
|
+
export function comparePaths(name: string): (otherPathName: string) => boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Since path segments may be unquoted (if matching a reserved word,
|
|
51
|
+
* identifier or numeric literal) or single or double quoted, in either
|
|
52
|
+
* the `@param` or in source, we need to strip the quotes to give a fair
|
|
53
|
+
* comparison.
|
|
54
|
+
* @param {string} str
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
export function dropPathSegmentQuotes(str: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* @typedef {true|string[]} DefaultContexts
|
|
60
|
+
*/
|
|
61
|
+
/**
|
|
62
|
+
* Checks user option for `contexts` array, defaulting to
|
|
63
|
+
* contexts designated by the rule. Returns an array of
|
|
64
|
+
* ESTree AST types, indicating allowable contexts.
|
|
65
|
+
* @param {import('eslint').Rule.RuleContext} context
|
|
66
|
+
* @param {DefaultContexts|undefined} defaultContexts
|
|
67
|
+
* @param {{
|
|
68
|
+
* contexts?: import('./iterateJsdoc.js').Context[]
|
|
69
|
+
* }} settings
|
|
70
|
+
* @returns {(string|import('./iterateJsdoc.js').ContextObject)[]}
|
|
71
|
+
*/
|
|
72
|
+
export function enforcedContexts(context: import("eslint").Rule.RuleContext, defaultContexts: DefaultContexts | undefined, settings: {
|
|
73
|
+
contexts?: import("./iterateJsdoc.js").Context[];
|
|
74
|
+
}): (string | import("./iterateJsdoc.js").ContextObject)[];
|
|
75
|
+
/**
|
|
76
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
77
|
+
* @param {import('eslint').Rule.Node|null} node
|
|
78
|
+
* @param {import('eslint').Rule.RuleContext} context
|
|
79
|
+
* @param {import('json-schema').JSONSchema4} schema
|
|
80
|
+
* @returns {boolean}
|
|
81
|
+
*/
|
|
82
|
+
export function exemptSpeciaMethods(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, node: import("eslint").Rule.Node | null, context: import("eslint").Rule.RuleContext, schema: import("json-schema").JSONSchema4): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
85
|
+
* @param {(tag: import('@es-joy/jsdoccomment').JsdocTagWithInline) => boolean} filter
|
|
86
|
+
* @returns {import('@es-joy/jsdoccomment').JsdocTagWithInline[]}
|
|
87
|
+
*/
|
|
88
|
+
export function filterTags(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, filter: (tag: import("@es-joy/jsdoccomment").JsdocTagWithInline) => boolean): import("@es-joy/jsdoccomment").JsdocTagWithInline[];
|
|
89
|
+
/**
|
|
90
|
+
* @typedef {undefined|string|{
|
|
91
|
+
* name: Integer,
|
|
92
|
+
* restElement: boolean
|
|
93
|
+
* }|{
|
|
94
|
+
* isRestProperty: boolean|undefined,
|
|
95
|
+
* name: string,
|
|
96
|
+
* restElement: boolean
|
|
97
|
+
* }|{
|
|
98
|
+
* name: string,
|
|
99
|
+
* restElement: boolean
|
|
100
|
+
* }} ParamCommon
|
|
101
|
+
*/
|
|
102
|
+
/**
|
|
103
|
+
* @typedef {ParamCommon|[string|undefined, (FlattendRootInfo & {
|
|
104
|
+
* annotationParamName?: string,
|
|
105
|
+
* })]|NestedParamInfo} ParamNameInfo
|
|
106
|
+
*/
|
|
107
|
+
/**
|
|
108
|
+
* @typedef {{
|
|
109
|
+
* hasPropertyRest: boolean,
|
|
110
|
+
* hasRestElement: boolean,
|
|
111
|
+
* names: string[],
|
|
112
|
+
* rests: boolean[],
|
|
113
|
+
* }} FlattendRootInfo
|
|
114
|
+
*/
|
|
115
|
+
/**
|
|
116
|
+
* @typedef {[string, (string[]|ParamInfo[])]} NestedParamInfo
|
|
117
|
+
*/
|
|
118
|
+
/**
|
|
119
|
+
* @typedef {ParamCommon|
|
|
120
|
+
* [string|undefined, (FlattendRootInfo & {
|
|
121
|
+
* annotationParamName?: string
|
|
122
|
+
* })]|
|
|
123
|
+
* NestedParamInfo} ParamInfo
|
|
124
|
+
*/
|
|
125
|
+
/**
|
|
126
|
+
* Given a nested array of property names, reduce them to a single array,
|
|
127
|
+
* appending the name of the root element along the way if present.
|
|
128
|
+
* @callback FlattenRoots
|
|
129
|
+
* @param {ParamInfo[]} params
|
|
130
|
+
* @param {string} [root]
|
|
131
|
+
* @returns {FlattendRootInfo}
|
|
132
|
+
*/
|
|
133
|
+
/** @type {FlattenRoots} */
|
|
134
|
+
export const flattenRoots: FlattenRoots;
|
|
135
|
+
/**
|
|
136
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
137
|
+
* @param {string} tagName
|
|
138
|
+
* @param {(
|
|
139
|
+
* matchingJsdocTag: import('@es-joy/jsdoccomment').JsdocTagWithInline,
|
|
140
|
+
* targetTagName: string
|
|
141
|
+
* ) => void} arrayHandler
|
|
142
|
+
* @param {object} cfg
|
|
143
|
+
* @param {import('eslint').Rule.RuleContext} [cfg.context]
|
|
144
|
+
* @param {ParserMode} [cfg.mode]
|
|
145
|
+
* @param {import('./iterateJsdoc.js').Report} [cfg.report]
|
|
146
|
+
* @param {TagNamePreference} [cfg.tagNamePreference]
|
|
147
|
+
* @param {boolean} [cfg.skipReportingBlockedTag]
|
|
148
|
+
* @returns {void}
|
|
149
|
+
*/
|
|
150
|
+
export function forEachPreferredTag(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, tagName: string, arrayHandler: (matchingJsdocTag: import("@es-joy/jsdoccomment").JsdocTagWithInline, targetTagName: string) => void, { context, mode, report, skipReportingBlockedTag, tagNamePreference, }?: {
|
|
151
|
+
context?: import("eslint").Rule.RuleContext | undefined;
|
|
152
|
+
mode?: ParserMode | undefined;
|
|
153
|
+
report?: import("./iterateJsdoc.js").Report | undefined;
|
|
154
|
+
tagNamePreference?: TagNamePreference | undefined;
|
|
155
|
+
skipReportingBlockedTag?: boolean | undefined;
|
|
156
|
+
}): void;
|
|
157
|
+
/**
|
|
158
|
+
* Get all tags, inline tags and inline tags in tags
|
|
159
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
160
|
+
* @returns {(import('comment-parser').Spec|
|
|
161
|
+
* import('@es-joy/jsdoccomment').JsdocInlineTagNoType)[]}
|
|
162
|
+
*/
|
|
163
|
+
export function getAllTags(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline): (import("comment-parser").Spec | import("@es-joy/jsdoccomment").JsdocInlineTagNoType)[];
|
|
164
|
+
/**
|
|
165
|
+
* @param {import('./iterateJsdoc.js').Context[]} contexts
|
|
166
|
+
* @param {import('./iterateJsdoc.js').CheckJsdoc} checkJsdoc
|
|
167
|
+
* @param {import('@es-joy/jsdoccomment').CommentHandler} [handler]
|
|
168
|
+
* @returns {import('eslint').Rule.RuleListener}
|
|
169
|
+
*/
|
|
170
|
+
export function getContextObject(contexts: import("./iterateJsdoc.js").Context[], checkJsdoc: import("./iterateJsdoc.js").CheckJsdoc, handler?: import("@es-joy/jsdoccomment").CommentHandler): import("eslint").Rule.RuleListener;
|
|
171
|
+
/**
|
|
172
|
+
* @param {ESTreeOrTypeScriptNode|null} functionNode
|
|
173
|
+
* @param {boolean} [checkDefaultObjects]
|
|
174
|
+
* @throws {Error}
|
|
175
|
+
* @returns {ParamNameInfo[]}
|
|
176
|
+
*/
|
|
177
|
+
export function getFunctionParameterNames(functionNode: ESTreeOrTypeScriptNode | null, checkDefaultObjects?: boolean): ParamNameInfo[];
|
|
178
|
+
/**
|
|
179
|
+
* @param {import('eslint').SourceCode|{
|
|
180
|
+
* text: string
|
|
181
|
+
* }} sourceCode
|
|
182
|
+
* @returns {string}
|
|
183
|
+
*/
|
|
184
|
+
export function getIndent(sourceCode: import("eslint").SourceCode | {
|
|
185
|
+
text: string;
|
|
186
|
+
}): string;
|
|
187
|
+
/**
|
|
188
|
+
* Gets all names of the target type, including those that refer to a path, e.g.
|
|
189
|
+
* `foo` or `foo.bar`.
|
|
190
|
+
* @param {import('comment-parser').Block} jsdoc
|
|
191
|
+
* @param {string} targetTagName
|
|
192
|
+
* @returns {{
|
|
193
|
+
* idx: Integer,
|
|
194
|
+
* name: string,
|
|
195
|
+
* type: string
|
|
196
|
+
* }[]}
|
|
197
|
+
*/
|
|
198
|
+
export function getJsdocTagsDeep(jsdoc: import("comment-parser").Block, targetTagName: string): {
|
|
199
|
+
idx: Integer;
|
|
200
|
+
name: string;
|
|
201
|
+
type: string;
|
|
202
|
+
}[];
|
|
203
|
+
/**
|
|
204
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
205
|
+
* @param {{
|
|
206
|
+
* tagName: string,
|
|
207
|
+
* context?: import('eslint').Rule.RuleContext,
|
|
208
|
+
* mode?: ParserMode,
|
|
209
|
+
* report?: import('./iterateJsdoc.js').Report
|
|
210
|
+
* tagNamePreference?: TagNamePreference
|
|
211
|
+
* skipReportingBlockedTag?: boolean,
|
|
212
|
+
* allowObjectReturn?: boolean,
|
|
213
|
+
* defaultMessage?: string,
|
|
214
|
+
* }} cfg
|
|
215
|
+
* @returns {string|undefined|false|{
|
|
216
|
+
* message: string;
|
|
217
|
+
* replacement?: string|undefined;
|
|
218
|
+
* }|{
|
|
219
|
+
* blocked: true,
|
|
220
|
+
* tagName: string
|
|
221
|
+
* }}
|
|
222
|
+
*/
|
|
223
|
+
export function getPreferredTagName(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, { allowObjectReturn, context, tagName, defaultMessage, mode, report, skipReportingBlockedTag, tagNamePreference, }: {
|
|
224
|
+
tagName: string;
|
|
225
|
+
context?: import("eslint").Rule.RuleContext;
|
|
226
|
+
mode?: ParserMode;
|
|
227
|
+
report?: import("./iterateJsdoc.js").Report;
|
|
228
|
+
tagNamePreference?: TagNamePreference;
|
|
229
|
+
skipReportingBlockedTag?: boolean;
|
|
230
|
+
allowObjectReturn?: boolean;
|
|
231
|
+
defaultMessage?: string;
|
|
232
|
+
}): string | undefined | false | {
|
|
233
|
+
message: string;
|
|
234
|
+
replacement?: string | undefined;
|
|
235
|
+
} | {
|
|
236
|
+
blocked: true;
|
|
237
|
+
tagName: string;
|
|
238
|
+
};
|
|
239
|
+
/**
|
|
240
|
+
* @typedef {{
|
|
241
|
+
* report: (descriptor: import('eslint').Rule.ReportDescriptor) => void
|
|
242
|
+
* }} Reporter
|
|
243
|
+
*/
|
|
244
|
+
/**
|
|
245
|
+
* @param {string} name
|
|
246
|
+
* @param {ParserMode|undefined} mode
|
|
247
|
+
* @param {TagNamePreference} tagPreference
|
|
248
|
+
* @param {Reporter} context
|
|
249
|
+
* @returns {string|false|{
|
|
250
|
+
* message: string;
|
|
251
|
+
* replacement?: string|undefined;
|
|
252
|
+
* }}
|
|
253
|
+
*/
|
|
254
|
+
export function getPreferredTagNameSimple(name: string, mode: ParserMode | undefined, tagPreference?: TagNamePreference, context?: Reporter): string | false | {
|
|
255
|
+
message: string;
|
|
256
|
+
replacement?: string | undefined;
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* @param {string} regexString
|
|
260
|
+
* @param {string} [requiredFlags]
|
|
261
|
+
* @returns {RegExp}
|
|
262
|
+
*/
|
|
263
|
+
export function getRegexFromString(regexString: string, requiredFlags?: string): RegExp;
|
|
264
|
+
/**
|
|
265
|
+
* @param {import('comment-parser').Spec} tg
|
|
266
|
+
* @param {boolean} [returnArray]
|
|
267
|
+
* @returns {string[]|string}
|
|
268
|
+
*/
|
|
269
|
+
export function getTagDescription(tg: import("comment-parser").Spec, returnArray?: boolean): string[] | string;
|
|
270
|
+
/**
|
|
271
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
272
|
+
* @param {string} tagName
|
|
273
|
+
* @returns {import('comment-parser').Spec[]}
|
|
274
|
+
*/
|
|
275
|
+
export function getTags(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, tagName: string): import("comment-parser").Spec[];
|
|
276
|
+
/**
|
|
277
|
+
* @typedef {{
|
|
278
|
+
* [key: string]: false|string|
|
|
279
|
+
* {message: string, replacement?: string}
|
|
280
|
+
* }} TagNamePreference
|
|
281
|
+
*/
|
|
282
|
+
/**
|
|
283
|
+
* @param {import('eslint').Rule.RuleContext} context
|
|
284
|
+
* @param {ParserMode|undefined} mode
|
|
285
|
+
* @param {import('comment-parser').Spec[]} tags
|
|
286
|
+
* @returns {{
|
|
287
|
+
* tagsWithNames: import('comment-parser').Spec[],
|
|
288
|
+
* tagsWithoutNames: import('comment-parser').Spec[]
|
|
289
|
+
* }}
|
|
290
|
+
*/
|
|
291
|
+
export function getTagsByType(context: import("eslint").Rule.RuleContext, mode: ParserMode | undefined, tags: import("comment-parser").Spec[]): {
|
|
292
|
+
tagsWithNames: import("comment-parser").Spec[];
|
|
293
|
+
tagsWithoutNames: import("comment-parser").Spec[];
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* @param {ParserMode} mode
|
|
297
|
+
* @param {import('./iterateJsdoc.js').StructuredTags} structuredTags
|
|
298
|
+
* @returns {import('./getDefaultTagStructureForMode.js').TagStructure}
|
|
299
|
+
*/
|
|
300
|
+
export function getTagStructureForMode(mode: ParserMode, structuredTags: import("./iterateJsdoc.js").StructuredTags): import("./getDefaultTagStructureForMode.js").TagStructure;
|
|
301
|
+
/**
|
|
302
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
303
|
+
* @param {string[]} targetTagNames
|
|
304
|
+
* @returns {boolean}
|
|
305
|
+
*/
|
|
306
|
+
export function hasATag(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, targetTagNames: string[]): boolean;
|
|
307
|
+
/**
|
|
308
|
+
* @param {ESTreeOrTypeScriptNode} functionNode
|
|
309
|
+
* @returns {Integer}
|
|
310
|
+
*/
|
|
311
|
+
export function hasParams(functionNode: ESTreeOrTypeScriptNode): Integer;
|
|
312
|
+
/**
|
|
313
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
314
|
+
* @param {string} targetTagName
|
|
315
|
+
* @returns {boolean}
|
|
316
|
+
*/
|
|
317
|
+
export function hasTag(jsdoc: import("./iterateJsdoc.js").JsdocBlockWithInline, targetTagName: string): boolean;
|
|
318
|
+
/**
|
|
319
|
+
* Checks if a node has a throws statement.
|
|
320
|
+
* @param {ESTreeOrTypeScriptNode|null|undefined} node
|
|
321
|
+
* @param {boolean} [innerFunction]
|
|
322
|
+
* @returns {boolean}
|
|
323
|
+
*/
|
|
324
|
+
export function hasThrowValue(node: ESTreeOrTypeScriptNode | null | undefined, innerFunction?: boolean): boolean;
|
|
325
|
+
/**
|
|
326
|
+
* Checks if a node has a return statement. Void return does not count.
|
|
327
|
+
* @param {ESTreeOrTypeScriptNode} node
|
|
328
|
+
* @param {boolean} [checkYieldReturnValue]
|
|
329
|
+
* @returns {boolean}
|
|
330
|
+
*/
|
|
331
|
+
export function hasYieldValue(node: ESTreeOrTypeScriptNode, checkYieldReturnValue?: boolean): boolean;
|
|
332
|
+
/**
|
|
333
|
+
* @param {import('eslint').Rule.Node|null} node
|
|
334
|
+
* @returns {boolean}
|
|
335
|
+
*/
|
|
336
|
+
export function isConstructor(node: import("eslint").Rule.Node | null): boolean;
|
|
337
|
+
/**
|
|
338
|
+
* @param {import('eslint').Rule.Node|null} node
|
|
339
|
+
* @returns {boolean}
|
|
340
|
+
*/
|
|
341
|
+
export function isGetter(node: import("eslint").Rule.Node | null): boolean;
|
|
342
|
+
/**
|
|
343
|
+
* @param {string} tag
|
|
344
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
345
|
+
* @returns {boolean}
|
|
346
|
+
*/
|
|
347
|
+
export function isNamepathDefiningTag(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
|
|
348
|
+
/**
|
|
349
|
+
* @param {string} tag
|
|
350
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
351
|
+
* @returns {boolean}
|
|
352
|
+
*/
|
|
353
|
+
export function isNamepathOrUrlReferencingTag(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
|
|
354
|
+
/**
|
|
355
|
+
* @param {string} tag
|
|
356
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
357
|
+
* @returns {boolean}
|
|
358
|
+
*/
|
|
359
|
+
export function isNamepathReferencingTag(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
|
|
360
|
+
/**
|
|
361
|
+
* @param {import('eslint').Rule.Node|null} node
|
|
362
|
+
* @returns {boolean}
|
|
363
|
+
*/
|
|
364
|
+
export function isSetter(node: import("eslint").Rule.Node | null): boolean;
|
|
365
|
+
/**
|
|
366
|
+
* @param {import('eslint').Rule.RuleContext} context
|
|
367
|
+
* @param {ParserMode|undefined} mode
|
|
368
|
+
* @param {string} name
|
|
369
|
+
* @param {string[]} definedTags
|
|
370
|
+
* @returns {boolean}
|
|
371
|
+
*/
|
|
372
|
+
export function isValidTag(context: import("eslint").Rule.RuleContext, mode: ParserMode | undefined, name: string, definedTags: string[]): boolean;
|
|
373
|
+
/**
|
|
374
|
+
* Checks if the JSDoc comment has an undefined type.
|
|
375
|
+
* @param {import('comment-parser').Spec|null|undefined} tag
|
|
376
|
+
* the tag which should be checked.
|
|
377
|
+
* @param {ParserMode} mode
|
|
378
|
+
* @returns {boolean}
|
|
379
|
+
* true in case a defined type is undeclared; otherwise false.
|
|
380
|
+
*/
|
|
381
|
+
export function mayBeUndefinedTypeTag(tag: import("comment-parser").Spec | null | undefined, mode: ParserMode): boolean;
|
|
382
|
+
/**
|
|
383
|
+
* @param {import('./iterateJsdoc.js').StructuredTags} structuredTags
|
|
384
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
385
|
+
* @returns {void}
|
|
386
|
+
*/
|
|
387
|
+
export function overrideTagStructure(structuredTags: import("./iterateJsdoc.js").StructuredTags, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): void;
|
|
388
|
+
/**
|
|
389
|
+
* @param {string} tag
|
|
390
|
+
*/
|
|
391
|
+
/**
|
|
392
|
+
* Parses GCC Generic/Template types
|
|
393
|
+
* @see {@link https://github.com/google/closure-compiler/wiki/Generic-Types}
|
|
394
|
+
* @see {@link https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#template}
|
|
395
|
+
* @param {import('comment-parser').Spec} tag
|
|
396
|
+
* @returns {string[]}
|
|
397
|
+
*/
|
|
398
|
+
export function parseClosureTemplateTag(tag: import("comment-parser").Spec): string[];
|
|
399
|
+
/**
|
|
400
|
+
* @callback PathDoesNotBeginWith
|
|
401
|
+
* @param {string} name
|
|
402
|
+
* @param {string} otherPathName
|
|
403
|
+
* @returns {boolean}
|
|
404
|
+
*/
|
|
405
|
+
/** @type {PathDoesNotBeginWith} */
|
|
406
|
+
export const pathDoesNotBeginWith: PathDoesNotBeginWith;
|
|
407
|
+
/**
|
|
408
|
+
* @param {ParserMode} mode
|
|
409
|
+
* @returns {void}
|
|
410
|
+
*/
|
|
411
|
+
export function setTagStructure(mode: ParserMode): void;
|
|
412
|
+
/**
|
|
413
|
+
* @param {string} tag
|
|
414
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
415
|
+
* @returns {boolean}
|
|
416
|
+
*/
|
|
417
|
+
export function tagMightHaveEitherTypeOrNamePosition(tag: string, tagMap: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
|
|
418
|
+
/**
|
|
419
|
+
* @param {string} tag
|
|
420
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
421
|
+
* @returns {boolean}
|
|
422
|
+
*/
|
|
423
|
+
export function tagMightHaveNamepath(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
|
|
424
|
+
/**
|
|
425
|
+
* @param {string} tag
|
|
426
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
427
|
+
* @returns {boolean}
|
|
428
|
+
*/
|
|
429
|
+
export function tagMightHaveNamePosition(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean;
|
|
430
|
+
/**
|
|
431
|
+
* @param {string} tag
|
|
432
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
433
|
+
* @returns {boolean|string}
|
|
434
|
+
*/
|
|
435
|
+
export function tagMightHaveTypePosition(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean | string;
|
|
436
|
+
/**
|
|
437
|
+
* @param {import('comment-parser').Spec} tag
|
|
438
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
439
|
+
* @returns {boolean|undefined}
|
|
440
|
+
*/
|
|
441
|
+
export function tagMissingRequiredTypeOrNamepath(tag: import("comment-parser").Spec, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean | undefined;
|
|
442
|
+
/**
|
|
443
|
+
* @param {string} tag
|
|
444
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
445
|
+
* @returns {boolean|undefined}
|
|
446
|
+
*/
|
|
447
|
+
export function tagMustHaveNamePosition(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean | undefined;
|
|
448
|
+
/**
|
|
449
|
+
* @param {string} tag
|
|
450
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
451
|
+
* @returns {boolean|undefined}
|
|
452
|
+
*/
|
|
453
|
+
export function tagMustHaveTypePosition(tag: string, tagMap?: import("./getDefaultTagStructureForMode.js").TagStructure): boolean | undefined;
|
|
454
|
+
export { hasReturnValue, hasValueOrExecutorHasNonEmptyResolveValue } from "./utils/hasReturnValue.js";
|
|
455
|
+
//# sourceMappingURL=jsdocUtils.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const _default: import("eslint").Rule.RuleModule;
|
|
2
|
+
export default _default;
|
|
3
|
+
export type CustomSpacings = {
|
|
4
|
+
postDelimiter: import("../iterateJsdoc.js").Integer;
|
|
5
|
+
postHyphen: import("../iterateJsdoc.js").Integer;
|
|
6
|
+
postName: import("../iterateJsdoc.js").Integer;
|
|
7
|
+
postTag: import("../iterateJsdoc.js").Integer;
|
|
8
|
+
postType: import("../iterateJsdoc.js").Integer;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=checkLineAlignment.d.ts.map
|