eslint-plugin-jsdoc 39.3.6 → 39.3.12
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/README.md +267 -52
- package/dist/WarnSettings.js +0 -5
- package/dist/WarnSettings.js.map +1 -1
- package/dist/alignTransform.js +69 -61
- package/dist/alignTransform.js.map +1 -1
- package/dist/bin/generateRule.js +7 -26
- package/dist/bin/generateRule.js.map +1 -1
- package/dist/defaultTagOrder.js +30 -14
- package/dist/defaultTagOrder.js.map +1 -1
- package/dist/exportParser.js +34 -143
- package/dist/exportParser.js.map +1 -1
- package/dist/generateRule.js +7 -26
- package/dist/generateRule.js.map +1 -1
- package/dist/getDefaultTagStructureForMode.js +189 -93
- package/dist/getDefaultTagStructureForMode.js.map +1 -1
- package/dist/index.js +0 -51
- package/dist/index.js.map +1 -1
- package/dist/iterateJsdoc.js +43 -206
- package/dist/iterateJsdoc.js.map +1 -1
- package/dist/jsdocUtils.js +71 -220
- package/dist/jsdocUtils.js.map +1 -1
- package/dist/rules/checkAccess.js +0 -8
- package/dist/rules/checkAccess.js.map +1 -1
- package/dist/rules/checkAlignment.js +0 -8
- package/dist/rules/checkAlignment.js.map +1 -1
- package/dist/rules/checkExamples.js +25 -63
- package/dist/rules/checkExamples.js.map +1 -1
- package/dist/rules/checkIndentation.js +0 -7
- package/dist/rules/checkIndentation.js.map +1 -1
- package/dist/rules/checkLineAlignment.js +9 -30
- package/dist/rules/checkLineAlignment.js.map +1 -1
- package/dist/rules/checkParamNames.js +9 -47
- package/dist/rules/checkParamNames.js.map +1 -1
- package/dist/rules/checkPropertyNames.js +1 -18
- package/dist/rules/checkPropertyNames.js.map +1 -1
- package/dist/rules/checkSyntax.js +2 -5
- package/dist/rules/checkSyntax.js.map +1 -1
- package/dist/rules/checkTagNames.js +0 -18
- package/dist/rules/checkTagNames.js.map +1 -1
- package/dist/rules/checkTypes.js +17 -46
- package/dist/rules/checkTypes.js.map +1 -1
- package/dist/rules/checkValues.js +0 -18
- package/dist/rules/checkValues.js.map +1 -1
- package/dist/rules/emptyTags.js +6 -11
- package/dist/rules/emptyTags.js.map +1 -1
- package/dist/rules/implementsOnClasses.js +0 -6
- package/dist/rules/implementsOnClasses.js.map +1 -1
- package/dist/rules/matchDescription.js +0 -20
- package/dist/rules/matchDescription.js.map +1 -1
- package/dist/rules/matchName.js +2 -17
- package/dist/rules/matchName.js.map +1 -1
- package/dist/rules/multilineBlocks.js +10 -34
- package/dist/rules/multilineBlocks.js.map +1 -1
- package/dist/rules/newlineAfterDescription.js +0 -8
- package/dist/rules/newlineAfterDescription.js.map +1 -1
- package/dist/rules/noBadBlocks.js +2 -16
- package/dist/rules/noBadBlocks.js.map +1 -1
- package/dist/rules/noDefaults.js +0 -7
- package/dist/rules/noDefaults.js.map +1 -1
- package/dist/rules/noMissingSyntax.js +2 -16
- package/dist/rules/noMissingSyntax.js.map +1 -1
- package/dist/rules/noMultiAsterisks.js +2 -16
- package/dist/rules/noMultiAsterisks.js.map +1 -1
- package/dist/rules/noRestrictedSyntax.js +3 -9
- package/dist/rules/noRestrictedSyntax.js.map +1 -1
- package/dist/rules/noTypes.js +0 -7
- package/dist/rules/noTypes.js.map +1 -1
- package/dist/rules/noUndefinedTypes.js +13 -34
- package/dist/rules/noUndefinedTypes.js.map +1 -1
- package/dist/rules/requireAsteriskPrefix.js +2 -26
- package/dist/rules/requireAsteriskPrefix.js.map +1 -1
- package/dist/rules/requireDescription.js +0 -17
- package/dist/rules/requireDescription.js.map +1 -1
- package/dist/rules/requireDescriptionCompleteSentence.js +13 -34
- package/dist/rules/requireDescriptionCompleteSentence.js.map +1 -1
- package/dist/rules/requireExample.js +0 -9
- package/dist/rules/requireExample.js.map +1 -1
- package/dist/rules/requireFileOverview.js +0 -16
- package/dist/rules/requireFileOverview.js.map +1 -1
- package/dist/rules/requireHyphenBeforeParamDescription.js +2 -16
- package/dist/rules/requireHyphenBeforeParamDescription.js.map +1 -1
- package/dist/rules/requireJsdoc.js +13 -58
- package/dist/rules/requireJsdoc.js.map +1 -1
- package/dist/rules/requireParam.js +6 -53
- package/dist/rules/requireParam.js.map +1 -1
- package/dist/rules/requireParamDescription.js +0 -4
- package/dist/rules/requireParamDescription.js.map +1 -1
- package/dist/rules/requireParamName.js +0 -4
- package/dist/rules/requireParamName.js.map +1 -1
- package/dist/rules/requireParamType.js +0 -4
- package/dist/rules/requireParamType.js.map +1 -1
- package/dist/rules/requireProperty.js +0 -9
- package/dist/rules/requireProperty.js.map +1 -1
- package/dist/rules/requirePropertyDescription.js +0 -4
- package/dist/rules/requirePropertyDescription.js.map +1 -1
- package/dist/rules/requirePropertyName.js +0 -4
- package/dist/rules/requirePropertyName.js.map +1 -1
- package/dist/rules/requirePropertyType.js +0 -4
- package/dist/rules/requirePropertyType.js.map +1 -1
- package/dist/rules/requireReturns.js +13 -23
- package/dist/rules/requireReturns.js.map +1 -1
- package/dist/rules/requireReturnsCheck.js +12 -20
- package/dist/rules/requireReturnsCheck.js.map +1 -1
- package/dist/rules/requireReturnsDescription.js +0 -6
- package/dist/rules/requireReturnsDescription.js.map +1 -1
- package/dist/rules/requireReturnsType.js +0 -4
- package/dist/rules/requireReturnsType.js.map +1 -1
- package/dist/rules/requireThrows.js +6 -15
- package/dist/rules/requireThrows.js.map +1 -1
- package/dist/rules/requireYields.js +13 -29
- package/dist/rules/requireYields.js.map +1 -1
- package/dist/rules/requireYieldsCheck.js +8 -29
- package/dist/rules/requireYieldsCheck.js.map +1 -1
- package/dist/rules/sortTags.js +17 -30
- package/dist/rules/sortTags.js.map +1 -1
- package/dist/rules/tagLines.js +0 -26
- package/dist/rules/tagLines.js.map +1 -1
- package/dist/rules/validTypes.js +22 -53
- package/dist/rules/validTypes.js.map +1 -1
- package/dist/tagNames.js +7 -4
- package/dist/tagNames.js.map +1 -1
- package/dist/utils/hasReturnValue.js +22 -66
- package/dist/utils/hasReturnValue.js.map +1 -1
- package/package.json +16 -16
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
/**
|
|
13
10
|
* @template T
|
|
14
11
|
* @param {string[]} desiredRoots
|
|
@@ -19,7 +16,6 @@ const rootNamer = (desiredRoots, currentIndex) => {
|
|
|
19
16
|
let name;
|
|
20
17
|
let idx = currentIndex;
|
|
21
18
|
const incremented = desiredRoots.length <= 1;
|
|
22
|
-
|
|
23
19
|
if (incremented) {
|
|
24
20
|
const base = desiredRoots[0];
|
|
25
21
|
const suffix = idx++;
|
|
@@ -27,13 +23,12 @@ const rootNamer = (desiredRoots, currentIndex) => {
|
|
|
27
23
|
} else {
|
|
28
24
|
name = desiredRoots.shift();
|
|
29
25
|
}
|
|
30
|
-
|
|
31
26
|
return [name, incremented, () => {
|
|
32
27
|
return rootNamer(desiredRoots, idx);
|
|
33
28
|
}];
|
|
34
|
-
};
|
|
35
|
-
|
|
29
|
+
};
|
|
36
30
|
|
|
31
|
+
// eslint-disable-next-line complexity
|
|
37
32
|
var _default = (0, _iterateJsdoc.default)(({
|
|
38
33
|
jsdoc,
|
|
39
34
|
utils,
|
|
@@ -42,29 +37,26 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
42
37
|
const preferredTagName = utils.getPreferredTagName({
|
|
43
38
|
tagName: 'param'
|
|
44
39
|
});
|
|
45
|
-
|
|
46
40
|
if (!preferredTagName) {
|
|
47
41
|
return;
|
|
48
42
|
}
|
|
49
|
-
|
|
50
43
|
const jsdocParameterNames = utils.getJsdocTagsDeep(preferredTagName);
|
|
51
44
|
const shallowJsdocParameterNames = jsdocParameterNames.filter(tag => {
|
|
52
45
|
return !tag.name.includes('.');
|
|
53
46
|
}).map((tag, idx) => {
|
|
54
|
-
return {
|
|
47
|
+
return {
|
|
48
|
+
...tag,
|
|
55
49
|
idx
|
|
56
50
|
};
|
|
57
51
|
});
|
|
58
|
-
|
|
59
52
|
if (utils.avoidDocs()) {
|
|
60
53
|
return;
|
|
61
|
-
}
|
|
62
|
-
|
|
54
|
+
}
|
|
63
55
|
|
|
56
|
+
// Param type is specified by type in @type
|
|
64
57
|
if (utils.hasTag('type')) {
|
|
65
58
|
return;
|
|
66
59
|
}
|
|
67
|
-
|
|
68
60
|
const {
|
|
69
61
|
autoIncrementBase = 0,
|
|
70
62
|
checkRestProperty = false,
|
|
@@ -82,23 +74,18 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
82
74
|
const functionParameterNames = utils.getFunctionParameterNames(useDefaultObjectProperties);
|
|
83
75
|
const flattenedRoots = utils.flattenRoots(functionParameterNames).names;
|
|
84
76
|
const paramIndex = {};
|
|
85
|
-
|
|
86
77
|
const hasParamIndex = cur => {
|
|
87
78
|
return utils.dropPathSegmentQuotes(String(cur)) in paramIndex;
|
|
88
79
|
};
|
|
89
|
-
|
|
90
80
|
const getParamIndex = cur => {
|
|
91
81
|
return paramIndex[utils.dropPathSegmentQuotes(String(cur))];
|
|
92
82
|
};
|
|
93
|
-
|
|
94
83
|
const setParamIndex = (cur, idx) => {
|
|
95
84
|
paramIndex[utils.dropPathSegmentQuotes(String(cur))] = idx;
|
|
96
85
|
};
|
|
97
|
-
|
|
98
86
|
for (const [idx, cur] of flattenedRoots.entries()) {
|
|
99
87
|
setParamIndex(cur, idx);
|
|
100
88
|
}
|
|
101
|
-
|
|
102
89
|
const findExpectedIndex = (jsdocTags, indexAtFunctionParams) => {
|
|
103
90
|
const remainingRoots = functionParameterNames.slice(indexAtFunctionParams || 0);
|
|
104
91
|
const foundIndex = jsdocTags.findIndex(({
|
|
@@ -109,11 +96,9 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
109
96
|
if (Array.isArray(remainingRoot)) {
|
|
110
97
|
return remainingRoot[1].names.includes(name);
|
|
111
98
|
}
|
|
112
|
-
|
|
113
99
|
if (typeof remainingRoot === 'object') {
|
|
114
100
|
return name === remainingRoot.name;
|
|
115
101
|
}
|
|
116
|
-
|
|
117
102
|
return name === remainingRoot;
|
|
118
103
|
});
|
|
119
104
|
});
|
|
@@ -123,7 +108,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
123
108
|
return tag === preferredTagName;
|
|
124
109
|
});
|
|
125
110
|
let tagLineCount = 0;
|
|
126
|
-
|
|
127
111
|
for (const {
|
|
128
112
|
source
|
|
129
113
|
} of tags) {
|
|
@@ -137,24 +121,18 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
137
121
|
}
|
|
138
122
|
}
|
|
139
123
|
}
|
|
140
|
-
|
|
141
124
|
return tagLineCount;
|
|
142
125
|
};
|
|
143
|
-
|
|
144
126
|
let [nextRootName, incremented, namer] = rootNamer([...unnamedRootBase], autoIncrementBase);
|
|
145
|
-
|
|
146
127
|
for (const [functionParameterIdx, functionParameterName] of functionParameterNames.entries()) {
|
|
147
128
|
let inc;
|
|
148
|
-
|
|
149
129
|
if (Array.isArray(functionParameterName)) {
|
|
150
130
|
const matchedJsdoc = shallowJsdocParameterNames[functionParameterIdx] || jsdocParameterNames[functionParameterIdx];
|
|
151
131
|
let rootName;
|
|
152
|
-
|
|
153
132
|
if (functionParameterName[0]) {
|
|
154
133
|
rootName = functionParameterName[0];
|
|
155
134
|
} else if (matchedJsdoc && matchedJsdoc.name) {
|
|
156
135
|
rootName = matchedJsdoc.name;
|
|
157
|
-
|
|
158
136
|
if (matchedJsdoc.type && matchedJsdoc.type.search(checkTypesRegex) === -1) {
|
|
159
137
|
continue;
|
|
160
138
|
}
|
|
@@ -163,7 +141,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
163
141
|
inc = incremented;
|
|
164
142
|
[nextRootName, incremented, namer] = namer();
|
|
165
143
|
}
|
|
166
|
-
|
|
167
144
|
const {
|
|
168
145
|
hasRestElement,
|
|
169
146
|
hasPropertyRest,
|
|
@@ -171,15 +148,12 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
171
148
|
names
|
|
172
149
|
} = functionParameterName[1];
|
|
173
150
|
const notCheckingNames = [];
|
|
174
|
-
|
|
175
151
|
if (!enableRestElementFixer && hasRestElement) {
|
|
176
152
|
continue;
|
|
177
153
|
}
|
|
178
|
-
|
|
179
154
|
if (!checkDestructuredRoots) {
|
|
180
155
|
continue;
|
|
181
156
|
}
|
|
182
|
-
|
|
183
157
|
for (const [idx, paramName] of names.entries()) {
|
|
184
158
|
// Add root if the root name is not in the docs (and is not already
|
|
185
159
|
// in the tags to be fixed)
|
|
@@ -197,7 +171,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
197
171
|
}) => {
|
|
198
172
|
return !name;
|
|
199
173
|
});
|
|
200
|
-
|
|
201
174
|
if (emptyParamIdx > -1) {
|
|
202
175
|
missingTags.push({
|
|
203
176
|
functionParameterIdx: emptyParamIdx,
|
|
@@ -213,15 +186,12 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
213
186
|
});
|
|
214
187
|
}
|
|
215
188
|
}
|
|
216
|
-
|
|
217
189
|
if (!checkDestructured) {
|
|
218
190
|
continue;
|
|
219
191
|
}
|
|
220
|
-
|
|
221
192
|
if (!checkRestProperty && rests[idx]) {
|
|
222
193
|
continue;
|
|
223
194
|
}
|
|
224
|
-
|
|
225
195
|
const fullParamName = `${rootName}.${paramName}`;
|
|
226
196
|
const notCheckingName = jsdocParameterNames.find(({
|
|
227
197
|
name,
|
|
@@ -229,17 +199,14 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
229
199
|
}) => {
|
|
230
200
|
return utils.comparePaths(name)(fullParamName) && paramType.search(checkTypesRegex) === -1 && paramType !== '';
|
|
231
201
|
});
|
|
232
|
-
|
|
233
202
|
if (notCheckingName !== undefined) {
|
|
234
203
|
notCheckingNames.push(notCheckingName.name);
|
|
235
204
|
}
|
|
236
|
-
|
|
237
205
|
if (notCheckingNames.find(name => {
|
|
238
206
|
return fullParamName.startsWith(name);
|
|
239
207
|
})) {
|
|
240
208
|
continue;
|
|
241
209
|
}
|
|
242
|
-
|
|
243
210
|
if (jsdocParameterNames && !jsdocParameterNames.find(({
|
|
244
211
|
name
|
|
245
212
|
}) => {
|
|
@@ -253,24 +220,19 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
253
220
|
});
|
|
254
221
|
}
|
|
255
222
|
}
|
|
256
|
-
|
|
257
223
|
continue;
|
|
258
224
|
}
|
|
259
|
-
|
|
260
225
|
let funcParamName;
|
|
261
226
|
let type;
|
|
262
|
-
|
|
263
227
|
if (typeof functionParameterName === 'object') {
|
|
264
228
|
if (!enableRestElementFixer && functionParameterName.restElement) {
|
|
265
229
|
continue;
|
|
266
230
|
}
|
|
267
|
-
|
|
268
231
|
funcParamName = functionParameterName.name;
|
|
269
232
|
type = '{...any}';
|
|
270
233
|
} else {
|
|
271
234
|
funcParamName = functionParameterName;
|
|
272
235
|
}
|
|
273
|
-
|
|
274
236
|
if (jsdocParameterNames && !jsdocParameterNames.find(({
|
|
275
237
|
name
|
|
276
238
|
}) => {
|
|
@@ -284,7 +246,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
284
246
|
});
|
|
285
247
|
}
|
|
286
248
|
}
|
|
287
|
-
|
|
288
249
|
const fix = ({
|
|
289
250
|
functionParameterIdx,
|
|
290
251
|
functionParameterName,
|
|
@@ -295,7 +256,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
295
256
|
if (inc && !enableRootFixer) {
|
|
296
257
|
return;
|
|
297
258
|
}
|
|
298
|
-
|
|
299
259
|
const createTokens = (tagIndex, sourceIndex, spliceCount) => {
|
|
300
260
|
// console.log(sourceIndex, tagIndex, jsdoc.tags, jsdoc.source);
|
|
301
261
|
const tokens = {
|
|
@@ -325,12 +285,10 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
325
285
|
});
|
|
326
286
|
const firstNumber = jsdoc.source[0].number;
|
|
327
287
|
jsdoc.source.splice(sourceIndex, spliceCount, tokens);
|
|
328
|
-
|
|
329
288
|
for (const [idx, src] of jsdoc.source.slice(sourceIndex).entries()) {
|
|
330
289
|
src.number = firstNumber + sourceIndex + idx;
|
|
331
290
|
}
|
|
332
291
|
};
|
|
333
|
-
|
|
334
292
|
const offset = jsdoc.source.findIndex(({
|
|
335
293
|
tokens: {
|
|
336
294
|
tag,
|
|
@@ -339,7 +297,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
339
297
|
}) => {
|
|
340
298
|
return tag || end;
|
|
341
299
|
});
|
|
342
|
-
|
|
343
300
|
if (remove) {
|
|
344
301
|
createTokens(functionParameterIdx, offset + functionParameterIdx, 1);
|
|
345
302
|
} else {
|
|
@@ -347,17 +304,14 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
347
304
|
createTokens(expectedIdx, offset + expectedIdx, 0);
|
|
348
305
|
}
|
|
349
306
|
};
|
|
350
|
-
|
|
351
307
|
const fixer = () => {
|
|
352
308
|
for (const missingTag of missingTags) {
|
|
353
309
|
fix(missingTag);
|
|
354
310
|
}
|
|
355
311
|
};
|
|
356
|
-
|
|
357
312
|
if (missingTags.length && jsdoc.source.length === 1) {
|
|
358
313
|
utils.makeMultiline();
|
|
359
314
|
}
|
|
360
|
-
|
|
361
315
|
for (const {
|
|
362
316
|
functionParameterName
|
|
363
317
|
} of missingTags) {
|
|
@@ -454,7 +408,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
454
408
|
type: 'suggestion'
|
|
455
409
|
}
|
|
456
410
|
});
|
|
457
|
-
|
|
458
411
|
exports.default = _default;
|
|
459
412
|
module.exports = exports.default;
|
|
460
413
|
//# sourceMappingURL=requireParam.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requireParam.js","names":["rootNamer","desiredRoots","currentIndex","name","idx","incremented","length","base","suffix","shift","iterateJsdoc","jsdoc","utils","context","preferredTagName","getPreferredTagName","tagName","jsdocParameterNames","getJsdocTagsDeep","shallowJsdocParameterNames","filter","tag","includes","map","avoidDocs","hasTag","autoIncrementBase","checkRestProperty","checkDestructured","checkDestructuredRoots","checkTypesPattern","enableFixer","enableRootFixer","enableRestElementFixer","unnamedRootBase","useDefaultObjectProperties","options","checkTypesRegex","getRegexFromString","missingTags","functionParameterNames","getFunctionParameterNames","flattenedRoots","flattenRoots","names","paramIndex","hasParamIndex","cur","dropPathSegmentQuotes","String","getParamIndex","setParamIndex","entries","findExpectedIndex","jsdocTags","indexAtFunctionParams","remainingRoots","slice","foundIndex","findIndex","newAdd","some","remainingRoot","Array","isArray","tags","tagLineCount","source","tokens","end","nextRootName","namer","functionParameterIdx","functionParameterName","inc","matchedJsdoc","rootName","type","search","hasRestElement","hasPropertyRest","rests","notCheckingNames","paramName","find","fpn","emptyParamIdx","push","remove","fullParamName","notCheckingName","paramType","comparePaths","undefined","startsWith","funcParamName","restElement","fix","createTokens","tagIndex","sourceIndex","spliceCount","number","delimiter","description","lineEnd","postDelimiter","postName","postTag","postType","start","splice","firstNumber","src","offset","expectedIdx","fixer","missingTag","makeMultiline","reportJSDoc","contextDefaults","meta","docs","url","fixable","schema","additionalProperties","properties","default","checkConstructors","checkGetters","checkSetters","contexts","items","anyOf","comment","exemptedBy"],"sources":["../../src/rules/requireParam.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\n/**\n * @template T\n * @param {string[]} desiredRoots\n * @param {number} currentIndex\n * @returns {[string, boolean, () => T]}\n */\nconst rootNamer = (desiredRoots, currentIndex) => {\n let name;\n let idx = currentIndex;\n const incremented = desiredRoots.length <= 1;\n if (incremented) {\n const base = desiredRoots[0];\n const suffix = idx++;\n name = `${base}${suffix}`;\n } else {\n name = desiredRoots.shift();\n }\n\n return [\n name, incremented, () => {\n return rootNamer(desiredRoots, idx);\n },\n ];\n};\n\n// eslint-disable-next-line complexity\nexport default iterateJsdoc(({\n jsdoc,\n utils,\n context,\n}) => {\n const preferredTagName = utils.getPreferredTagName({\n tagName: 'param',\n });\n if (!preferredTagName) {\n return;\n }\n\n const jsdocParameterNames = utils.getJsdocTagsDeep(preferredTagName);\n\n const shallowJsdocParameterNames = jsdocParameterNames.filter((tag) => {\n return !tag.name.includes('.');\n }).map((tag, idx) => {\n return {\n ...tag,\n idx,\n };\n });\n\n if (utils.avoidDocs()) {\n return;\n }\n\n // Param type is specified by type in @type\n if (utils.hasTag('type')) {\n return;\n }\n\n const {\n autoIncrementBase = 0,\n checkRestProperty = false,\n checkDestructured = true,\n checkDestructuredRoots = true,\n checkTypesPattern = '/^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$/',\n enableFixer = true,\n enableRootFixer = true,\n enableRestElementFixer = true,\n unnamedRootBase = [\n 'root',\n ],\n useDefaultObjectProperties = false,\n } = context.options[0] || {};\n\n const checkTypesRegex = utils.getRegexFromString(checkTypesPattern);\n\n const missingTags = [];\n const functionParameterNames = utils.getFunctionParameterNames(useDefaultObjectProperties);\n const flattenedRoots = utils.flattenRoots(functionParameterNames).names;\n\n const paramIndex = {};\n const hasParamIndex = (cur) => {\n return utils.dropPathSegmentQuotes(String(cur)) in paramIndex;\n };\n\n const getParamIndex = (cur) => {\n return paramIndex[utils.dropPathSegmentQuotes(String(cur))];\n };\n\n const setParamIndex = (cur, idx) => {\n paramIndex[utils.dropPathSegmentQuotes(String(cur))] = idx;\n };\n\n for (const [\n idx,\n cur,\n ] of flattenedRoots.entries()) {\n setParamIndex(cur, idx);\n }\n\n const findExpectedIndex = (jsdocTags, indexAtFunctionParams) => {\n const remainingRoots = functionParameterNames.slice(indexAtFunctionParams || 0);\n const foundIndex = jsdocTags.findIndex(({\n name,\n newAdd,\n }) => {\n return !newAdd && remainingRoots.some((remainingRoot) => {\n if (Array.isArray(remainingRoot)) {\n return remainingRoot[1].names.includes(name);\n }\n\n if (typeof remainingRoot === 'object') {\n return name === remainingRoot.name;\n }\n\n return name === remainingRoot;\n });\n });\n\n const tags = foundIndex > -1 ?\n jsdocTags.slice(0, foundIndex) :\n jsdocTags.filter(({\n tag,\n }) => {\n return tag === preferredTagName;\n });\n\n let tagLineCount = 0;\n for (const {\n source,\n } of tags) {\n for (const {\n tokens: {\n end,\n },\n } of source) {\n if (!end) {\n tagLineCount++;\n }\n }\n }\n\n return tagLineCount;\n };\n\n let [\n nextRootName,\n incremented,\n namer,\n ] = rootNamer([\n ...unnamedRootBase,\n ], autoIncrementBase);\n\n for (const [\n functionParameterIdx,\n functionParameterName,\n ] of functionParameterNames.entries()) {\n let inc;\n if (Array.isArray(functionParameterName)) {\n const matchedJsdoc = shallowJsdocParameterNames[functionParameterIdx] ||\n jsdocParameterNames[functionParameterIdx];\n\n let rootName;\n if (functionParameterName[0]) {\n rootName = functionParameterName[0];\n } else if (matchedJsdoc && matchedJsdoc.name) {\n rootName = matchedJsdoc.name;\n if (matchedJsdoc.type && matchedJsdoc.type.search(checkTypesRegex) === -1) {\n continue;\n }\n } else {\n rootName = nextRootName;\n inc = incremented;\n [\n nextRootName,\n incremented,\n namer,\n ] = namer();\n }\n\n const {\n hasRestElement,\n hasPropertyRest,\n rests,\n names,\n } = functionParameterName[1];\n const notCheckingNames = [];\n if (!enableRestElementFixer && hasRestElement) {\n continue;\n }\n\n if (!checkDestructuredRoots) {\n continue;\n }\n\n for (const [\n idx,\n paramName,\n ] of names.entries()) {\n // Add root if the root name is not in the docs (and is not already\n // in the tags to be fixed)\n if (!jsdocParameterNames.find(({\n name,\n }) => {\n return name === rootName;\n }) && !missingTags.find(({\n functionParameterName: fpn,\n }) => {\n return fpn === rootName;\n })) {\n const emptyParamIdx = jsdocParameterNames.findIndex(({\n name,\n }) => {\n return !name;\n });\n\n if (emptyParamIdx > -1) {\n missingTags.push({\n functionParameterIdx: emptyParamIdx,\n functionParameterName: rootName,\n inc,\n remove: true,\n });\n } else {\n missingTags.push({\n functionParameterIdx: hasParamIndex(rootName) ?\n getParamIndex(rootName) :\n getParamIndex(paramName),\n functionParameterName: rootName,\n inc,\n });\n }\n }\n\n if (!checkDestructured) {\n continue;\n }\n\n if (!checkRestProperty && rests[idx]) {\n continue;\n }\n\n const fullParamName = `${rootName}.${paramName}`;\n\n const notCheckingName = jsdocParameterNames.find(({\n name,\n type: paramType,\n }) => {\n return utils.comparePaths(name)(fullParamName) && paramType.search(checkTypesRegex) === -1 && paramType !== '';\n });\n\n if (notCheckingName !== undefined) {\n notCheckingNames.push(notCheckingName.name);\n }\n\n if (notCheckingNames.find((name) => {\n return fullParamName.startsWith(name);\n })) {\n continue;\n }\n\n if (jsdocParameterNames && !jsdocParameterNames.find(({\n name,\n }) => {\n return utils.comparePaths(name)(fullParamName);\n })) {\n missingTags.push({\n functionParameterIdx: getParamIndex(\n functionParameterName[0] ? fullParamName : paramName,\n ),\n functionParameterName: fullParamName,\n inc,\n type: hasRestElement && !hasPropertyRest ? '{...any}' : undefined,\n });\n }\n }\n\n continue;\n }\n\n let funcParamName;\n let type;\n if (typeof functionParameterName === 'object') {\n if (!enableRestElementFixer && functionParameterName.restElement) {\n continue;\n }\n\n funcParamName = functionParameterName.name;\n type = '{...any}';\n } else {\n funcParamName = functionParameterName;\n }\n\n if (jsdocParameterNames && !jsdocParameterNames.find(({\n name,\n }) => {\n return name === funcParamName;\n })) {\n missingTags.push({\n functionParameterIdx: getParamIndex(funcParamName),\n functionParameterName: funcParamName,\n inc,\n type,\n });\n }\n }\n\n const fix = ({\n functionParameterIdx,\n functionParameterName,\n remove,\n inc,\n type,\n }) => {\n if (inc && !enableRootFixer) {\n return;\n }\n\n const createTokens = (tagIndex, sourceIndex, spliceCount) => {\n // console.log(sourceIndex, tagIndex, jsdoc.tags, jsdoc.source);\n const tokens = {\n number: sourceIndex + 1,\n tokens: {\n delimiter: '*',\n description: '',\n end: '',\n lineEnd: '',\n name: functionParameterName,\n newAdd: true,\n postDelimiter: ' ',\n postName: '',\n postTag: ' ',\n postType: type ? ' ' : '',\n start: jsdoc.source[sourceIndex].tokens.start,\n tag: `@${preferredTagName}`,\n type: type ?? '',\n },\n };\n jsdoc.tags.splice(tagIndex, spliceCount, {\n name: functionParameterName,\n newAdd: true,\n source: [\n tokens,\n ],\n tag: preferredTagName,\n type: type ?? '',\n });\n const firstNumber = jsdoc.source[0].number;\n jsdoc.source.splice(sourceIndex, spliceCount, tokens);\n for (const [\n idx,\n src,\n ] of jsdoc.source.slice(sourceIndex).entries()) {\n src.number = firstNumber + sourceIndex + idx;\n }\n };\n\n const offset = jsdoc.source.findIndex(({\n tokens: {\n tag,\n end,\n },\n }) => {\n return tag || end;\n });\n if (remove) {\n createTokens(functionParameterIdx, offset + functionParameterIdx, 1);\n } else {\n const expectedIdx = findExpectedIndex(jsdoc.tags, functionParameterIdx);\n createTokens(expectedIdx, offset + expectedIdx, 0);\n }\n };\n\n const fixer = () => {\n for (const missingTag of missingTags) {\n fix(missingTag);\n }\n };\n\n if (missingTags.length && jsdoc.source.length === 1) {\n utils.makeMultiline();\n }\n\n for (const {\n functionParameterName,\n } of missingTags) {\n utils.reportJSDoc(\n `Missing JSDoc @${preferredTagName} \"${functionParameterName}\" declaration.`,\n null,\n enableFixer ? fixer : null,\n );\n }\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that all function parameters are documented.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n autoIncrementBase: {\n default: 0,\n type: 'integer',\n },\n checkConstructors: {\n default: true,\n type: 'boolean',\n },\n checkDestructured: {\n default: true,\n type: 'boolean',\n },\n checkDestructuredRoots: {\n default: true,\n type: 'boolean',\n },\n checkGetters: {\n default: false,\n type: 'boolean',\n },\n checkRestProperty: {\n default: false,\n type: 'boolean',\n },\n checkSetters: {\n default: false,\n type: 'boolean',\n },\n checkTypesPattern: {\n type: 'string',\n },\n contexts: {\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n enableFixer: {\n type: 'boolean',\n },\n enableRestElementFixer: {\n type: 'boolean',\n },\n enableRootFixer: {\n type: 'boolean',\n },\n exemptedBy: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n unnamedRootBase: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n useDefaultObjectProperties: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;;AAAA;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,SAAS,GAAG,CAACC,YAAD,EAAeC,YAAf,KAAgC;EAChD,IAAIC,IAAJ;EACA,IAAIC,GAAG,GAAGF,YAAV;EACA,MAAMG,WAAW,GAAGJ,YAAY,CAACK,MAAb,IAAuB,CAA3C;;EACA,IAAID,WAAJ,EAAiB;IACf,MAAME,IAAI,GAAGN,YAAY,CAAC,CAAD,CAAzB;IACA,MAAMO,MAAM,GAAGJ,GAAG,EAAlB;IACAD,IAAI,GAAI,GAAEI,IAAK,GAAEC,MAAO,EAAxB;EACD,CAJD,MAIO;IACLL,IAAI,GAAGF,YAAY,CAACQ,KAAb,EAAP;EACD;;EAED,OAAO,CACLN,IADK,EACCE,WADD,EACc,MAAM;IACvB,OAAOL,SAAS,CAACC,YAAD,EAAeG,GAAf,CAAhB;EACD,CAHI,CAAP;AAKD,CAjBD,C,CAmBA;;;eACe,IAAAM,qBAAA,EAAa,CAAC;EAC3BC,KAD2B;EAE3BC,KAF2B;EAG3BC;AAH2B,CAAD,KAItB;EACJ,MAAMC,gBAAgB,GAAGF,KAAK,CAACG,mBAAN,CAA0B;IACjDC,OAAO,EAAE;EADwC,CAA1B,CAAzB;;EAGA,IAAI,CAACF,gBAAL,EAAuB;IACrB;EACD;;EAED,MAAMG,mBAAmB,GAAGL,KAAK,CAACM,gBAAN,CAAuBJ,gBAAvB,CAA5B;EAE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CAzBJ;QA6BV/C,iBAAiB,EAAE;UACjB+C,IAAI,EAAE;QADW,CA7BT;QAgCVuD,QAAQ,EAAE;UACRC,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACEzD,IAAI,EAAE;YADR,CADK,EAIL;cACEiD,oBAAoB,EAAE,KADxB;cAEEC,UAAU,EAAE;gBACVQ,OAAO,EAAE;kBACP1D,IAAI,EAAE;gBADC,CADC;gBAIVhE,OAAO,EAAE;kBACPgE,IAAI,EAAE;gBADC;cAJC,CAFd;cAUEA,IAAI,EAAE;YAVR,CAJK;UADF,CADC;UAoBRA,IAAI,EAAE;QApBE,CAhCA;QAsDV9C,WAAW,EAAE;UACX8C,IAAI,EAAE;QADK,CAtDH;QAyDV5C,sBAAsB,EAAE;UACtB4C,IAAI,EAAE;QADgB,CAzDd;QA4DV7C,eAAe,EAAE;UACf6C,IAAI,EAAE;QADS,CA5DP;QA+DV2D,UAAU,EAAE;UACVH,KAAK,EAAE;YACLxD,IAAI,EAAE;UADD,CADG;UAIVA,IAAI,EAAE;QAJI,CA/DF;QAqEV3C,eAAe,EAAE;UACfmG,KAAK,EAAE;YACLxD,IAAI,EAAE;UADD,CADQ;UAIfA,IAAI,EAAE;QAJS,CArEP;QA2EV1C,0BAA0B,EAAE;UAC1B0C,IAAI,EAAE;QADoB;MA3ElB,CAFd;MAiFEA,IAAI,EAAE;IAjFR,CADM,CANJ;IA2FJA,IAAI,EAAE;EA3FF;AAFL,CA7WY,C"}
|
|
1
|
+
{"version":3,"file":"requireParam.js","names":["rootNamer","desiredRoots","currentIndex","name","idx","incremented","length","base","suffix","shift","iterateJsdoc","jsdoc","utils","context","preferredTagName","getPreferredTagName","tagName","jsdocParameterNames","getJsdocTagsDeep","shallowJsdocParameterNames","filter","tag","includes","map","avoidDocs","hasTag","autoIncrementBase","checkRestProperty","checkDestructured","checkDestructuredRoots","checkTypesPattern","enableFixer","enableRootFixer","enableRestElementFixer","unnamedRootBase","useDefaultObjectProperties","options","checkTypesRegex","getRegexFromString","missingTags","functionParameterNames","getFunctionParameterNames","flattenedRoots","flattenRoots","names","paramIndex","hasParamIndex","cur","dropPathSegmentQuotes","String","getParamIndex","setParamIndex","entries","findExpectedIndex","jsdocTags","indexAtFunctionParams","remainingRoots","slice","foundIndex","findIndex","newAdd","some","remainingRoot","Array","isArray","tags","tagLineCount","source","tokens","end","nextRootName","namer","functionParameterIdx","functionParameterName","inc","matchedJsdoc","rootName","type","search","hasRestElement","hasPropertyRest","rests","notCheckingNames","paramName","find","fpn","emptyParamIdx","push","remove","fullParamName","notCheckingName","paramType","comparePaths","undefined","startsWith","funcParamName","restElement","fix","createTokens","tagIndex","sourceIndex","spliceCount","number","delimiter","description","lineEnd","postDelimiter","postName","postTag","postType","start","splice","firstNumber","src","offset","expectedIdx","fixer","missingTag","makeMultiline","reportJSDoc","contextDefaults","meta","docs","url","fixable","schema","additionalProperties","properties","default","checkConstructors","checkGetters","checkSetters","contexts","items","anyOf","comment","exemptedBy"],"sources":["../../src/rules/requireParam.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\n/**\n * @template T\n * @param {string[]} desiredRoots\n * @param {number} currentIndex\n * @returns {[string, boolean, () => T]}\n */\nconst rootNamer = (desiredRoots, currentIndex) => {\n let name;\n let idx = currentIndex;\n const incremented = desiredRoots.length <= 1;\n if (incremented) {\n const base = desiredRoots[0];\n const suffix = idx++;\n name = `${base}${suffix}`;\n } else {\n name = desiredRoots.shift();\n }\n\n return [\n name, incremented, () => {\n return rootNamer(desiredRoots, idx);\n },\n ];\n};\n\n// eslint-disable-next-line complexity\nexport default iterateJsdoc(({\n jsdoc,\n utils,\n context,\n}) => {\n const preferredTagName = utils.getPreferredTagName({\n tagName: 'param',\n });\n if (!preferredTagName) {\n return;\n }\n\n const jsdocParameterNames = utils.getJsdocTagsDeep(preferredTagName);\n\n const shallowJsdocParameterNames = jsdocParameterNames.filter((tag) => {\n return !tag.name.includes('.');\n }).map((tag, idx) => {\n return {\n ...tag,\n idx,\n };\n });\n\n if (utils.avoidDocs()) {\n return;\n }\n\n // Param type is specified by type in @type\n if (utils.hasTag('type')) {\n return;\n }\n\n const {\n autoIncrementBase = 0,\n checkRestProperty = false,\n checkDestructured = true,\n checkDestructuredRoots = true,\n checkTypesPattern = '/^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$/',\n enableFixer = true,\n enableRootFixer = true,\n enableRestElementFixer = true,\n unnamedRootBase = [\n 'root',\n ],\n useDefaultObjectProperties = false,\n } = context.options[0] || {};\n\n const checkTypesRegex = utils.getRegexFromString(checkTypesPattern);\n\n const missingTags = [];\n const functionParameterNames = utils.getFunctionParameterNames(useDefaultObjectProperties);\n const flattenedRoots = utils.flattenRoots(functionParameterNames).names;\n\n const paramIndex = {};\n const hasParamIndex = (cur) => {\n return utils.dropPathSegmentQuotes(String(cur)) in paramIndex;\n };\n\n const getParamIndex = (cur) => {\n return paramIndex[utils.dropPathSegmentQuotes(String(cur))];\n };\n\n const setParamIndex = (cur, idx) => {\n paramIndex[utils.dropPathSegmentQuotes(String(cur))] = idx;\n };\n\n for (const [\n idx,\n cur,\n ] of flattenedRoots.entries()) {\n setParamIndex(cur, idx);\n }\n\n const findExpectedIndex = (jsdocTags, indexAtFunctionParams) => {\n const remainingRoots = functionParameterNames.slice(indexAtFunctionParams || 0);\n const foundIndex = jsdocTags.findIndex(({\n name,\n newAdd,\n }) => {\n return !newAdd && remainingRoots.some((remainingRoot) => {\n if (Array.isArray(remainingRoot)) {\n return remainingRoot[1].names.includes(name);\n }\n\n if (typeof remainingRoot === 'object') {\n return name === remainingRoot.name;\n }\n\n return name === remainingRoot;\n });\n });\n\n const tags = foundIndex > -1 ?\n jsdocTags.slice(0, foundIndex) :\n jsdocTags.filter(({\n tag,\n }) => {\n return tag === preferredTagName;\n });\n\n let tagLineCount = 0;\n for (const {\n source,\n } of tags) {\n for (const {\n tokens: {\n end,\n },\n } of source) {\n if (!end) {\n tagLineCount++;\n }\n }\n }\n\n return tagLineCount;\n };\n\n let [\n nextRootName,\n incremented,\n namer,\n ] = rootNamer([\n ...unnamedRootBase,\n ], autoIncrementBase);\n\n for (const [\n functionParameterIdx,\n functionParameterName,\n ] of functionParameterNames.entries()) {\n let inc;\n if (Array.isArray(functionParameterName)) {\n const matchedJsdoc = shallowJsdocParameterNames[functionParameterIdx] ||\n jsdocParameterNames[functionParameterIdx];\n\n let rootName;\n if (functionParameterName[0]) {\n rootName = functionParameterName[0];\n } else if (matchedJsdoc && matchedJsdoc.name) {\n rootName = matchedJsdoc.name;\n if (matchedJsdoc.type && matchedJsdoc.type.search(checkTypesRegex) === -1) {\n continue;\n }\n } else {\n rootName = nextRootName;\n inc = incremented;\n [\n nextRootName,\n incremented,\n namer,\n ] = namer();\n }\n\n const {\n hasRestElement,\n hasPropertyRest,\n rests,\n names,\n } = functionParameterName[1];\n const notCheckingNames = [];\n if (!enableRestElementFixer && hasRestElement) {\n continue;\n }\n\n if (!checkDestructuredRoots) {\n continue;\n }\n\n for (const [\n idx,\n paramName,\n ] of names.entries()) {\n // Add root if the root name is not in the docs (and is not already\n // in the tags to be fixed)\n if (!jsdocParameterNames.find(({\n name,\n }) => {\n return name === rootName;\n }) && !missingTags.find(({\n functionParameterName: fpn,\n }) => {\n return fpn === rootName;\n })) {\n const emptyParamIdx = jsdocParameterNames.findIndex(({\n name,\n }) => {\n return !name;\n });\n\n if (emptyParamIdx > -1) {\n missingTags.push({\n functionParameterIdx: emptyParamIdx,\n functionParameterName: rootName,\n inc,\n remove: true,\n });\n } else {\n missingTags.push({\n functionParameterIdx: hasParamIndex(rootName) ?\n getParamIndex(rootName) :\n getParamIndex(paramName),\n functionParameterName: rootName,\n inc,\n });\n }\n }\n\n if (!checkDestructured) {\n continue;\n }\n\n if (!checkRestProperty && rests[idx]) {\n continue;\n }\n\n const fullParamName = `${rootName}.${paramName}`;\n\n const notCheckingName = jsdocParameterNames.find(({\n name,\n type: paramType,\n }) => {\n return utils.comparePaths(name)(fullParamName) && paramType.search(checkTypesRegex) === -1 && paramType !== '';\n });\n\n if (notCheckingName !== undefined) {\n notCheckingNames.push(notCheckingName.name);\n }\n\n if (notCheckingNames.find((name) => {\n return fullParamName.startsWith(name);\n })) {\n continue;\n }\n\n if (jsdocParameterNames && !jsdocParameterNames.find(({\n name,\n }) => {\n return utils.comparePaths(name)(fullParamName);\n })) {\n missingTags.push({\n functionParameterIdx: getParamIndex(\n functionParameterName[0] ? fullParamName : paramName,\n ),\n functionParameterName: fullParamName,\n inc,\n type: hasRestElement && !hasPropertyRest ? '{...any}' : undefined,\n });\n }\n }\n\n continue;\n }\n\n let funcParamName;\n let type;\n if (typeof functionParameterName === 'object') {\n if (!enableRestElementFixer && functionParameterName.restElement) {\n continue;\n }\n\n funcParamName = functionParameterName.name;\n type = '{...any}';\n } else {\n funcParamName = functionParameterName;\n }\n\n if (jsdocParameterNames && !jsdocParameterNames.find(({\n name,\n }) => {\n return name === funcParamName;\n })) {\n missingTags.push({\n functionParameterIdx: getParamIndex(funcParamName),\n functionParameterName: funcParamName,\n inc,\n type,\n });\n }\n }\n\n const fix = ({\n functionParameterIdx,\n functionParameterName,\n remove,\n inc,\n type,\n }) => {\n if (inc && !enableRootFixer) {\n return;\n }\n\n const createTokens = (tagIndex, sourceIndex, spliceCount) => {\n // console.log(sourceIndex, tagIndex, jsdoc.tags, jsdoc.source);\n const tokens = {\n number: sourceIndex + 1,\n tokens: {\n delimiter: '*',\n description: '',\n end: '',\n lineEnd: '',\n name: functionParameterName,\n newAdd: true,\n postDelimiter: ' ',\n postName: '',\n postTag: ' ',\n postType: type ? ' ' : '',\n start: jsdoc.source[sourceIndex].tokens.start,\n tag: `@${preferredTagName}`,\n type: type ?? '',\n },\n };\n jsdoc.tags.splice(tagIndex, spliceCount, {\n name: functionParameterName,\n newAdd: true,\n source: [\n tokens,\n ],\n tag: preferredTagName,\n type: type ?? '',\n });\n const firstNumber = jsdoc.source[0].number;\n jsdoc.source.splice(sourceIndex, spliceCount, tokens);\n for (const [\n idx,\n src,\n ] of jsdoc.source.slice(sourceIndex).entries()) {\n src.number = firstNumber + sourceIndex + idx;\n }\n };\n\n const offset = jsdoc.source.findIndex(({\n tokens: {\n tag,\n end,\n },\n }) => {\n return tag || end;\n });\n if (remove) {\n createTokens(functionParameterIdx, offset + functionParameterIdx, 1);\n } else {\n const expectedIdx = findExpectedIndex(jsdoc.tags, functionParameterIdx);\n createTokens(expectedIdx, offset + expectedIdx, 0);\n }\n };\n\n const fixer = () => {\n for (const missingTag of missingTags) {\n fix(missingTag);\n }\n };\n\n if (missingTags.length && jsdoc.source.length === 1) {\n utils.makeMultiline();\n }\n\n for (const {\n functionParameterName,\n } of missingTags) {\n utils.reportJSDoc(\n `Missing JSDoc @${preferredTagName} \"${functionParameterName}\" declaration.`,\n null,\n enableFixer ? fixer : null,\n );\n }\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that all function parameters are documented.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n autoIncrementBase: {\n default: 0,\n type: 'integer',\n },\n checkConstructors: {\n default: true,\n type: 'boolean',\n },\n checkDestructured: {\n default: true,\n type: 'boolean',\n },\n checkDestructuredRoots: {\n default: true,\n type: 'boolean',\n },\n checkGetters: {\n default: false,\n type: 'boolean',\n },\n checkRestProperty: {\n default: false,\n type: 'boolean',\n },\n checkSetters: {\n default: false,\n type: 'boolean',\n },\n checkTypesPattern: {\n type: 'string',\n },\n contexts: {\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n enableFixer: {\n type: 'boolean',\n },\n enableRestElementFixer: {\n type: 'boolean',\n },\n enableRootFixer: {\n type: 'boolean',\n },\n exemptedBy: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n unnamedRootBase: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n useDefaultObjectProperties: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAA2C;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,SAAS,GAAG,CAACC,YAAY,EAAEC,YAAY,KAAK;EAChD,IAAIC,IAAI;EACR,IAAIC,GAAG,GAAGF,YAAY;EACtB,MAAMG,WAAW,GAAGJ,YAAY,CAACK,MAAM,IAAI,CAAC;EAC5C,IAAID,WAAW,EAAE;IACf,MAAME,IAAI,GAAGN,YAAY,CAAC,CAAC,CAAC;IAC5B,MAAMO,MAAM,GAAGJ,GAAG,EAAE;IACpBD,IAAI,GAAI,GAAEI,IAAK,GAAEC,MAAO,EAAC;EAC3B,CAAC,MAAM;IACLL,IAAI,GAAGF,YAAY,CAACQ,KAAK,EAAE;EAC7B;EAEA,OAAO,CACLN,IAAI,EAAEE,WAAW,EAAE,MAAM;IACvB,OAAOL,SAAS,CAACC,YAAY,EAAEG,GAAG,CAAC;EACrC,CAAC,CACF;AACH,CAAC;;AAED;AAAA,eACe,IAAAM,qBAAY,EAAC,CAAC;EAC3BC,KAAK;EACLC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,MAAMC,gBAAgB,GAAGF,KAAK,CAACG,mBAAmB,CAAC;IACjDC,OAAO,EAAE;EACX,CAAC,CAAC;EACF,IAAI,CAACF,gBAAgB,EAAE;IACrB;EACF;EAEA,MAAMG,mBAAmB,GAAGL,KAAK,CAACM,gBAAgB,CAACJ,gBAAgB,CAAC;EAEpE,MAAMK,0BAA0B,GAAGF,mBAAmB,CAACG,MAAM,CAAEC,GAAG,IAAK;IACrE,OAAO,CAACA,GAAG,CAAClB,IAAI,CAACmB,QAAQ,CAAC,GAAG,CAAC;EAChC,CAAC,CAAC,CAACC,GAAG,CAAC,CAACF,GAAG,EAAEjB,GAAG,KAAK;IACnB,OAAO;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,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACD9C,WAAW,EAAE;UACX8C,IAAI,EAAE;QACR,CAAC;QACD5C,sBAAsB,EAAE;UACtB4C,IAAI,EAAE;QACR,CAAC;QACD7C,eAAe,EAAE;UACf6C,IAAI,EAAE;QACR,CAAC;QACD2D,UAAU,EAAE;UACVH,KAAK,EAAE;YACLxD,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACD3C,eAAe,EAAE;UACfmG,KAAK,EAAE;YACLxD,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACD1C,0BAA0B,EAAE;UAC1B0C,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA;AAAA"}
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = (0, _iterateJsdoc.default)(({
|
|
13
10
|
report,
|
|
14
11
|
utils
|
|
@@ -53,7 +50,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
53
50
|
type: 'suggestion'
|
|
54
51
|
}
|
|
55
52
|
});
|
|
56
|
-
|
|
57
53
|
exports.default = _default;
|
|
58
54
|
module.exports = exports.default;
|
|
59
55
|
//# sourceMappingURL=requireParamDescription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requireParamDescription.js","names":["iterateJsdoc","report","utils","forEachPreferredTag","jsdocParameter","targetTagName","description","trim","name","contextDefaults","meta","docs","url","schema","additionalProperties","properties","contexts","items","anyOf","type","comment","context"],"sources":["../../src/rules/requireParamDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {\n if (!jsdocParameter.description.trim()) {\n report(\n `Missing JSDoc @${targetTagName} \"${jsdocParameter.name}\" description.`,\n null,\n jsdocParameter,\n );\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that each `@param` tag has a `description` value.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-description',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"requireParamDescription.js","names":["iterateJsdoc","report","utils","forEachPreferredTag","jsdocParameter","targetTagName","description","trim","name","contextDefaults","meta","docs","url","schema","additionalProperties","properties","contexts","items","anyOf","type","comment","context"],"sources":["../../src/rules/requireParamDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {\n if (!jsdocParameter.description.trim()) {\n report(\n `Missing JSDoc @${targetTagName} \"${jsdocParameter.name}\" description.`,\n null,\n jsdocParameter,\n );\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that each `@param` tag has a `description` value.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-description',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAA2C;AAAA,eAE5B,IAAAA,qBAAY,EAAC,CAAC;EAC3BC,MAAM;EACNC;AACF,CAAC,KAAK;EACJA,KAAK,CAACC,mBAAmB,CAAC,OAAO,EAAE,CAACC,cAAc,EAAEC,aAAa,KAAK;IACpE,IAAI,CAACD,cAAc,CAACE,WAAW,CAACC,IAAI,EAAE,EAAE;MACtCN,MAAM,CACH,kBAAiBI,aAAc,KAAID,cAAc,CAACI,IAAK,gBAAe,EACvE,IAAI,EACJJ,cAAc,CACf;IACH;EACF,CAAC,CAAC;AACJ,CAAC,EAAE;EACDK,eAAe,EAAE,IAAI;EACrBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJL,WAAW,EAAE,4DAA4D;MACzEM,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVC,QAAQ,EAAE;UACRC,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACEC,IAAI,EAAE;YACR,CAAC,EACD;cACEL,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACVK,OAAO,EAAE;kBACPD,IAAI,EAAE;gBACR,CAAC;gBACDE,OAAO,EAAE;kBACPF,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA;AAAA"}
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = (0, _iterateJsdoc.default)(({
|
|
13
10
|
report,
|
|
14
11
|
utils
|
|
@@ -53,7 +50,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
53
50
|
type: 'suggestion'
|
|
54
51
|
}
|
|
55
52
|
});
|
|
56
|
-
|
|
57
53
|
exports.default = _default;
|
|
58
54
|
module.exports = exports.default;
|
|
59
55
|
//# sourceMappingURL=requireParamName.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requireParamName.js","names":["iterateJsdoc","report","utils","forEachPreferredTag","jsdocParameter","targetTagName","tag","name","type","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context"],"sources":["../../src/rules/requireParamName.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {\n if (jsdocParameter.tag && jsdocParameter.name === '') {\n report(\n `There must be an identifier after @${targetTagName} ${jsdocParameter.type === '' ? 'type' : 'tag'}.`,\n null,\n jsdocParameter,\n );\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that all function parameters have names.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-name',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"requireParamName.js","names":["iterateJsdoc","report","utils","forEachPreferredTag","jsdocParameter","targetTagName","tag","name","type","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context"],"sources":["../../src/rules/requireParamName.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {\n if (jsdocParameter.tag && jsdocParameter.name === '') {\n report(\n `There must be an identifier after @${targetTagName} ${jsdocParameter.type === '' ? 'type' : 'tag'}.`,\n null,\n jsdocParameter,\n );\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that all function parameters have names.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-name',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAA2C;AAAA,eAE5B,IAAAA,qBAAY,EAAC,CAAC;EAC3BC,MAAM;EACNC;AACF,CAAC,KAAK;EACJA,KAAK,CAACC,mBAAmB,CAAC,OAAO,EAAE,CAACC,cAAc,EAAEC,aAAa,KAAK;IACpE,IAAID,cAAc,CAACE,GAAG,IAAIF,cAAc,CAACG,IAAI,KAAK,EAAE,EAAE;MACpDN,MAAM,CACH,sCAAqCI,aAAc,IAAGD,cAAc,CAACI,IAAI,KAAK,EAAE,GAAG,MAAM,GAAG,KAAM,GAAE,EACrG,IAAI,EACJJ,cAAc,CACf;IACH;EACF,CAAC,CAAC;AACJ,CAAC,EAAE;EACDK,eAAe,EAAE,IAAI;EACrBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,mDAAmD;MAChEC,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVC,QAAQ,EAAE;UACRC,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACEX,IAAI,EAAE;YACR,CAAC,EACD;cACEO,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACVI,OAAO,EAAE;kBACPZ,IAAI,EAAE;gBACR,CAAC;gBACDa,OAAO,EAAE;kBACPb,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA;AAAA"}
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = (0, _iterateJsdoc.default)(({
|
|
13
10
|
report,
|
|
14
11
|
utils
|
|
@@ -53,7 +50,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
53
50
|
type: 'suggestion'
|
|
54
51
|
}
|
|
55
52
|
});
|
|
56
|
-
|
|
57
53
|
exports.default = _default;
|
|
58
54
|
module.exports = exports.default;
|
|
59
55
|
//# sourceMappingURL=requireParamType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requireParamType.js","names":["iterateJsdoc","report","utils","forEachPreferredTag","jsdocParameter","targetTagName","type","name","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context"],"sources":["../../src/rules/requireParamType.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {\n if (!jsdocParameter.type) {\n report(\n `Missing JSDoc @${targetTagName} \"${jsdocParameter.name}\" type.`,\n null,\n jsdocParameter,\n );\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that each `@param` tag has a `type` value.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-type',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"requireParamType.js","names":["iterateJsdoc","report","utils","forEachPreferredTag","jsdocParameter","targetTagName","type","name","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context"],"sources":["../../src/rules/requireParamType.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('param', (jsdocParameter, targetTagName) => {\n if (!jsdocParameter.type) {\n report(\n `Missing JSDoc @${targetTagName} \"${jsdocParameter.name}\" type.`,\n null,\n jsdocParameter,\n );\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that each `@param` tag has a `type` value.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-type',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAA2C;AAAA,eAE5B,IAAAA,qBAAY,EAAC,CAAC;EAC3BC,MAAM;EACNC;AACF,CAAC,KAAK;EACJA,KAAK,CAACC,mBAAmB,CAAC,OAAO,EAAE,CAACC,cAAc,EAAEC,aAAa,KAAK;IACpE,IAAI,CAACD,cAAc,CAACE,IAAI,EAAE;MACxBL,MAAM,CACH,kBAAiBI,aAAc,KAAID,cAAc,CAACG,IAAK,SAAQ,EAChE,IAAI,EACJH,cAAc,CACf;IACH;EACF,CAAC,CAAC;AACJ,CAAC,EAAE;EACDI,eAAe,EAAE,IAAI;EACrBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,qDAAqD;MAClEC,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVC,QAAQ,EAAE;UACRC,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACEZ,IAAI,EAAE;YACR,CAAC,EACD;cACEQ,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACVI,OAAO,EAAE;kBACPb,IAAI,EAAE;gBACR,CAAC;gBACDc,OAAO,EAAE;kBACPd,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA;AAAA"}
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = (0, _iterateJsdoc.default)(({
|
|
13
10
|
utils
|
|
14
11
|
}) => {
|
|
@@ -17,24 +14,19 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
17
14
|
}) => {
|
|
18
15
|
return ['typedef', 'namespace'].includes(tag);
|
|
19
16
|
});
|
|
20
|
-
|
|
21
17
|
if (!propertyAssociatedTags.length) {
|
|
22
18
|
return;
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
const targetTagName = utils.getPreferredTagName({
|
|
26
21
|
tagName: 'property'
|
|
27
22
|
});
|
|
28
|
-
|
|
29
23
|
if (utils.hasATag([targetTagName])) {
|
|
30
24
|
return;
|
|
31
25
|
}
|
|
32
|
-
|
|
33
26
|
for (const propertyAssociatedTag of propertyAssociatedTags) {
|
|
34
27
|
if (!['object', 'Object', 'PlainObject'].includes(propertyAssociatedTag.type)) {
|
|
35
28
|
continue;
|
|
36
29
|
}
|
|
37
|
-
|
|
38
30
|
utils.reportJSDoc(`Missing JSDoc @${targetTagName}.`, null, () => {
|
|
39
31
|
utils.addTag(targetTagName);
|
|
40
32
|
});
|
|
@@ -50,7 +42,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
50
42
|
type: 'suggestion'
|
|
51
43
|
}
|
|
52
44
|
});
|
|
53
|
-
|
|
54
45
|
exports.default = _default;
|
|
55
46
|
module.exports = exports.default;
|
|
56
47
|
//# sourceMappingURL=requireProperty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requireProperty.js","names":["iterateJsdoc","utils","propertyAssociatedTags","filterTags","tag","includes","length","targetTagName","getPreferredTagName","tagName","hasATag","propertyAssociatedTag","type","reportJSDoc","addTag","iterateAllJsdocs","meta","docs","description","url","fixable"],"sources":["../../src/rules/requireProperty.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n utils,\n}) => {\n const propertyAssociatedTags = utils.filterTags(({\n tag,\n }) => {\n return [\n 'typedef', 'namespace',\n ].includes(tag);\n });\n if (!propertyAssociatedTags.length) {\n return;\n }\n\n const targetTagName = utils.getPreferredTagName({\n tagName: 'property',\n });\n\n if (utils.hasATag([\n targetTagName,\n ])) {\n return;\n }\n\n for (const propertyAssociatedTag of propertyAssociatedTags) {\n if (![\n 'object', 'Object', 'PlainObject',\n ].includes(propertyAssociatedTag.type)) {\n continue;\n }\n\n utils.reportJSDoc(`Missing JSDoc @${targetTagName}.`, null, () => {\n utils.addTag(targetTagName);\n });\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-property',\n },\n fixable: 'code',\n type: 'suggestion',\n },\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"requireProperty.js","names":["iterateJsdoc","utils","propertyAssociatedTags","filterTags","tag","includes","length","targetTagName","getPreferredTagName","tagName","hasATag","propertyAssociatedTag","type","reportJSDoc","addTag","iterateAllJsdocs","meta","docs","description","url","fixable"],"sources":["../../src/rules/requireProperty.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n utils,\n}) => {\n const propertyAssociatedTags = utils.filterTags(({\n tag,\n }) => {\n return [\n 'typedef', 'namespace',\n ].includes(tag);\n });\n if (!propertyAssociatedTags.length) {\n return;\n }\n\n const targetTagName = utils.getPreferredTagName({\n tagName: 'property',\n });\n\n if (utils.hasATag([\n targetTagName,\n ])) {\n return;\n }\n\n for (const propertyAssociatedTag of propertyAssociatedTags) {\n if (![\n 'object', 'Object', 'PlainObject',\n ].includes(propertyAssociatedTag.type)) {\n continue;\n }\n\n utils.reportJSDoc(`Missing JSDoc @${targetTagName}.`, null, () => {\n utils.addTag(targetTagName);\n });\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-property',\n },\n fixable: 'code',\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAA2C;AAAA,eAE5B,IAAAA,qBAAY,EAAC,CAAC;EAC3BC;AACF,CAAC,KAAK;EACJ,MAAMC,sBAAsB,GAAGD,KAAK,CAACE,UAAU,CAAC,CAAC;IAC/CC;EACF,CAAC,KAAK;IACJ,OAAO,CACL,SAAS,EAAE,WAAW,CACvB,CAACC,QAAQ,CAACD,GAAG,CAAC;EACjB,CAAC,CAAC;EACF,IAAI,CAACF,sBAAsB,CAACI,MAAM,EAAE;IAClC;EACF;EAEA,MAAMC,aAAa,GAAGN,KAAK,CAACO,mBAAmB,CAAC;IAC9CC,OAAO,EAAE;EACX,CAAC,CAAC;EAEF,IAAIR,KAAK,CAACS,OAAO,CAAC,CAChBH,aAAa,CACd,CAAC,EAAE;IACF;EACF;EAEA,KAAK,MAAMI,qBAAqB,IAAIT,sBAAsB,EAAE;IAC1D,IAAI,CAAC,CACH,QAAQ,EAAE,QAAQ,EAAE,aAAa,CAClC,CAACG,QAAQ,CAACM,qBAAqB,CAACC,IAAI,CAAC,EAAE;MACtC;IACF;IAEAX,KAAK,CAACY,WAAW,CAAE,kBAAiBN,aAAc,GAAE,EAAE,IAAI,EAAE,MAAM;MAChEN,KAAK,CAACa,MAAM,CAACP,aAAa,CAAC;IAC7B,CAAC,CAAC;EACJ;AACF,CAAC,EAAE;EACDQ,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,sIAAsI;MACnJC,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE,MAAM;IACfR,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA;AAAA"}
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = (0, _iterateJsdoc.default)(({
|
|
13
10
|
report,
|
|
14
11
|
utils
|
|
@@ -28,7 +25,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
28
25
|
type: 'suggestion'
|
|
29
26
|
}
|
|
30
27
|
});
|
|
31
|
-
|
|
32
28
|
exports.default = _default;
|
|
33
29
|
module.exports = exports.default;
|
|
34
30
|
//# sourceMappingURL=requirePropertyDescription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirePropertyDescription.js","names":["iterateJsdoc","report","utils","forEachPreferredTag","jsdoc","targetTagName","description","trim","name","iterateAllJsdocs","meta","docs","url","type"],"sources":["../../src/rules/requirePropertyDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('property', (jsdoc, targetTagName) => {\n if (!jsdoc.description.trim()) {\n report(\n `Missing JSDoc @${targetTagName} \"${jsdoc.name}\" description.`,\n null,\n jsdoc,\n );\n }\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires that each `@property` tag has a `description` value.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-property-description',\n },\n type: 'suggestion',\n },\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"requirePropertyDescription.js","names":["iterateJsdoc","report","utils","forEachPreferredTag","jsdoc","targetTagName","description","trim","name","iterateAllJsdocs","meta","docs","url","type"],"sources":["../../src/rules/requirePropertyDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('property', (jsdoc, targetTagName) => {\n if (!jsdoc.description.trim()) {\n report(\n `Missing JSDoc @${targetTagName} \"${jsdoc.name}\" description.`,\n null,\n jsdoc,\n );\n }\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires that each `@property` tag has a `description` value.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-property-description',\n },\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAA2C;AAAA,eAE5B,IAAAA,qBAAY,EAAC,CAAC;EAC3BC,MAAM;EACNC;AACF,CAAC,KAAK;EACJA,KAAK,CAACC,mBAAmB,CAAC,UAAU,EAAE,CAACC,KAAK,EAAEC,aAAa,KAAK;IAC9D,IAAI,CAACD,KAAK,CAACE,WAAW,CAACC,IAAI,EAAE,EAAE;MAC7BN,MAAM,CACH,kBAAiBI,aAAc,KAAID,KAAK,CAACI,IAAK,gBAAe,EAC9D,IAAI,EACJJ,KAAK,CACN;IACH;EACF,CAAC,CAAC;AACJ,CAAC,EAAE;EACDK,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJL,WAAW,EAAE,+DAA+D;MAC5EM,GAAG,EAAE;IACP,CAAC;IACDC,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA;AAAA"}
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
var _default = (0, _iterateJsdoc.default)(({
|
|
13
10
|
report,
|
|
14
11
|
utils
|
|
@@ -28,7 +25,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
28
25
|
type: 'suggestion'
|
|
29
26
|
}
|
|
30
27
|
});
|
|
31
|
-
|
|
32
28
|
exports.default = _default;
|
|
33
29
|
module.exports = exports.default;
|
|
34
30
|
//# sourceMappingURL=requirePropertyName.js.map
|