eslint-plugin-jsdoc 46.4.5 → 46.4.6
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/WarnSettings.d.ts.map +1 -0
- package/dist/alignTransform.d.ts +32 -0
- package/dist/alignTransform.d.ts.map +1 -0
- package/dist/alignTransform.js +5 -5
- package/dist/alignTransform.js.map +1 -1
- package/dist/defaultTagOrder.d.ts +5 -0
- package/dist/defaultTagOrder.d.ts.map +1 -0
- package/dist/exportParser.d.ts +41 -0
- package/dist/exportParser.d.ts.map +1 -0
- package/dist/getDefaultTagStructureForMode.d.ts +11 -0
- package/dist/getDefaultTagStructureForMode.d.ts.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/iterateJsdoc.d.ts +460 -0
- package/dist/iterateJsdoc.d.ts.map +1 -0
- package/dist/iterateJsdoc.js +1 -1
- package/dist/iterateJsdoc.js.map +1 -1
- package/dist/jsdocUtils.d.ts +421 -0
- package/dist/jsdocUtils.d.ts.map +1 -0
- package/dist/rules/checkAccess.d.ts +3 -0
- package/dist/rules/checkAccess.d.ts.map +1 -0
- package/dist/rules/checkAlignment.d.ts +3 -0
- package/dist/rules/checkAlignment.d.ts.map +1 -0
- package/dist/rules/checkExamples.d.ts +4 -0
- package/dist/rules/checkExamples.d.ts.map +1 -0
- package/dist/rules/checkExamples.js +12 -6
- package/dist/rules/checkExamples.js.map +1 -1
- package/dist/rules/checkIndentation.d.ts +3 -0
- package/dist/rules/checkIndentation.d.ts.map +1 -0
- package/dist/rules/checkLineAlignment.d.ts +10 -0
- package/dist/rules/checkLineAlignment.d.ts.map +1 -0
- package/dist/rules/checkParamNames.d.ts +3 -0
- package/dist/rules/checkParamNames.d.ts.map +1 -0
- package/dist/rules/checkPropertyNames.d.ts +3 -0
- package/dist/rules/checkPropertyNames.d.ts.map +1 -0
- package/dist/rules/checkSyntax.d.ts +3 -0
- package/dist/rules/checkSyntax.d.ts.map +1 -0
- package/dist/rules/checkTagNames.d.ts +3 -0
- package/dist/rules/checkTagNames.d.ts.map +1 -0
- package/dist/rules/checkTypes.d.ts +3 -0
- package/dist/rules/checkTypes.d.ts.map +1 -0
- package/dist/rules/checkValues.d.ts +3 -0
- package/dist/rules/checkValues.d.ts.map +1 -0
- package/dist/rules/emptyTags.d.ts +3 -0
- package/dist/rules/emptyTags.d.ts.map +1 -0
- package/dist/rules/implementsOnClasses.d.ts +3 -0
- package/dist/rules/implementsOnClasses.d.ts.map +1 -0
- package/dist/rules/importsAsDependencies.d.ts +3 -0
- package/dist/rules/importsAsDependencies.d.ts.map +1 -0
- package/dist/rules/informativeDocs.d.ts +3 -0
- package/dist/rules/informativeDocs.d.ts.map +1 -0
- package/dist/rules/matchDescription.d.ts +3 -0
- package/dist/rules/matchDescription.d.ts.map +1 -0
- package/dist/rules/matchName.d.ts +3 -0
- package/dist/rules/matchName.d.ts.map +1 -0
- package/dist/rules/multilineBlocks.d.ts +3 -0
- package/dist/rules/multilineBlocks.d.ts.map +1 -0
- package/dist/rules/noBadBlocks.d.ts +3 -0
- package/dist/rules/noBadBlocks.d.ts.map +1 -0
- package/dist/rules/noBlankBlockDescriptions.d.ts +3 -0
- package/dist/rules/noBlankBlockDescriptions.d.ts.map +1 -0
- package/dist/rules/noBlankBlocks.d.ts +3 -0
- package/dist/rules/noBlankBlocks.d.ts.map +1 -0
- package/dist/rules/noDefaults.d.ts +3 -0
- package/dist/rules/noDefaults.d.ts.map +1 -0
- package/dist/rules/noMissingSyntax.d.ts +10 -0
- package/dist/rules/noMissingSyntax.d.ts.map +1 -0
- package/dist/rules/noMultiAsterisks.d.ts +3 -0
- package/dist/rules/noMultiAsterisks.d.ts.map +1 -0
- package/dist/rules/noRestrictedSyntax.d.ts +3 -0
- package/dist/rules/noRestrictedSyntax.d.ts.map +1 -0
- package/dist/rules/noTypes.d.ts +3 -0
- package/dist/rules/noTypes.d.ts.map +1 -0
- package/dist/rules/noUndefinedTypes.d.ts +3 -0
- package/dist/rules/noUndefinedTypes.d.ts.map +1 -0
- package/dist/rules/requireAsteriskPrefix.d.ts +3 -0
- package/dist/rules/requireAsteriskPrefix.d.ts.map +1 -0
- package/dist/rules/requireDescription.d.ts +3 -0
- package/dist/rules/requireDescription.d.ts.map +1 -0
- package/dist/rules/requireDescriptionCompleteSentence.d.ts +3 -0
- package/dist/rules/requireDescriptionCompleteSentence.d.ts.map +1 -0
- package/dist/rules/requireExample.d.ts +3 -0
- package/dist/rules/requireExample.d.ts.map +1 -0
- package/dist/rules/requireFileOverview.d.ts +3 -0
- package/dist/rules/requireFileOverview.d.ts.map +1 -0
- package/dist/rules/requireHyphenBeforeParamDescription.d.ts +3 -0
- package/dist/rules/requireHyphenBeforeParamDescription.d.ts.map +1 -0
- package/dist/rules/requireJsdoc.d.ts +9 -0
- package/dist/rules/requireJsdoc.d.ts.map +1 -0
- package/dist/rules/requireParam.d.ts +4 -0
- package/dist/rules/requireParam.d.ts.map +1 -0
- package/dist/rules/requireParamDescription.d.ts +3 -0
- package/dist/rules/requireParamDescription.d.ts.map +1 -0
- package/dist/rules/requireParamName.d.ts +3 -0
- package/dist/rules/requireParamName.d.ts.map +1 -0
- package/dist/rules/requireParamType.d.ts +3 -0
- package/dist/rules/requireParamType.d.ts.map +1 -0
- package/dist/rules/requireProperty.d.ts +3 -0
- package/dist/rules/requireProperty.d.ts.map +1 -0
- package/dist/rules/requirePropertyDescription.d.ts +3 -0
- package/dist/rules/requirePropertyDescription.d.ts.map +1 -0
- package/dist/rules/requirePropertyName.d.ts +3 -0
- package/dist/rules/requirePropertyName.d.ts.map +1 -0
- package/dist/rules/requirePropertyType.d.ts +3 -0
- package/dist/rules/requirePropertyType.d.ts.map +1 -0
- package/dist/rules/requireReturns.d.ts +3 -0
- package/dist/rules/requireReturns.d.ts.map +1 -0
- package/dist/rules/requireReturnsCheck.d.ts +3 -0
- package/dist/rules/requireReturnsCheck.d.ts.map +1 -0
- package/dist/rules/requireReturnsDescription.d.ts +3 -0
- package/dist/rules/requireReturnsDescription.d.ts.map +1 -0
- package/dist/rules/requireReturnsType.d.ts +3 -0
- package/dist/rules/requireReturnsType.d.ts.map +1 -0
- package/dist/rules/requireThrows.d.ts +3 -0
- package/dist/rules/requireThrows.d.ts.map +1 -0
- package/dist/rules/requireYields.d.ts +3 -0
- package/dist/rules/requireYields.d.ts.map +1 -0
- package/dist/rules/requireYieldsCheck.d.ts +3 -0
- package/dist/rules/requireYieldsCheck.d.ts.map +1 -0
- package/dist/rules/sortTags.d.ts +3 -0
- package/dist/rules/sortTags.d.ts.map +1 -0
- package/dist/rules/tagLines.d.ts +3 -0
- package/dist/rules/tagLines.d.ts.map +1 -0
- package/dist/rules/textEscaping.d.ts +3 -0
- package/dist/rules/textEscaping.d.ts.map +1 -0
- package/dist/rules/validTypes.d.ts +3 -0
- package/dist/rules/validTypes.d.ts.map +1 -0
- package/dist/tagNames.d.ts +16 -0
- package/dist/tagNames.d.ts.map +1 -0
- package/dist/utils/hasReturnValue.d.ts +20 -0
- package/dist/utils/hasReturnValue.d.ts.map +1 -0
- package/docs/rules/imports-as-dependencies.md +1 -1
- package/package.json +10 -8
- package/tsconfig-prod.json +20 -0
- package/tsconfig.json +0 -1
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export { comparePaths };
|
|
3
|
+
export { dropPathSegmentQuotes };
|
|
4
|
+
export { enforcedContexts };
|
|
5
|
+
export { exemptSpeciaMethods };
|
|
6
|
+
export { flattenRoots };
|
|
7
|
+
export { getAllTags };
|
|
8
|
+
export { getContextObject };
|
|
9
|
+
export { getFunctionParameterNames };
|
|
10
|
+
export { getIndent };
|
|
11
|
+
export { getJsdocTagsDeep };
|
|
12
|
+
export { getPreferredTagName };
|
|
13
|
+
export { getRegexFromString };
|
|
14
|
+
export { getTagsByType };
|
|
15
|
+
export { getTagStructureForMode };
|
|
16
|
+
export { hasATag };
|
|
17
|
+
export { hasParams };
|
|
18
|
+
export { hasReturnValue };
|
|
19
|
+
export { hasTag };
|
|
20
|
+
export { hasThrowValue };
|
|
21
|
+
export { hasValueOrExecutorHasNonEmptyResolveValue };
|
|
22
|
+
export { hasYieldValue };
|
|
23
|
+
export { isConstructor };
|
|
24
|
+
export { isGetter };
|
|
25
|
+
export { isNamepathDefiningTag };
|
|
26
|
+
export { isNamepathOrUrlReferencingTag };
|
|
27
|
+
export { isNamepathReferencingTag };
|
|
28
|
+
export { isSetter };
|
|
29
|
+
export { isValidTag };
|
|
30
|
+
export { mayBeUndefinedTypeTag };
|
|
31
|
+
export { overrideTagStructure };
|
|
32
|
+
export { parseClosureTemplateTag };
|
|
33
|
+
export { pathDoesNotBeginWith };
|
|
34
|
+
export { setTagStructure };
|
|
35
|
+
export { tagMightHaveEitherTypeOrNamePosition };
|
|
36
|
+
export { tagMightHaveNamepath };
|
|
37
|
+
export { tagMightHaveNamePosition };
|
|
38
|
+
export { tagMightHaveTypePosition };
|
|
39
|
+
export { tagMissingRequiredTypeOrNamepath };
|
|
40
|
+
export { tagMustHaveNamePosition };
|
|
41
|
+
export { tagMustHaveTypePosition };
|
|
42
|
+
}
|
|
43
|
+
export default _default;
|
|
44
|
+
export type Integer = number;
|
|
45
|
+
export type ESTreeOrTypeScriptNode = import('./utils/hasReturnValue.js').ESTreeOrTypeScriptNode;
|
|
46
|
+
export type ParserMode = "jsdoc" | "typescript" | "closure" | "permissive";
|
|
47
|
+
export type ParamCommon = undefined | string | {
|
|
48
|
+
name: Integer;
|
|
49
|
+
restElement: boolean;
|
|
50
|
+
} | {
|
|
51
|
+
isRestProperty: boolean | undefined;
|
|
52
|
+
name: string;
|
|
53
|
+
restElement: boolean;
|
|
54
|
+
} | {
|
|
55
|
+
name: string;
|
|
56
|
+
restElement: boolean;
|
|
57
|
+
};
|
|
58
|
+
export type ParamNameInfo = ParamCommon | [
|
|
59
|
+
string | undefined,
|
|
60
|
+
(FlattendRootInfo & {
|
|
61
|
+
annotationParamName?: string;
|
|
62
|
+
})
|
|
63
|
+
] | [string, string[] | ParamInfo[]];
|
|
64
|
+
export type FlattendRootInfo = {
|
|
65
|
+
hasPropertyRest: boolean;
|
|
66
|
+
hasRestElement: boolean;
|
|
67
|
+
names: string[];
|
|
68
|
+
rests: boolean[];
|
|
69
|
+
};
|
|
70
|
+
export type NestedParamInfo = [string, (string[] | ParamInfo[])];
|
|
71
|
+
export type ParamInfo = ParamCommon | [
|
|
72
|
+
string | undefined,
|
|
73
|
+
(FlattendRootInfo & {
|
|
74
|
+
annotationParamName?: string;
|
|
75
|
+
})
|
|
76
|
+
] | [string, string[] | ParamInfo[]];
|
|
77
|
+
/**
|
|
78
|
+
* Given a nested array of property names, reduce them to a single array,
|
|
79
|
+
* appending the name of the root element along the way if present.
|
|
80
|
+
*/
|
|
81
|
+
export type FlattenRoots = (params: ParamInfo[], root?: string | undefined) => FlattendRootInfo;
|
|
82
|
+
export type DefaultContexts = true | string[];
|
|
83
|
+
export type TagNamePreference = {
|
|
84
|
+
[key: string]: string | false | {
|
|
85
|
+
message: string;
|
|
86
|
+
replacement?: string | undefined;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export type PathDoesNotBeginWith = (name: string, otherPathName: string) => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* @param {string} name
|
|
92
|
+
* @returns {(otherPathName: string) => boolean}
|
|
93
|
+
*/
|
|
94
|
+
declare function comparePaths(name: string): (otherPathName: string) => boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Since path segments may be unquoted (if matching a reserved word,
|
|
97
|
+
* identifier or numeric literal) or single or double quoted, in either
|
|
98
|
+
* the `@param` or in source, we need to strip the quotes to give a fair
|
|
99
|
+
* comparison.
|
|
100
|
+
* @param {string} str
|
|
101
|
+
* @returns {string}
|
|
102
|
+
*/
|
|
103
|
+
declare function dropPathSegmentQuotes(str: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* @typedef {true|string[]} DefaultContexts
|
|
106
|
+
*/
|
|
107
|
+
/**
|
|
108
|
+
* Checks user option for `contexts` array, defaulting to
|
|
109
|
+
* contexts designated by the rule. Returns an array of
|
|
110
|
+
* ESTree AST types, indicating allowable contexts.
|
|
111
|
+
* @param {import('eslint').Rule.RuleContext} context
|
|
112
|
+
* @param {DefaultContexts|undefined} defaultContexts
|
|
113
|
+
* @param {{
|
|
114
|
+
* contexts?: import('./iterateJsdoc.js').Context[]
|
|
115
|
+
* }} settings
|
|
116
|
+
* @returns {string[]}
|
|
117
|
+
*/
|
|
118
|
+
declare function enforcedContexts(context: import('eslint').Rule.RuleContext, defaultContexts: DefaultContexts | undefined, settings: {
|
|
119
|
+
contexts?: import("./iterateJsdoc.js").Context[] | undefined;
|
|
120
|
+
}): string[];
|
|
121
|
+
/**
|
|
122
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
123
|
+
* @param {import('eslint').Rule.Node|null} node
|
|
124
|
+
* @param {import('eslint').Rule.RuleContext} context
|
|
125
|
+
* @param {import('json-schema').JSONSchema4} schema
|
|
126
|
+
* @returns {boolean}
|
|
127
|
+
*/
|
|
128
|
+
declare function exemptSpeciaMethods(jsdoc: import('./iterateJsdoc.js').JsdocBlockWithInline, node: import('eslint').Rule.Node | null, context: import('eslint').Rule.RuleContext, schema: any): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* @typedef {undefined|string|{
|
|
131
|
+
* name: Integer,
|
|
132
|
+
* restElement: boolean
|
|
133
|
+
* }|{
|
|
134
|
+
* isRestProperty: boolean|undefined,
|
|
135
|
+
* name: string,
|
|
136
|
+
* restElement: boolean
|
|
137
|
+
* }|{
|
|
138
|
+
* name: string,
|
|
139
|
+
* restElement: boolean
|
|
140
|
+
* }} ParamCommon
|
|
141
|
+
*/
|
|
142
|
+
/**
|
|
143
|
+
* @typedef {ParamCommon|[string|undefined, (FlattendRootInfo & {
|
|
144
|
+
* annotationParamName?: string,
|
|
145
|
+
* })]|NestedParamInfo} ParamNameInfo
|
|
146
|
+
*/
|
|
147
|
+
/**
|
|
148
|
+
* @typedef {{
|
|
149
|
+
* hasPropertyRest: boolean,
|
|
150
|
+
* hasRestElement: boolean,
|
|
151
|
+
* names: string[],
|
|
152
|
+
* rests: boolean[],
|
|
153
|
+
* }} FlattendRootInfo
|
|
154
|
+
*/
|
|
155
|
+
/**
|
|
156
|
+
* @typedef {[string, (string[]|ParamInfo[])]} NestedParamInfo
|
|
157
|
+
*/
|
|
158
|
+
/**
|
|
159
|
+
* @typedef {ParamCommon|
|
|
160
|
+
* [string|undefined, (FlattendRootInfo & {
|
|
161
|
+
* annotationParamName?: string
|
|
162
|
+
* })]|
|
|
163
|
+
* NestedParamInfo} ParamInfo
|
|
164
|
+
*/
|
|
165
|
+
/**
|
|
166
|
+
* Given a nested array of property names, reduce them to a single array,
|
|
167
|
+
* appending the name of the root element along the way if present.
|
|
168
|
+
* @callback FlattenRoots
|
|
169
|
+
* @param {ParamInfo[]} params
|
|
170
|
+
* @param {string} [root]
|
|
171
|
+
* @returns {FlattendRootInfo}
|
|
172
|
+
*/
|
|
173
|
+
/** @type {FlattenRoots} */
|
|
174
|
+
declare const flattenRoots: FlattenRoots;
|
|
175
|
+
/**
|
|
176
|
+
* Get all tags, inline tags and inline tags in tags
|
|
177
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
178
|
+
* @returns {(import('comment-parser').Spec|
|
|
179
|
+
* import('@es-joy/jsdoccomment').JsdocInlineTagNoType)[]}
|
|
180
|
+
*/
|
|
181
|
+
declare function getAllTags(jsdoc: import('./iterateJsdoc.js').JsdocBlockWithInline): (import('comment-parser').Spec | import('@es-joy/jsdoccomment').JsdocInlineTagNoType)[];
|
|
182
|
+
/**
|
|
183
|
+
* @param {import('./iterateJsdoc.js').Context[]} contexts
|
|
184
|
+
* @param {import('./iterateJsdoc.js').CheckJsdoc} checkJsdoc
|
|
185
|
+
* @param {import('@es-joy/jsdoccomment').CommentHandler} [handler]
|
|
186
|
+
* @returns {import('eslint').Rule.RuleListener}
|
|
187
|
+
*/
|
|
188
|
+
declare function getContextObject(contexts: import('./iterateJsdoc.js').Context[], checkJsdoc: import('./iterateJsdoc.js').CheckJsdoc, handler?: import("@es-joy/jsdoccomment").CommentHandler | undefined): import('eslint').Rule.RuleListener;
|
|
189
|
+
/**
|
|
190
|
+
* @param {ESTreeOrTypeScriptNode|null} functionNode
|
|
191
|
+
* @param {boolean} [checkDefaultObjects]
|
|
192
|
+
* @throws {Error}
|
|
193
|
+
* @returns {ParamNameInfo[]}
|
|
194
|
+
*/
|
|
195
|
+
declare function getFunctionParameterNames(functionNode: ESTreeOrTypeScriptNode | null, checkDefaultObjects?: boolean | undefined): ParamNameInfo[];
|
|
196
|
+
/**
|
|
197
|
+
* @param {import('eslint').SourceCode|{
|
|
198
|
+
* text: string
|
|
199
|
+
* }} sourceCode
|
|
200
|
+
* @returns {string}
|
|
201
|
+
*/
|
|
202
|
+
declare function getIndent(sourceCode: import('eslint').SourceCode | {
|
|
203
|
+
text: string;
|
|
204
|
+
}): string;
|
|
205
|
+
/**
|
|
206
|
+
* Gets all names of the target type, including those that refer to a path, e.g.
|
|
207
|
+
* `foo` or `foo.bar`.
|
|
208
|
+
* @param {import('comment-parser').Block} jsdoc
|
|
209
|
+
* @param {string} targetTagName
|
|
210
|
+
* @returns {{
|
|
211
|
+
* idx: Integer,
|
|
212
|
+
* name: string,
|
|
213
|
+
* type: string
|
|
214
|
+
* }[]}
|
|
215
|
+
*/
|
|
216
|
+
declare function getJsdocTagsDeep(jsdoc: import('comment-parser').Block, targetTagName: string): {
|
|
217
|
+
idx: Integer;
|
|
218
|
+
name: string;
|
|
219
|
+
type: string;
|
|
220
|
+
}[];
|
|
221
|
+
/**
|
|
222
|
+
* @param {import('eslint').Rule.RuleContext} context
|
|
223
|
+
* @param {ParserMode|undefined} mode
|
|
224
|
+
* @param {string} name
|
|
225
|
+
* @param {TagNamePreference} tagPreference
|
|
226
|
+
* @returns {string|false|{
|
|
227
|
+
* message: string;
|
|
228
|
+
* replacement?: string|undefined;
|
|
229
|
+
* }}
|
|
230
|
+
*/
|
|
231
|
+
declare function getPreferredTagName(context: import('eslint').Rule.RuleContext, mode: ParserMode | undefined, name: string, tagPreference?: TagNamePreference): string | false | {
|
|
232
|
+
message: string;
|
|
233
|
+
replacement?: string | undefined;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* @param {string} regexString
|
|
237
|
+
* @param {string} [requiredFlags]
|
|
238
|
+
* @returns {RegExp}
|
|
239
|
+
*/
|
|
240
|
+
declare function getRegexFromString(regexString: string, requiredFlags?: string | undefined): RegExp;
|
|
241
|
+
/**
|
|
242
|
+
* @typedef {{
|
|
243
|
+
* [key: string]: false|string|
|
|
244
|
+
* {message: string, replacement?: string}
|
|
245
|
+
* }} TagNamePreference
|
|
246
|
+
*/
|
|
247
|
+
/**
|
|
248
|
+
* @param {import('eslint').Rule.RuleContext} context
|
|
249
|
+
* @param {ParserMode|undefined} mode
|
|
250
|
+
* @param {import('comment-parser').Spec[]} tags
|
|
251
|
+
* @returns {{
|
|
252
|
+
* tagsWithNames: import('comment-parser').Spec[],
|
|
253
|
+
* tagsWithoutNames: import('comment-parser').Spec[]
|
|
254
|
+
* }}
|
|
255
|
+
*/
|
|
256
|
+
declare function getTagsByType(context: import('eslint').Rule.RuleContext, mode: ParserMode | undefined, tags: import('comment-parser').Spec[]): {
|
|
257
|
+
tagsWithNames: import('comment-parser').Spec[];
|
|
258
|
+
tagsWithoutNames: import('comment-parser').Spec[];
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* @param {ParserMode} mode
|
|
262
|
+
* @param {import('./iterateJsdoc.js').StructuredTags} structuredTags
|
|
263
|
+
* @returns {import('./getDefaultTagStructureForMode.js').TagStructure}
|
|
264
|
+
*/
|
|
265
|
+
declare function getTagStructureForMode(mode: ParserMode, structuredTags: import('./iterateJsdoc.js').StructuredTags): import('./getDefaultTagStructureForMode.js').TagStructure;
|
|
266
|
+
/**
|
|
267
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
268
|
+
* @param {string[]} targetTagNames
|
|
269
|
+
* @returns {boolean}
|
|
270
|
+
*/
|
|
271
|
+
declare function hasATag(jsdoc: import('./iterateJsdoc.js').JsdocBlockWithInline, targetTagNames: string[]): boolean;
|
|
272
|
+
/**
|
|
273
|
+
* @param {ESTreeOrTypeScriptNode} functionNode
|
|
274
|
+
* @returns {Integer}
|
|
275
|
+
*/
|
|
276
|
+
declare function hasParams(functionNode: ESTreeOrTypeScriptNode): Integer;
|
|
277
|
+
import { hasReturnValue } from './utils/hasReturnValue.js';
|
|
278
|
+
/**
|
|
279
|
+
* @param {import('./iterateJsdoc.js').JsdocBlockWithInline} jsdoc
|
|
280
|
+
* @param {string} targetTagName
|
|
281
|
+
* @returns {boolean}
|
|
282
|
+
*/
|
|
283
|
+
declare function hasTag(jsdoc: import('./iterateJsdoc.js').JsdocBlockWithInline, targetTagName: string): boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Checks if a node has a throws statement.
|
|
286
|
+
* @param {ESTreeOrTypeScriptNode|null|undefined} node
|
|
287
|
+
* @param {boolean} [innerFunction]
|
|
288
|
+
* @returns {boolean}
|
|
289
|
+
*/
|
|
290
|
+
declare function hasThrowValue(node: ESTreeOrTypeScriptNode | null | undefined, innerFunction?: boolean | undefined): boolean;
|
|
291
|
+
import { hasValueOrExecutorHasNonEmptyResolveValue } from './utils/hasReturnValue.js';
|
|
292
|
+
/**
|
|
293
|
+
* Checks if a node has a return statement. Void return does not count.
|
|
294
|
+
* @param {ESTreeOrTypeScriptNode} node
|
|
295
|
+
* @param {boolean} [checkYieldReturnValue]
|
|
296
|
+
* @returns {boolean}
|
|
297
|
+
*/
|
|
298
|
+
declare function hasYieldValue(node: ESTreeOrTypeScriptNode, checkYieldReturnValue?: boolean | undefined): boolean;
|
|
299
|
+
/**
|
|
300
|
+
* @param {import('eslint').Rule.Node|null} node
|
|
301
|
+
* @returns {boolean}
|
|
302
|
+
*/
|
|
303
|
+
declare function isConstructor(node: import('eslint').Rule.Node | null): boolean;
|
|
304
|
+
/**
|
|
305
|
+
* @param {import('eslint').Rule.Node|null} node
|
|
306
|
+
* @returns {boolean}
|
|
307
|
+
*/
|
|
308
|
+
declare function isGetter(node: import('eslint').Rule.Node | null): boolean;
|
|
309
|
+
/**
|
|
310
|
+
* @param {string} tag
|
|
311
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
312
|
+
* @returns {boolean}
|
|
313
|
+
*/
|
|
314
|
+
declare function isNamepathDefiningTag(tag: string, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): boolean;
|
|
315
|
+
/**
|
|
316
|
+
* @param {string} tag
|
|
317
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
318
|
+
* @returns {boolean}
|
|
319
|
+
*/
|
|
320
|
+
declare function isNamepathOrUrlReferencingTag(tag: string, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): boolean;
|
|
321
|
+
/**
|
|
322
|
+
* @param {string} tag
|
|
323
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
324
|
+
* @returns {boolean}
|
|
325
|
+
*/
|
|
326
|
+
declare function isNamepathReferencingTag(tag: string, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): boolean;
|
|
327
|
+
/**
|
|
328
|
+
* @param {import('eslint').Rule.Node|null} node
|
|
329
|
+
* @returns {boolean}
|
|
330
|
+
*/
|
|
331
|
+
declare function isSetter(node: import('eslint').Rule.Node | null): boolean;
|
|
332
|
+
/**
|
|
333
|
+
* @param {import('eslint').Rule.RuleContext} context
|
|
334
|
+
* @param {ParserMode|undefined} mode
|
|
335
|
+
* @param {string} name
|
|
336
|
+
* @param {string[]} definedTags
|
|
337
|
+
* @returns {boolean}
|
|
338
|
+
*/
|
|
339
|
+
declare function isValidTag(context: import('eslint').Rule.RuleContext, mode: ParserMode | undefined, name: string, definedTags: string[]): boolean;
|
|
340
|
+
/**
|
|
341
|
+
* Checks if the JSDoc comment has an undefined type.
|
|
342
|
+
* @param {import('comment-parser').Spec|null|undefined} tag
|
|
343
|
+
* the tag which should be checked.
|
|
344
|
+
* @param {ParserMode} mode
|
|
345
|
+
* @returns {boolean}
|
|
346
|
+
* true in case a defined type is undeclared; otherwise false.
|
|
347
|
+
*/
|
|
348
|
+
declare function mayBeUndefinedTypeTag(tag: import('comment-parser').Spec | null | undefined, mode: ParserMode): boolean;
|
|
349
|
+
/**
|
|
350
|
+
* @param {import('./iterateJsdoc.js').StructuredTags} structuredTags
|
|
351
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
352
|
+
* @returns {void}
|
|
353
|
+
*/
|
|
354
|
+
declare function overrideTagStructure(structuredTags: import('./iterateJsdoc.js').StructuredTags, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): void;
|
|
355
|
+
/**
|
|
356
|
+
* @param {string} tag
|
|
357
|
+
*/
|
|
358
|
+
/**
|
|
359
|
+
* Parses GCC Generic/Template types
|
|
360
|
+
* @see {@link https://github.com/google/closure-compiler/wiki/Generic-Types}
|
|
361
|
+
* @see {@link https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#template}
|
|
362
|
+
* @param {import('comment-parser').Spec} tag
|
|
363
|
+
* @returns {string[]}
|
|
364
|
+
*/
|
|
365
|
+
declare function parseClosureTemplateTag(tag: import('comment-parser').Spec): string[];
|
|
366
|
+
/**
|
|
367
|
+
* @callback PathDoesNotBeginWith
|
|
368
|
+
* @param {string} name
|
|
369
|
+
* @param {string} otherPathName
|
|
370
|
+
* @returns {boolean}
|
|
371
|
+
*/
|
|
372
|
+
/** @type {PathDoesNotBeginWith} */
|
|
373
|
+
declare const pathDoesNotBeginWith: PathDoesNotBeginWith;
|
|
374
|
+
/**
|
|
375
|
+
* @param {ParserMode} mode
|
|
376
|
+
* @returns {void}
|
|
377
|
+
*/
|
|
378
|
+
declare function setTagStructure(mode: ParserMode): void;
|
|
379
|
+
/**
|
|
380
|
+
* @param {string} tag
|
|
381
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
382
|
+
* @returns {boolean}
|
|
383
|
+
*/
|
|
384
|
+
declare function tagMightHaveEitherTypeOrNamePosition(tag: string, tagMap: import('./getDefaultTagStructureForMode.js').TagStructure): boolean;
|
|
385
|
+
/**
|
|
386
|
+
* @param {string} tag
|
|
387
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
388
|
+
* @returns {boolean}
|
|
389
|
+
*/
|
|
390
|
+
declare function tagMightHaveNamepath(tag: string, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): boolean;
|
|
391
|
+
/**
|
|
392
|
+
* @param {string} tag
|
|
393
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
394
|
+
* @returns {boolean}
|
|
395
|
+
*/
|
|
396
|
+
declare function tagMightHaveNamePosition(tag: string, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): boolean;
|
|
397
|
+
/**
|
|
398
|
+
* @param {string} tag
|
|
399
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
400
|
+
* @returns {boolean|string}
|
|
401
|
+
*/
|
|
402
|
+
declare function tagMightHaveTypePosition(tag: string, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): boolean | string;
|
|
403
|
+
/**
|
|
404
|
+
* @param {import('comment-parser').Spec} tag
|
|
405
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
406
|
+
* @returns {boolean|undefined}
|
|
407
|
+
*/
|
|
408
|
+
declare function tagMissingRequiredTypeOrNamepath(tag: import('comment-parser').Spec, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): boolean | undefined;
|
|
409
|
+
/**
|
|
410
|
+
* @param {string} tag
|
|
411
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
412
|
+
* @returns {boolean|undefined}
|
|
413
|
+
*/
|
|
414
|
+
declare function tagMustHaveNamePosition(tag: string, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): boolean | undefined;
|
|
415
|
+
/**
|
|
416
|
+
* @param {string} tag
|
|
417
|
+
* @param {import('./getDefaultTagStructureForMode.js').TagStructure} tagMap
|
|
418
|
+
* @returns {boolean|undefined}
|
|
419
|
+
*/
|
|
420
|
+
declare function tagMustHaveTypePosition(tag: string, tagMap?: import('./getDefaultTagStructureForMode.js').TagStructure): boolean | undefined;
|
|
421
|
+
//# sourceMappingURL=jsdocUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsdocUtils.d.ts","sourceRoot":"","sources":["../src/jsdocUtils.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAgBa,MAAM;qCAGN,OAAO,2BAA2B,EAAE,sBAAsB;yBAI1D,OAAO,GAAC,YAAY,GAAC,SAAS,GAAC,YAAY;0BAiB3C,SAAS,GAAC,MAAM,GAAC;IAC7B,IAAQ,EAAE,OAAO,CAAC;IAClB,WAAe,EAAE,OAAO,CAAA;CACrB,GAAC;IACJ,cAAkB,EAAE,OAAO,GAAC,SAAS,CAAC;IACtC,IAAQ,EAAE,MAAM,CAAC;IACjB,WAAe,EAAE,OAAO,CAAA;CACrB,GAAC;IACJ,IAAQ,EAAE,MAAM,CAAC;IACjB,WAAe,EAAE,OAAO,CAAA;CACrB;4BAGS,WAAW,GAAC;IAAC,MAAM,GAAC,SAAS;IAAE,CAAC,gBAAgB,GAAG;QAC/D,mBAAuB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC;CAAC,mCAAgB;+BAIT;IACZ,eAAmB,EAAE,OAAO,CAAC;IAC7B,cAAkB,EAAE,OAAO,CAAC;IAC5B,KAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAS,EAAE,OAAO,EAAE,CAAC;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AAE,CAQpB;AAmTD;;;;;GAKG;AAEH,mCAAmC;AACnC,oCADW,oBAAoB,CAI7B;AAzjDF;;;GAGG;AACH,uCAHW,UAAU,GACR,IAAI,CAIhB;AA45BD;;;;GAIG;AACH,2DAJW,MAAM,UACN,OAAO,oCAAoC,EAAE,YAAY,GACvD,OAAO,CAInB;AAhCD;;;;GAIG;AACH,2CAJW,MAAM,WACN,OAAO,oCAAoC,EAAE,YAAY,GACvD,OAAO,CASnB;AAzBD;;;;GAIG;AACH,+CAJW,MAAM,WACN,OAAO,oCAAoC,EAAE,YAAY,GACvD,OAAO,CAQnB;AAhCD;;;;GAIG;AACH,+CAJW,MAAM,WACN,OAAO,oCAAoC,EAAE,YAAY,GACvD,OAAO,GAAC,MAAM,CAY1B;AAgED;;;;GAIG;AACH,uDAJW,OAAO,gBAAgB,EAAE,IAAI,WAC7B,OAAO,oCAAoC,EAAE,YAAY,GACvD,OAAO,GAAC,SAAS,CAe7B;AAjDD;;;;GAIG;AACH,8CAJW,MAAM,WACN,OAAO,oCAAoC,EAAE,YAAY,GACvD,OAAO,GAAC,SAAS,CAM7B;AApED;;;;GAIG;AACH,8CAJW,MAAM,WACN,OAAO,oCAAoC,EAAE,YAAY,GACvD,OAAO,GAAC,SAAS,CAM7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkAccess.d.ts","sourceRoot":"","sources":["../../src/rules/checkAccess.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkAlignment.d.ts","sourceRoot":"","sources":["../../src/rules/checkAlignment.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkExamples.d.ts","sourceRoot":"","sources":["../../src/rules/checkExamples.js"],"names":[],"mappings":";;mBAKO,QAAQ"}
|
|
@@ -5,12 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js"));
|
|
8
|
-
var _eslint = require("eslint");
|
|
8
|
+
var _eslint = _interopRequireWildcard(require("eslint"));
|
|
9
9
|
var _semver = _interopRequireDefault(require("semver"));
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
13
|
// Todo: When replace `CLIEngine` with `ESLint` when feature set complete per https://github.com/eslint/eslint/issues/14745
|
|
12
14
|
// https://github.com/eslint/eslint/blob/master/docs/user-guide/migrating-to-7.0.0.md#-the-cliengine-class-has-been-deprecated
|
|
13
15
|
|
|
16
|
+
const {
|
|
17
|
+
// @ts-expect-error Older ESLint
|
|
18
|
+
CLIEngine
|
|
19
|
+
} = _eslint.default;
|
|
14
20
|
const zeroBasedLineIndexAdjust = -1;
|
|
15
21
|
const likelyNestedJSDocIndentSpace = 1;
|
|
16
22
|
const preTagSpaceLength = 1;
|
|
@@ -30,7 +36,7 @@ const escapeStringRegexp = str => {
|
|
|
30
36
|
/**
|
|
31
37
|
* @param {string} str
|
|
32
38
|
* @param {string} ch
|
|
33
|
-
* @returns {import('../iterateJsdoc').Integer}
|
|
39
|
+
* @returns {import('../iterateJsdoc.js').Integer}
|
|
34
40
|
*/
|
|
35
41
|
const countChars = (str, ch) => {
|
|
36
42
|
return (str.match(new RegExp(escapeStringRegexp(ch), 'gu')) || []).length;
|
|
@@ -190,8 +196,8 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
190
196
|
|
|
191
197
|
/**
|
|
192
198
|
* @param {{
|
|
193
|
-
* nonJSPrefacingCols: import('../iterateJsdoc').Integer,
|
|
194
|
-
* nonJSPrefacingLines: import('../iterateJsdoc').Integer,
|
|
199
|
+
* nonJSPrefacingCols: import('../iterateJsdoc.js').Integer,
|
|
200
|
+
* nonJSPrefacingLines: import('../iterateJsdoc.js').Integer,
|
|
195
201
|
* string: string
|
|
196
202
|
* }} cfg
|
|
197
203
|
*/
|
|
@@ -219,7 +225,7 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
219
225
|
if (matchingFileNameMap.has(fileNameMapKey)) {
|
|
220
226
|
cliFile = matchingFileNameMap.get(fileNameMapKey);
|
|
221
227
|
} else {
|
|
222
|
-
const cli = new
|
|
228
|
+
const cli = new CLIEngine(cliConfig);
|
|
223
229
|
let config;
|
|
224
230
|
if (filename || checkEslintrc) {
|
|
225
231
|
config = cli.getConfigForFile(file);
|
|
@@ -228,7 +234,7 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
228
234
|
// We need a new instance to ensure that the rules that may only
|
|
229
235
|
// be available to `file` (if it has its own `.eslintrc`),
|
|
230
236
|
// will be defined.
|
|
231
|
-
cliFile = new
|
|
237
|
+
cliFile = new CLIEngine({
|
|
232
238
|
allowInlineConfig,
|
|
233
239
|
baseConfig: {
|
|
234
240
|
...baseConfig,
|