eslint-plugin-jsdoc 39.3.6 → 39.3.13
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 +281 -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 +11 -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
package/dist/rules/tagLines.js
CHANGED
|
@@ -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
|
context,
|
|
14
11
|
jsdoc,
|
|
@@ -24,7 +21,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
24
21
|
let lastTag;
|
|
25
22
|
let lastEmpty = null;
|
|
26
23
|
let reportIndex = null;
|
|
27
|
-
|
|
28
24
|
for (const [idx, {
|
|
29
25
|
tokens: {
|
|
30
26
|
tag,
|
|
@@ -35,59 +31,47 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
35
31
|
}
|
|
36
32
|
}] of tg.source.entries()) {
|
|
37
33
|
var _tags$lastTag$slice, _tags$lastTag$slice2;
|
|
38
|
-
|
|
39
34
|
// May be text after a line break within a tag description
|
|
40
35
|
if (description) {
|
|
41
36
|
reportIndex = null;
|
|
42
37
|
}
|
|
43
|
-
|
|
44
38
|
if (lastTag && ['any', 'always'].includes((_tags$lastTag$slice = tags[lastTag.slice(1)]) === null || _tags$lastTag$slice === void 0 ? void 0 : _tags$lastTag$slice.lines)) {
|
|
45
39
|
continue;
|
|
46
40
|
}
|
|
47
|
-
|
|
48
41
|
const empty = !tag && !name && !type && !description;
|
|
49
|
-
|
|
50
42
|
if (empty && !end && (alwaysNever === 'never' || lastTag && ((_tags$lastTag$slice2 = tags[lastTag.slice(1)]) === null || _tags$lastTag$slice2 === void 0 ? void 0 : _tags$lastTag$slice2.lines) === 'never')) {
|
|
51
43
|
reportIndex = idx;
|
|
52
44
|
continue;
|
|
53
45
|
}
|
|
54
|
-
|
|
55
46
|
if (!end) {
|
|
56
47
|
lastEmpty = empty ? idx : null;
|
|
57
48
|
}
|
|
58
|
-
|
|
59
49
|
lastTag = tag;
|
|
60
50
|
}
|
|
61
|
-
|
|
62
51
|
if (dropEndLines && lastEmpty !== null && tagIdx === jsdoc.tags.length - 1) {
|
|
63
52
|
const fixer = () => {
|
|
64
53
|
utils.removeTagItem(tagIdx, lastEmpty);
|
|
65
54
|
};
|
|
66
|
-
|
|
67
55
|
utils.reportJSDoc('Expected no trailing lines', {
|
|
68
56
|
line: tg.source[lastEmpty].number
|
|
69
57
|
}, fixer);
|
|
70
58
|
return true;
|
|
71
59
|
}
|
|
72
|
-
|
|
73
60
|
if (reportIndex !== null) {
|
|
74
61
|
const fixer = () => {
|
|
75
62
|
utils.removeTagItem(tagIdx, reportIndex);
|
|
76
63
|
};
|
|
77
|
-
|
|
78
64
|
utils.reportJSDoc('Expected no lines between tags', {
|
|
79
65
|
line: tg.source[0].number + 1
|
|
80
66
|
}, fixer);
|
|
81
67
|
return true;
|
|
82
68
|
}
|
|
83
|
-
|
|
84
69
|
return false;
|
|
85
70
|
});
|
|
86
71
|
(noEndLines ? jsdoc.tags.slice(0, -1) : jsdoc.tags).some((tg, tagIdx) => {
|
|
87
72
|
const lines = [];
|
|
88
73
|
let currentTag;
|
|
89
74
|
let tagSourceIdx = 0;
|
|
90
|
-
|
|
91
75
|
for (const [idx, {
|
|
92
76
|
number,
|
|
93
77
|
tokens: {
|
|
@@ -102,11 +86,9 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
102
86
|
lines.splice(0, lines.length);
|
|
103
87
|
tagSourceIdx = idx;
|
|
104
88
|
}
|
|
105
|
-
|
|
106
89
|
if (tag) {
|
|
107
90
|
currentTag = tag;
|
|
108
91
|
}
|
|
109
|
-
|
|
110
92
|
if (!tag && !name && !type && !description && !end) {
|
|
111
93
|
lines.push({
|
|
112
94
|
idx,
|
|
@@ -114,34 +96,27 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
114
96
|
});
|
|
115
97
|
}
|
|
116
98
|
}
|
|
117
|
-
|
|
118
99
|
const currentTg = currentTag && tags[currentTag.slice(1)];
|
|
119
100
|
const tagCount = currentTg === null || currentTg === void 0 ? void 0 : currentTg.count;
|
|
120
101
|
const defaultAlways = alwaysNever === 'always' && (currentTg === null || currentTg === void 0 ? void 0 : currentTg.lines) !== 'never' && (currentTg === null || currentTg === void 0 ? void 0 : currentTg.lines) !== 'any' && lines.length < count;
|
|
121
102
|
let overrideAlways;
|
|
122
103
|
let fixCount = count;
|
|
123
|
-
|
|
124
104
|
if (!defaultAlways) {
|
|
125
105
|
fixCount = typeof tagCount === 'number' ? tagCount : count;
|
|
126
106
|
overrideAlways = (currentTg === null || currentTg === void 0 ? void 0 : currentTg.lines) === 'always' && lines.length < fixCount;
|
|
127
107
|
}
|
|
128
|
-
|
|
129
108
|
if (defaultAlways || overrideAlways) {
|
|
130
109
|
var _lines2;
|
|
131
|
-
|
|
132
110
|
const fixer = () => {
|
|
133
111
|
var _lines;
|
|
134
|
-
|
|
135
112
|
utils.addLines(tagIdx, ((_lines = lines[lines.length - 1]) === null || _lines === void 0 ? void 0 : _lines.idx) || tagSourceIdx + 1, fixCount - lines.length);
|
|
136
113
|
};
|
|
137
|
-
|
|
138
114
|
const line = ((_lines2 = lines[lines.length - 1]) === null || _lines2 === void 0 ? void 0 : _lines2.number) || tg.source[tagSourceIdx].number;
|
|
139
115
|
utils.reportJSDoc(`Expected ${fixCount} line${fixCount === 1 ? '' : 's'} between tags but found ${lines.length}`, {
|
|
140
116
|
line
|
|
141
117
|
}, fixer);
|
|
142
118
|
return true;
|
|
143
119
|
}
|
|
144
|
-
|
|
145
120
|
return false;
|
|
146
121
|
});
|
|
147
122
|
}, {
|
|
@@ -190,7 +165,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
190
165
|
type: 'suggestion'
|
|
191
166
|
}
|
|
192
167
|
});
|
|
193
|
-
|
|
194
168
|
exports.default = _default;
|
|
195
169
|
module.exports = exports.default;
|
|
196
170
|
//# sourceMappingURL=tagLines.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagLines.js","names":["iterateJsdoc","context","jsdoc","utils","alwaysNever","count","dropEndLines","noEndLines","tags","options","some","tg","tagIdx","lastTag","lastEmpty","reportIndex","idx","tokens","tag","name","type","description","end","source","entries","includes","slice","lines","empty","length","fixer","removeTagItem","reportJSDoc","line","number","currentTag","tagSourceIdx","splice","push","currentTg","tagCount","defaultAlways","overrideAlways","fixCount","addLines","iterateAllJsdocs","meta","docs","url","fixable","schema","enum","additionalProperies","properties","patternProperties","additionalProperties"],"sources":["../../src/rules/tagLines.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n utils,\n}) => {\n const [\n alwaysNever = 'never',\n {\n count = 1,\n dropEndLines = false,\n noEndLines = false,\n tags = {},\n } = {},\n ] = context.options;\n\n jsdoc.tags.some((tg, tagIdx) => {\n let lastTag;\n let lastEmpty = null;\n\n let reportIndex = null;\n for (const [\n idx,\n {\n tokens: {\n tag,\n name,\n type,\n description,\n end,\n },\n },\n ] of tg.source.entries()) {\n // May be text after a line break within a tag description\n if (description) {\n reportIndex = null;\n }\n\n if (lastTag && [\n 'any', 'always',\n ].includes(tags[lastTag.slice(1)]?.lines)) {\n continue;\n }\n\n const empty = !tag && !name && !type && !description;\n if (\n empty && !end &&\n (alwaysNever === 'never' ||\n lastTag && tags[lastTag.slice(1)]?.lines === 'never'\n )\n ) {\n reportIndex = idx;\n\n continue;\n }\n\n if (!end) {\n lastEmpty = empty ? idx : null;\n }\n\n lastTag = tag;\n }\n\n if (dropEndLines && lastEmpty !== null && tagIdx === jsdoc.tags.length - 1) {\n const fixer = () => {\n utils.removeTagItem(tagIdx, lastEmpty);\n };\n\n utils.reportJSDoc(\n 'Expected no trailing lines',\n {\n line: tg.source[lastEmpty].number,\n },\n fixer,\n );\n\n return true;\n }\n\n if (reportIndex !== null) {\n const fixer = () => {\n utils.removeTagItem(tagIdx, reportIndex);\n };\n\n utils.reportJSDoc(\n 'Expected no lines between tags',\n {\n line: tg.source[0].number + 1,\n },\n fixer,\n );\n\n return true;\n }\n\n return false;\n });\n\n (noEndLines ? jsdoc.tags.slice(0, -1) : jsdoc.tags).some((tg, tagIdx) => {\n const lines = [];\n\n let currentTag;\n let tagSourceIdx = 0;\n for (const [\n idx,\n {\n number,\n tokens: {\n tag,\n name,\n type,\n description,\n end,\n },\n },\n ] of tg.source.entries()) {\n if (description) {\n lines.splice(0, lines.length);\n tagSourceIdx = idx;\n }\n\n if (tag) {\n currentTag = tag;\n }\n\n if (!tag && !name && !type && !description && !end) {\n lines.push({\n idx,\n number,\n });\n }\n }\n\n const currentTg = currentTag && tags[currentTag.slice(1)];\n const tagCount = currentTg?.count;\n\n const defaultAlways = alwaysNever === 'always' && currentTg?.lines !== 'never' &&\n currentTg?.lines !== 'any' && lines.length < count;\n\n let overrideAlways;\n let fixCount = count;\n if (!defaultAlways) {\n fixCount = typeof tagCount === 'number' ? tagCount : count;\n overrideAlways = currentTg?.lines === 'always' &&\n lines.length < fixCount;\n }\n\n if (defaultAlways || overrideAlways) {\n const fixer = () => {\n utils.addLines(tagIdx, lines[lines.length - 1]?.idx || tagSourceIdx + 1, fixCount - lines.length);\n };\n\n const line = lines[lines.length - 1]?.number || tg.source[tagSourceIdx].number;\n utils.reportJSDoc(\n `Expected ${fixCount} line${fixCount === 1 ? '' : 's'} between tags but found ${lines.length}`,\n {\n line,\n },\n fixer,\n );\n\n return true;\n }\n\n return false;\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Enforces lines (or no lines) between tags.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-tag-lines',\n },\n fixable: 'code',\n schema: [\n {\n enum: [\n 'always', 'any', 'never',\n ],\n type: 'string',\n },\n {\n additionalProperies: false,\n properties: {\n count: {\n type: 'integer',\n },\n dropEndLines: {\n type: 'boolean',\n },\n noEndLines: {\n type: 'boolean',\n },\n tags: {\n patternProperties: {\n '.*': {\n additionalProperties: false,\n properties: {\n count: {\n type: 'integer',\n },\n lines: {\n enum: [\n 'always', 'never', 'any',\n ],\n type: 'string',\n },\n },\n },\n },\n type: 'object',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;;AAAA;;;;eAEe,IAAAA,qBAAA,EAAa,CAAC;EAC3BC,OAD2B;EAE3BC,KAF2B;EAG3BC;AAH2B,CAAD,KAItB;EACJ,MAAM,CACJC,WAAW,GAAG,OADV,EAEJ;IACEC,KAAK,GAAG,CADV;IAEEC,YAAY,GAAG,KAFjB;IAGEC,UAAU,GAAG,KAHf;IAIEC,IAAI,GAAG;EAJT,IAKI,EAPA,IAQFP,OAAO,CAACQ,OARZ;EAUAP,KAAK,CAACM,IAAN,CAAWE,IAAX,CAAgB,CAACC,EAAD,EAAKC,MAAL,KAAgB;IAC9B,IAAIC,OAAJ;IACA,IAAIC,SAAS,GAAG,IAAhB;IAEA,IAAIC,WAAW,GAAG,IAAlB;;IACA,KAAK,MAAM,CACTC,GADS,EAET;MACEC,MAAM,EAAE;QACNC,GADM;QAENC,IAFM;QAGNC,IAHM;QAINC,WAJM;QAKNC;MALM;IADV,CAFS,CAAX,IAWKX,EAAE,CAACY,MAAH,CAAUC,OAAV,EAXL,EAW0B;MAAA;;MACxB;MACA,IAAIH,WAAJ,EAAiB;QACfN,WAAW,GAAG,IAAd;MACD;;MAED,IAAIF,OAAO,IAAI,CACb,KADa,EACN,QADM,EAEbY,QAFa,wBAEJjB,IAAI,CAACK,OAAO,CAACa,KAAR,CAAc,CAAd,CAAD,CAFA,wDAEJ,oBAAwBC,KAFpB,CAAf,EAE2C;QACzC;MACD;;MAED,MAAMC,KAAK,GAAG,CAACV,GAAD,IAAQ,CAACC,IAAT,IAAiB,CAACC,IAAlB,IAA0B,CAACC,WAAzC;;MACA,IACEO,KAAK,IAAI,CAACN,GAAV,KACClB,WAA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,EAAE;UACVa,IAAI,EAAE;QADI,CAPF;QAUVZ,IAAI,EAAE;UACJ8C,iBAAiB,EAAE;YACjB,MAAM;cACJC,oBAAoB,EAAE,KADlB;cAEJF,UAAU,EAAE;gBACVhD,KAAK,EAAE;kBACLe,IAAI,EAAE;gBADD,CADG;gBAIVO,KAAK,EAAE;kBACLwB,IAAI,EAAE,CACJ,QADI,EACM,OADN,EACe,KADf,CADD;kBAIL/B,IAAI,EAAE;gBAJD;cAJG;YAFR;UADW,CADf;UAiBJA,IAAI,EAAE;QAjBF;MAVI,CAFd;MAgCEA,IAAI,EAAE;IAhCR,CAPM,CANJ;IAgDJA,IAAI,EAAE;EAhDF;AAFL,CArKY,C"}
|
|
1
|
+
{"version":3,"file":"tagLines.js","names":["iterateJsdoc","context","jsdoc","utils","alwaysNever","count","dropEndLines","noEndLines","tags","options","some","tg","tagIdx","lastTag","lastEmpty","reportIndex","idx","tokens","tag","name","type","description","end","source","entries","includes","slice","lines","empty","length","fixer","removeTagItem","reportJSDoc","line","number","currentTag","tagSourceIdx","splice","push","currentTg","tagCount","defaultAlways","overrideAlways","fixCount","addLines","iterateAllJsdocs","meta","docs","url","fixable","schema","enum","additionalProperies","properties","patternProperties","additionalProperties"],"sources":["../../src/rules/tagLines.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n utils,\n}) => {\n const [\n alwaysNever = 'never',\n {\n count = 1,\n dropEndLines = false,\n noEndLines = false,\n tags = {},\n } = {},\n ] = context.options;\n\n jsdoc.tags.some((tg, tagIdx) => {\n let lastTag;\n let lastEmpty = null;\n\n let reportIndex = null;\n for (const [\n idx,\n {\n tokens: {\n tag,\n name,\n type,\n description,\n end,\n },\n },\n ] of tg.source.entries()) {\n // May be text after a line break within a tag description\n if (description) {\n reportIndex = null;\n }\n\n if (lastTag && [\n 'any', 'always',\n ].includes(tags[lastTag.slice(1)]?.lines)) {\n continue;\n }\n\n const empty = !tag && !name && !type && !description;\n if (\n empty && !end &&\n (alwaysNever === 'never' ||\n lastTag && tags[lastTag.slice(1)]?.lines === 'never'\n )\n ) {\n reportIndex = idx;\n\n continue;\n }\n\n if (!end) {\n lastEmpty = empty ? idx : null;\n }\n\n lastTag = tag;\n }\n\n if (dropEndLines && lastEmpty !== null && tagIdx === jsdoc.tags.length - 1) {\n const fixer = () => {\n utils.removeTagItem(tagIdx, lastEmpty);\n };\n\n utils.reportJSDoc(\n 'Expected no trailing lines',\n {\n line: tg.source[lastEmpty].number,\n },\n fixer,\n );\n\n return true;\n }\n\n if (reportIndex !== null) {\n const fixer = () => {\n utils.removeTagItem(tagIdx, reportIndex);\n };\n\n utils.reportJSDoc(\n 'Expected no lines between tags',\n {\n line: tg.source[0].number + 1,\n },\n fixer,\n );\n\n return true;\n }\n\n return false;\n });\n\n (noEndLines ? jsdoc.tags.slice(0, -1) : jsdoc.tags).some((tg, tagIdx) => {\n const lines = [];\n\n let currentTag;\n let tagSourceIdx = 0;\n for (const [\n idx,\n {\n number,\n tokens: {\n tag,\n name,\n type,\n description,\n end,\n },\n },\n ] of tg.source.entries()) {\n if (description) {\n lines.splice(0, lines.length);\n tagSourceIdx = idx;\n }\n\n if (tag) {\n currentTag = tag;\n }\n\n if (!tag && !name && !type && !description && !end) {\n lines.push({\n idx,\n number,\n });\n }\n }\n\n const currentTg = currentTag && tags[currentTag.slice(1)];\n const tagCount = currentTg?.count;\n\n const defaultAlways = alwaysNever === 'always' && currentTg?.lines !== 'never' &&\n currentTg?.lines !== 'any' && lines.length < count;\n\n let overrideAlways;\n let fixCount = count;\n if (!defaultAlways) {\n fixCount = typeof tagCount === 'number' ? tagCount : count;\n overrideAlways = currentTg?.lines === 'always' &&\n lines.length < fixCount;\n }\n\n if (defaultAlways || overrideAlways) {\n const fixer = () => {\n utils.addLines(tagIdx, lines[lines.length - 1]?.idx || tagSourceIdx + 1, fixCount - lines.length);\n };\n\n const line = lines[lines.length - 1]?.number || tg.source[tagSourceIdx].number;\n utils.reportJSDoc(\n `Expected ${fixCount} line${fixCount === 1 ? '' : 's'} between tags but found ${lines.length}`,\n {\n line,\n },\n fixer,\n );\n\n return true;\n }\n\n return false;\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Enforces lines (or no lines) between tags.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-tag-lines',\n },\n fixable: 'code',\n schema: [\n {\n enum: [\n 'always', 'any', 'never',\n ],\n type: 'string',\n },\n {\n additionalProperies: false,\n properties: {\n count: {\n type: 'integer',\n },\n dropEndLines: {\n type: 'boolean',\n },\n noEndLines: {\n type: 'boolean',\n },\n tags: {\n patternProperties: {\n '.*': {\n additionalProperties: false,\n properties: {\n count: {\n type: 'integer',\n },\n lines: {\n enum: [\n 'always', 'never', 'any',\n ],\n type: 'string',\n },\n },\n },\n },\n type: 'object',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAA2C;AAAA,eAE5B,IAAAA,qBAAY,EAAC,CAAC;EAC3BC,OAAO;EACPC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,MAAM,CACJC,WAAW,GAAG,OAAO,EACrB;IACEC,KAAK,GAAG,CAAC;IACTC,YAAY,GAAG,KAAK;IACpBC,UAAU,GAAG,KAAK;IAClBC,IAAI,GAAG,CAAC;EACV,CAAC,GAAG,CAAC,CAAC,CACP,GAAGP,OAAO,CAACQ,OAAO;EAEnBP,KAAK,CAACM,IAAI,CAACE,IAAI,CAAC,CAACC,EAAE,EAAEC,MAAM,KAAK;IAC9B,IAAIC,OAAO;IACX,IAAIC,SAAS,GAAG,IAAI;IAEpB,IAAIC,WAAW,GAAG,IAAI;IACtB,KAAK,MAAM,CACTC,GAAG,EACH;MACEC,MAAM,EAAE;QACNC,GAAG;QACHC,IAAI;QACJC,IAAI;QACJC,WAAW;QACXC;MACF;IACF,CAAC,CACF,IAAIX,EAAE,CAACY,MAAM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I;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJ1B,WAAW,EAAE,4CAA4C;MACzD2B,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,CACN;MACEC,IAAI,EAAE,CACJ,QAAQ,EAAE,KAAK,EAAE,OAAO,CACzB;MACD/B,IAAI,EAAE;IACR,CAAC,EACD;MACEgC,mBAAmB,EAAE,KAAK;MAC1BC,UAAU,EAAE;QACVhD,KAAK,EAAE;UACLe,IAAI,EAAE;QACR,CAAC;QACDd,YAAY,EAAE;UACZc,IAAI,EAAE;QACR,CAAC;QACDb,UAAU,EAAE;UACVa,IAAI,EAAE;QACR,CAAC;QACDZ,IAAI,EAAE;UACJ8C,iBAAiB,EAAE;YACjB,IAAI,EAAE;cACJC,oBAAoB,EAAE,KAAK;cAC3BF,UAAU,EAAE;gBACVhD,KAAK,EAAE;kBACLe,IAAI,EAAE;gBACR,CAAC;gBACDO,KAAK,EAAE;kBACLwB,IAAI,EAAE,CACJ,QAAQ,EAAE,OAAO,EAAE,KAAK,CACzB;kBACD/B,IAAI,EAAE;gBACR;cACF;YACF;UACF,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA;AAAA"}
|
package/dist/rules/validTypes.js
CHANGED
|
@@ -4,30 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _jsdoccomment = require("@es-joy/jsdoccomment");
|
|
9
|
-
|
|
10
8
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
10
|
const asExpression = /as\s+/u;
|
|
15
|
-
const suppressTypes = new Set([
|
|
11
|
+
const suppressTypes = new Set([
|
|
12
|
+
// https://github.com/google/closure-compiler/wiki/@suppress-annotations
|
|
16
13
|
// https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/ParserConfig.properties#L154
|
|
17
|
-
'accessControls', 'checkDebuggerStatement', 'checkPrototypalTypes', 'checkRegExp', 'checkTypes', 'checkVars', 'closureDepMethodUsageChecks', 'const', 'constantProperty', 'deprecated', 'duplicate', 'es5Strict', 'externsValidation', 'extraProvide', 'extraRequire', 'globalThis', 'invalidCasts', 'lateProvide', 'legacyGoogScopeRequire', 'lintChecks', 'messageConventions', 'misplacedTypeAnnotation', 'missingOverride', 'missingPolyfill', 'missingProperties', 'missingProvide', 'missingRequire', 'missingSourcesWarnings', 'moduleLoad', 'nonStandardJsDocs', 'partialAlias', 'polymer', 'reportUnknownTypes', 'strictMissingProperties', 'strictModuleDepCheck', 'strictPrimitiveOperators', 'suspiciousCode',
|
|
14
|
+
'accessControls', 'checkDebuggerStatement', 'checkPrototypalTypes', 'checkRegExp', 'checkTypes', 'checkVars', 'closureDepMethodUsageChecks', 'const', 'constantProperty', 'deprecated', 'duplicate', 'es5Strict', 'externsValidation', 'extraProvide', 'extraRequire', 'globalThis', 'invalidCasts', 'lateProvide', 'legacyGoogScopeRequire', 'lintChecks', 'messageConventions', 'misplacedTypeAnnotation', 'missingOverride', 'missingPolyfill', 'missingProperties', 'missingProvide', 'missingRequire', 'missingSourcesWarnings', 'moduleLoad', 'nonStandardJsDocs', 'partialAlias', 'polymer', 'reportUnknownTypes', 'strictMissingProperties', 'strictModuleDepCheck', 'strictPrimitiveOperators', 'suspiciousCode',
|
|
15
|
+
// Not documented in enum
|
|
18
16
|
'switch', 'transitionalSuspiciousCodeWarnings', 'undefinedNames', 'undefinedVars', 'underscore', 'unknownDefines', 'untranspilableFeatures', 'unusedLocalVariables', 'unusedPrivateMembers', 'useOfGoogProvide', 'uselessCode', 'visibility', 'with']);
|
|
19
|
-
|
|
20
17
|
const tryParsePathIgnoreError = path => {
|
|
21
18
|
try {
|
|
22
19
|
(0, _jsdoccomment.tryParse)(path);
|
|
23
20
|
return true;
|
|
24
|
-
} catch {
|
|
21
|
+
} catch {
|
|
22
|
+
// Keep the original error for including the whole type
|
|
25
23
|
}
|
|
26
|
-
|
|
27
24
|
return false;
|
|
28
|
-
};
|
|
29
|
-
|
|
25
|
+
};
|
|
30
26
|
|
|
27
|
+
// eslint-disable-next-line complexity
|
|
31
28
|
var _default = (0, _iterateJsdoc.default)(({
|
|
32
29
|
jsdoc,
|
|
33
30
|
report,
|
|
@@ -41,15 +38,12 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
41
38
|
const {
|
|
42
39
|
mode
|
|
43
40
|
} = settings;
|
|
44
|
-
|
|
45
41
|
for (const tag of jsdoc.tags) {
|
|
46
42
|
const validNamepathParsing = function (namepath, tagName) {
|
|
47
43
|
if (tryParsePathIgnoreError(namepath)) {
|
|
48
44
|
return true;
|
|
49
45
|
}
|
|
50
|
-
|
|
51
46
|
let handled = false;
|
|
52
|
-
|
|
53
47
|
if (tagName) {
|
|
54
48
|
// eslint-disable-next-line default-case
|
|
55
49
|
switch (tagName) {
|
|
@@ -59,41 +53,32 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
59
53
|
if (!namepath.startsWith('module:')) {
|
|
60
54
|
handled = tryParsePathIgnoreError(`module:${namepath}`);
|
|
61
55
|
}
|
|
62
|
-
|
|
63
56
|
break;
|
|
64
57
|
}
|
|
65
|
-
|
|
66
58
|
case 'memberof':
|
|
67
59
|
case 'memberof!':
|
|
68
60
|
{
|
|
69
61
|
const endChar = namepath.slice(-1);
|
|
70
|
-
|
|
71
62
|
if (['#', '.', '~'].includes(endChar)) {
|
|
72
63
|
handled = tryParsePathIgnoreError(namepath.slice(0, -1));
|
|
73
64
|
}
|
|
74
|
-
|
|
75
65
|
break;
|
|
76
66
|
}
|
|
77
|
-
|
|
78
67
|
case 'borrows':
|
|
79
68
|
{
|
|
80
69
|
const startChar = namepath.charAt();
|
|
81
|
-
|
|
82
70
|
if (['#', '.', '~'].includes(startChar)) {
|
|
83
71
|
handled = tryParsePathIgnoreError(namepath.slice(1));
|
|
84
72
|
}
|
|
85
73
|
}
|
|
86
74
|
}
|
|
87
75
|
}
|
|
88
|
-
|
|
89
76
|
if (!handled) {
|
|
90
77
|
report(`Syntax error in namepath: ${namepath}`, null, tag);
|
|
91
78
|
return false;
|
|
92
79
|
}
|
|
93
|
-
|
|
94
80
|
return true;
|
|
95
81
|
};
|
|
96
|
-
|
|
97
82
|
const validTypeParsing = function (type) {
|
|
98
83
|
try {
|
|
99
84
|
if (mode === 'permissive') {
|
|
@@ -105,107 +90,92 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
105
90
|
report(`Syntax error in type: ${type}`, null, tag);
|
|
106
91
|
return false;
|
|
107
92
|
}
|
|
108
|
-
|
|
109
93
|
return true;
|
|
110
94
|
};
|
|
111
|
-
|
|
112
95
|
if (tag.tag === 'borrows') {
|
|
113
96
|
const thisNamepath = utils.getTagDescription(tag).replace(asExpression, '').trim();
|
|
114
|
-
|
|
115
97
|
if (!asExpression.test(utils.getTagDescription(tag)) || !thisNamepath) {
|
|
116
98
|
report(`@borrows must have an "as" expression. Found "${utils.getTagDescription(tag)}"`, null, tag);
|
|
117
99
|
continue;
|
|
118
100
|
}
|
|
119
|
-
|
|
120
101
|
if (validNamepathParsing(thisNamepath, 'borrows')) {
|
|
121
102
|
const thatNamepath = tag.name;
|
|
122
103
|
validNamepathParsing(thatNamepath);
|
|
123
104
|
}
|
|
124
|
-
|
|
125
105
|
continue;
|
|
126
106
|
}
|
|
127
|
-
|
|
128
107
|
if (tag.tag === 'suppress' && mode === 'closure') {
|
|
129
108
|
let parsedTypes;
|
|
130
|
-
|
|
131
109
|
try {
|
|
132
110
|
parsedTypes = (0, _jsdoccomment.tryParse)(tag.type);
|
|
133
|
-
} catch {
|
|
111
|
+
} catch {
|
|
112
|
+
// Ignore
|
|
134
113
|
}
|
|
135
|
-
|
|
136
114
|
if (parsedTypes) {
|
|
137
115
|
(0, _jsdoccomment.traverse)(parsedTypes, node => {
|
|
138
116
|
const {
|
|
139
117
|
value: type
|
|
140
118
|
} = node;
|
|
141
|
-
|
|
142
119
|
if (type !== undefined && !suppressTypes.has(type)) {
|
|
143
120
|
report(`Syntax error in supresss type: ${type}`, null, tag);
|
|
144
121
|
}
|
|
145
122
|
});
|
|
146
123
|
}
|
|
147
124
|
}
|
|
148
|
-
|
|
149
125
|
const otherModeMaps = ['jsdoc', 'typescript', 'closure', 'permissive'].filter(mde => {
|
|
150
126
|
return mde !== mode;
|
|
151
127
|
}).map(mde => {
|
|
152
128
|
return utils.getTagStructureForMode(mde);
|
|
153
129
|
});
|
|
154
130
|
const tagMightHaveNamePosition = utils.tagMightHaveNamePosition(tag.tag, otherModeMaps);
|
|
155
|
-
|
|
156
131
|
if (tagMightHaveNamePosition !== true && tag.name) {
|
|
157
132
|
const modeInfo = tagMightHaveNamePosition === false ? '' : ` in "${mode}" mode`;
|
|
158
133
|
report(`@${tag.tag} should not have a name${modeInfo}.`, null, tag);
|
|
159
134
|
continue;
|
|
160
135
|
}
|
|
161
|
-
|
|
162
136
|
const mightHaveTypePosition = utils.tagMightHaveTypePosition(tag.tag, otherModeMaps);
|
|
163
|
-
|
|
164
137
|
if (mightHaveTypePosition !== true && tag.type) {
|
|
165
138
|
const modeInfo = mightHaveTypePosition === false ? '' : ` in "${mode}" mode`;
|
|
166
139
|
report(`@${tag.tag} should not have a bracketed type${modeInfo}.`, null, tag);
|
|
167
140
|
continue;
|
|
168
|
-
}
|
|
141
|
+
}
|
|
169
142
|
|
|
143
|
+
// REQUIRED NAME
|
|
144
|
+
const tagMustHaveNamePosition = utils.tagMustHaveNamePosition(tag.tag, otherModeMaps);
|
|
170
145
|
|
|
171
|
-
|
|
146
|
+
// Don't handle `@param` here though it does require name as handled by
|
|
172
147
|
// `require-param-name` (`@property` would similarly seem to require one,
|
|
173
148
|
// but is handled by `require-property-name`)
|
|
174
|
-
|
|
175
149
|
if (tagMustHaveNamePosition !== false && !tag.name && !allowEmptyNamepaths && !['param', 'arg', 'argument', 'property', 'prop'].includes(tag.tag) && (tag.tag !== 'see' || !utils.getTagDescription(tag).includes('{@link'))) {
|
|
176
150
|
const modeInfo = tagMustHaveNamePosition === true ? '' : ` in "${mode}" mode`;
|
|
177
151
|
report(`Tag @${tag.tag} must have a name/namepath${modeInfo}.`, null, tag);
|
|
178
152
|
continue;
|
|
179
|
-
}
|
|
180
|
-
|
|
153
|
+
}
|
|
181
154
|
|
|
155
|
+
// REQUIRED TYPE
|
|
182
156
|
const mustHaveTypePosition = utils.tagMustHaveTypePosition(tag.tag, otherModeMaps);
|
|
183
|
-
|
|
184
157
|
if (mustHaveTypePosition !== false && !tag.type) {
|
|
185
158
|
const modeInfo = mustHaveTypePosition === true ? '' : ` in "${mode}" mode`;
|
|
186
159
|
report(`Tag @${tag.tag} must have a type${modeInfo}.`, null, tag);
|
|
187
160
|
continue;
|
|
188
|
-
}
|
|
189
|
-
|
|
161
|
+
}
|
|
190
162
|
|
|
163
|
+
// REQUIRED TYPE OR NAME/NAMEPATH
|
|
191
164
|
const tagMissingRequiredTypeOrNamepath = utils.tagMissingRequiredTypeOrNamepath(tag, otherModeMaps);
|
|
192
|
-
|
|
193
165
|
if (tagMissingRequiredTypeOrNamepath !== false && !allowEmptyNamepaths) {
|
|
194
166
|
const modeInfo = tagMissingRequiredTypeOrNamepath === true ? '' : ` in "${mode}" mode`;
|
|
195
167
|
report(`Tag @${tag.tag} must have either a type or namepath${modeInfo}.`, null, tag);
|
|
196
168
|
continue;
|
|
197
|
-
}
|
|
198
|
-
|
|
169
|
+
}
|
|
199
170
|
|
|
171
|
+
// VALID TYPE
|
|
200
172
|
const hasTypePosition = mightHaveTypePosition === true && Boolean(tag.type);
|
|
201
|
-
|
|
202
173
|
if (hasTypePosition) {
|
|
203
174
|
validTypeParsing(tag.type);
|
|
204
|
-
}
|
|
205
|
-
|
|
175
|
+
}
|
|
206
176
|
|
|
177
|
+
// VALID NAME/NAMEPATH
|
|
207
178
|
const hasNameOrNamepathPosition = (tagMustHaveNamePosition !== false || utils.tagMightHaveNamepath(tag.tag)) && Boolean(tag.name);
|
|
208
|
-
|
|
209
179
|
if (hasNameOrNamepathPosition) {
|
|
210
180
|
if (mode !== 'jsdoc' && tag.tag === 'template') {
|
|
211
181
|
for (const namepath of utils.parseClosureTemplateTag(tag)) {
|
|
@@ -236,7 +206,6 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
236
206
|
type: 'suggestion'
|
|
237
207
|
}
|
|
238
208
|
});
|
|
239
|
-
|
|
240
209
|
exports.default = _default;
|
|
241
210
|
module.exports = exports.default;
|
|
242
211
|
//# sourceMappingURL=validTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validTypes.js","names":["asExpression","suppressTypes","Set","tryParsePathIgnoreError","path","tryParse","iterateJsdoc","jsdoc","report","utils","context","settings","allowEmptyNamepaths","options","mode","tag","tags","validNamepathParsing","namepath","tagName","handled","startsWith","endChar","slice","includes","startChar","charAt","validTypeParsing","type","parse","thisNamepath","getTagDescription","replace","trim","test","thatNamepath","name","parsedTypes","traverse","node","value","undefined","has","otherModeMaps","filter","mde","map","getTagStructureForMode","tagMightHaveNamePosition","modeInfo","mightHaveTypePosition","tagMightHaveTypePosition","tagMustHaveNamePosition","mustHaveTypePosition","tagMustHaveTypePosition","tagMissingRequiredTypeOrNamepath","hasTypePosition","Boolean","hasNameOrNamepathPosition","tagMightHaveNamepath","parseClosureTemplateTag","iterateAllJsdocs","meta","docs","description","url","schema","additionalProperies","properties","default"],"sources":["../../src/rules/validTypes.js"],"sourcesContent":["import {\n tryParse,\n parse,\n traverse,\n} from '@es-joy/jsdoccomment';\nimport iterateJsdoc from '../iterateJsdoc';\n\nconst asExpression = /as\\s+/u;\n\nconst suppressTypes = new Set([\n // https://github.com/google/closure-compiler/wiki/@suppress-annotations\n // https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/ParserConfig.properties#L154\n 'accessControls',\n 'checkDebuggerStatement',\n 'checkPrototypalTypes',\n 'checkRegExp',\n 'checkTypes',\n 'checkVars',\n 'closureDepMethodUsageChecks',\n 'const',\n 'constantProperty',\n 'deprecated',\n 'duplicate',\n 'es5Strict',\n 'externsValidation',\n 'extraProvide',\n 'extraRequire',\n 'globalThis',\n 'invalidCasts',\n 'lateProvide',\n 'legacyGoogScopeRequire',\n 'lintChecks',\n 'messageConventions',\n 'misplacedTypeAnnotation',\n 'missingOverride',\n 'missingPolyfill',\n 'missingProperties',\n 'missingProvide',\n 'missingRequire',\n 'missingSourcesWarnings',\n 'moduleLoad',\n 'nonStandardJsDocs',\n 'partialAlias',\n 'polymer',\n 'reportUnknownTypes',\n 'strictMissingProperties',\n 'strictModuleDepCheck',\n 'strictPrimitiveOperators',\n 'suspiciousCode',\n\n // Not documented in enum\n 'switch',\n 'transitionalSuspiciousCodeWarnings',\n 'undefinedNames',\n 'undefinedVars',\n 'underscore',\n 'unknownDefines',\n 'untranspilableFeatures',\n 'unusedLocalVariables',\n 'unusedPrivateMembers',\n 'useOfGoogProvide',\n 'uselessCode',\n 'visibility',\n 'with',\n]);\n\nconst tryParsePathIgnoreError = (path) => {\n try {\n tryParse(path);\n\n return true;\n } catch {\n // Keep the original error for including the whole type\n }\n\n return false;\n};\n\n// eslint-disable-next-line complexity\nexport default iterateJsdoc(({\n jsdoc,\n report,\n utils,\n context,\n settings,\n}) => {\n const {\n allowEmptyNamepaths = false,\n } = context.options[0] || {};\n const {\n mode,\n } = settings;\n\n for (const tag of jsdoc.tags) {\n const validNamepathParsing = function (namepath, tagName) {\n if (tryParsePathIgnoreError(namepath)) {\n return true;\n }\n\n let handled = false;\n\n if (tagName) {\n // eslint-disable-next-line default-case\n switch (tagName) {\n case 'requires':\n case 'module': {\n if (!namepath.startsWith('module:')) {\n handled = tryParsePathIgnoreError(`module:${namepath}`);\n }\n\n break;\n }\n\n case 'memberof': case 'memberof!': {\n const endChar = namepath.slice(-1);\n if ([\n '#', '.', '~',\n ].includes(endChar)) {\n handled = tryParsePathIgnoreError(namepath.slice(0, -1));\n }\n\n break;\n }\n\n case 'borrows': {\n const startChar = namepath.charAt();\n if ([\n '#', '.', '~',\n ].includes(startChar)) {\n handled = tryParsePathIgnoreError(namepath.slice(1));\n }\n }\n }\n }\n\n if (!handled) {\n report(`Syntax error in namepath: ${namepath}`, null, tag);\n\n return false;\n }\n\n return true;\n };\n\n const validTypeParsing = function (type) {\n try {\n if (mode === 'permissive') {\n tryParse(type);\n } else {\n parse(type, mode);\n }\n } catch {\n report(`Syntax error in type: ${type}`, null, tag);\n\n return false;\n }\n\n return true;\n };\n\n if (tag.tag === 'borrows') {\n const thisNamepath = utils.getTagDescription(tag).replace(asExpression, '')\n .trim();\n\n if (!asExpression.test(utils.getTagDescription(tag)) || !thisNamepath) {\n report(`@borrows must have an \"as\" expression. Found \"${utils.getTagDescription(tag)}\"`, null, tag);\n\n continue;\n }\n\n if (validNamepathParsing(thisNamepath, 'borrows')) {\n const thatNamepath = tag.name;\n\n validNamepathParsing(thatNamepath);\n }\n\n continue;\n }\n\n if (tag.tag === 'suppress' && mode === 'closure') {\n let parsedTypes;\n\n try {\n parsedTypes = tryParse(tag.type);\n } catch {\n // Ignore\n }\n\n if (parsedTypes) {\n traverse(parsedTypes, (node) => {\n const {\n value: type,\n } = node;\n if (type !== undefined && !suppressTypes.has(type)) {\n report(`Syntax error in supresss type: ${type}`, null, tag);\n }\n });\n }\n }\n\n const otherModeMaps = [\n 'jsdoc', 'typescript', 'closure', 'permissive',\n ].filter(\n (mde) => {\n return mde !== mode;\n },\n ).map((mde) => {\n return utils.getTagStructureForMode(mde);\n });\n\n const tagMightHaveNamePosition = utils.tagMightHaveNamePosition(tag.tag, otherModeMaps);\n if (tagMightHaveNamePosition !== true && tag.name) {\n const modeInfo = tagMightHaveNamePosition === false ? '' : ` in \"${mode}\" mode`;\n report(`@${tag.tag} should not have a name${modeInfo}.`, null, tag);\n\n continue;\n }\n\n const mightHaveTypePosition = utils.tagMightHaveTypePosition(tag.tag, otherModeMaps);\n if (mightHaveTypePosition !== true && tag.type) {\n const modeInfo = mightHaveTypePosition === false ? '' : ` in \"${mode}\" mode`;\n report(`@${tag.tag} should not have a bracketed type${modeInfo}.`, null, tag);\n\n continue;\n }\n\n // REQUIRED NAME\n const tagMustHaveNamePosition = utils.tagMustHaveNamePosition(tag.tag, otherModeMaps);\n\n // Don't handle `@param` here though it does require name as handled by\n // `require-param-name` (`@property` would similarly seem to require one,\n // but is handled by `require-property-name`)\n if (tagMustHaveNamePosition !== false && !tag.name && !allowEmptyNamepaths && ![\n 'param', 'arg', 'argument',\n 'property', 'prop',\n ].includes(tag.tag) &&\n (tag.tag !== 'see' || !utils.getTagDescription(tag).includes('{@link'))\n ) {\n const modeInfo = tagMustHaveNamePosition === true ? '' : ` in \"${mode}\" mode`;\n report(`Tag @${tag.tag} must have a name/namepath${modeInfo}.`, null, tag);\n\n continue;\n }\n\n // REQUIRED TYPE\n const mustHaveTypePosition = utils.tagMustHaveTypePosition(tag.tag, otherModeMaps);\n if (mustHaveTypePosition !== false && !tag.type) {\n const modeInfo = mustHaveTypePosition === true ? '' : ` in \"${mode}\" mode`;\n report(`Tag @${tag.tag} must have a type${modeInfo}.`, null, tag);\n\n continue;\n }\n\n // REQUIRED TYPE OR NAME/NAMEPATH\n const tagMissingRequiredTypeOrNamepath = utils.tagMissingRequiredTypeOrNamepath(tag, otherModeMaps);\n if (tagMissingRequiredTypeOrNamepath !== false && !allowEmptyNamepaths) {\n const modeInfo = tagMissingRequiredTypeOrNamepath === true ? '' : ` in \"${mode}\" mode`;\n report(`Tag @${tag.tag} must have either a type or namepath${modeInfo}.`, null, tag);\n\n continue;\n }\n\n // VALID TYPE\n const hasTypePosition = mightHaveTypePosition === true && Boolean(tag.type);\n if (hasTypePosition) {\n validTypeParsing(tag.type);\n }\n\n // VALID NAME/NAMEPATH\n const hasNameOrNamepathPosition = (\n tagMustHaveNamePosition !== false ||\n utils.tagMightHaveNamepath(tag.tag)\n ) && Boolean(tag.name);\n\n if (hasNameOrNamepathPosition) {\n if (mode !== 'jsdoc' && tag.tag === 'template') {\n for (const namepath of utils.parseClosureTemplateTag(tag)) {\n validNamepathParsing(namepath);\n }\n } else {\n validNamepathParsing(tag.name, tag.tag);\n }\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires all types to be valid JSDoc or Closure compiler types without syntax errors.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-valid-types',\n },\n schema: [\n {\n additionalProperies: false,\n properties: {\n allowEmptyNamepaths: {\n default: false,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;;AAAA;;AAKA;;;;AAEA,MAAMA,YAAY,GAAG,QAArB;AAEA,MAAMC,aAAa,GAAG,IAAIC,GAAJ,CAAQ,CAC5B;AACA;AACA,gBAH4B,EAI5B,wBAJ4B,EAK5B,sBAL4B,EAM5B,aAN4B,EAO5B,YAP4B,EAQ5B,WAR4B,EAS5B,6BAT4B,EAU5B,OAV4B,EAW5B,kBAX4B,EAY5B,YAZ4B,EAa5B,WAb4B,EAc5B,WAd4B,EAe5B,mBAf4B,EAgB5B,cAhB4B,EAiB5B,cAjB4B,EAkB5B,YAlB4B,EAmB5B,cAnB4B,EAoB5B,aApB4B,EAqB5B,wBArB4B,EAsB5B,YAtB4B,EAuB5B,oBAvB4B,EAwB5B,yBAxB4B,EAyB5B,iBAzB4B,EA0B5B,iBA1B4B,EA2B5B,mBA3B4B,EA4B5B,gBA5B4B,EA6B5B,gBA7B4B,EA8B5B,wBA9B4B,EA+B5B,YA/B4B,EAgC5B,mBAhC4B,EAiC5B,cAjC4B,EAkC5B,SAlC4B,EAmC5B,oBAnC4B,EAoC5B,yBApC4B,EAqC5B,sBArC4B,EA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2B,CA+K5B;;;IACA,MAAM8B,yBAAyB,GAAG,CAChCN,uBAAuB,KAAK,KAA5B,IACA3C,KAAK,CAACkD,oBAAN,CAA2B5C,GAAG,CAACA,GAA/B,CAFgC,KAG7B0C,OAAO,CAAC1C,GAAG,CAACqB,IAAL,CAHZ;;IAKA,IAAIsB,yBAAJ,EAA+B;MAC7B,IAAI5C,IAAI,KAAK,OAAT,IAAoBC,GAAG,CAACA,GAAJ,KAAY,UAApC,EAAgD;QAC9C,KAAK,MAAMG,QAAX,IAAuBT,KAAK,CAACmD,uBAAN,CAA8B7C,GAA9B,CAAvB,EAA2D;UACzDE,oBAAoB,CAACC,QAAD,CAApB;QACD;MACF,CAJD,MAIO;QACLD,oBAAoB,CAACF,GAAG,CAACqB,IAAL,EAAWrB,GAAG,CAACA,GAAf,CAApB;MACD;IACF;EACF;AACF,CA7Mc,EA6MZ;EACD8C,gBAAgB,EAAE,IADjB;EAEDC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,uFADT;MAEJC,GAAG,EAAE;IAFD,CADF;IAKJC,MAAM,EAAE,CACN;MACEC,mBAAmB,EAAE,KADvB;MAEEC,UAAU,EAAE;QACVxD,mBAAmB,EAAE;UACnByD,OAAO,EAAE,KADU;UAEnBzC,IAAI,EAAE;QAFa;MADX,CAFd;MAQEA,IAAI,EAAE;IARR,CADM,CALJ;IAiBJA,IAAI,EAAE;EAjBF;AAFL,CA7MY,C"}
|
|
1
|
+
{"version":3,"file":"validTypes.js","names":["asExpression","suppressTypes","Set","tryParsePathIgnoreError","path","tryParse","iterateJsdoc","jsdoc","report","utils","context","settings","allowEmptyNamepaths","options","mode","tag","tags","validNamepathParsing","namepath","tagName","handled","startsWith","endChar","slice","includes","startChar","charAt","validTypeParsing","type","parse","thisNamepath","getTagDescription","replace","trim","test","thatNamepath","name","parsedTypes","traverse","node","value","undefined","has","otherModeMaps","filter","mde","map","getTagStructureForMode","tagMightHaveNamePosition","modeInfo","mightHaveTypePosition","tagMightHaveTypePosition","tagMustHaveNamePosition","mustHaveTypePosition","tagMustHaveTypePosition","tagMissingRequiredTypeOrNamepath","hasTypePosition","Boolean","hasNameOrNamepathPosition","tagMightHaveNamepath","parseClosureTemplateTag","iterateAllJsdocs","meta","docs","description","url","schema","additionalProperies","properties","default"],"sources":["../../src/rules/validTypes.js"],"sourcesContent":["import {\n tryParse,\n parse,\n traverse,\n} from '@es-joy/jsdoccomment';\nimport iterateJsdoc from '../iterateJsdoc';\n\nconst asExpression = /as\\s+/u;\n\nconst suppressTypes = new Set([\n // https://github.com/google/closure-compiler/wiki/@suppress-annotations\n // https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/ParserConfig.properties#L154\n 'accessControls',\n 'checkDebuggerStatement',\n 'checkPrototypalTypes',\n 'checkRegExp',\n 'checkTypes',\n 'checkVars',\n 'closureDepMethodUsageChecks',\n 'const',\n 'constantProperty',\n 'deprecated',\n 'duplicate',\n 'es5Strict',\n 'externsValidation',\n 'extraProvide',\n 'extraRequire',\n 'globalThis',\n 'invalidCasts',\n 'lateProvide',\n 'legacyGoogScopeRequire',\n 'lintChecks',\n 'messageConventions',\n 'misplacedTypeAnnotation',\n 'missingOverride',\n 'missingPolyfill',\n 'missingProperties',\n 'missingProvide',\n 'missingRequire',\n 'missingSourcesWarnings',\n 'moduleLoad',\n 'nonStandardJsDocs',\n 'partialAlias',\n 'polymer',\n 'reportUnknownTypes',\n 'strictMissingProperties',\n 'strictModuleDepCheck',\n 'strictPrimitiveOperators',\n 'suspiciousCode',\n\n // Not documented in enum\n 'switch',\n 'transitionalSuspiciousCodeWarnings',\n 'undefinedNames',\n 'undefinedVars',\n 'underscore',\n 'unknownDefines',\n 'untranspilableFeatures',\n 'unusedLocalVariables',\n 'unusedPrivateMembers',\n 'useOfGoogProvide',\n 'uselessCode',\n 'visibility',\n 'with',\n]);\n\nconst tryParsePathIgnoreError = (path) => {\n try {\n tryParse(path);\n\n return true;\n } catch {\n // Keep the original error for including the whole type\n }\n\n return false;\n};\n\n// eslint-disable-next-line complexity\nexport default iterateJsdoc(({\n jsdoc,\n report,\n utils,\n context,\n settings,\n}) => {\n const {\n allowEmptyNamepaths = false,\n } = context.options[0] || {};\n const {\n mode,\n } = settings;\n\n for (const tag of jsdoc.tags) {\n const validNamepathParsing = function (namepath, tagName) {\n if (tryParsePathIgnoreError(namepath)) {\n return true;\n }\n\n let handled = false;\n\n if (tagName) {\n // eslint-disable-next-line default-case\n switch (tagName) {\n case 'requires':\n case 'module': {\n if (!namepath.startsWith('module:')) {\n handled = tryParsePathIgnoreError(`module:${namepath}`);\n }\n\n break;\n }\n\n case 'memberof': case 'memberof!': {\n const endChar = namepath.slice(-1);\n if ([\n '#', '.', '~',\n ].includes(endChar)) {\n handled = tryParsePathIgnoreError(namepath.slice(0, -1));\n }\n\n break;\n }\n\n case 'borrows': {\n const startChar = namepath.charAt();\n if ([\n '#', '.', '~',\n ].includes(startChar)) {\n handled = tryParsePathIgnoreError(namepath.slice(1));\n }\n }\n }\n }\n\n if (!handled) {\n report(`Syntax error in namepath: ${namepath}`, null, tag);\n\n return false;\n }\n\n return true;\n };\n\n const validTypeParsing = function (type) {\n try {\n if (mode === 'permissive') {\n tryParse(type);\n } else {\n parse(type, mode);\n }\n } catch {\n report(`Syntax error in type: ${type}`, null, tag);\n\n return false;\n }\n\n return true;\n };\n\n if (tag.tag === 'borrows') {\n const thisNamepath = utils.getTagDescription(tag).replace(asExpression, '')\n .trim();\n\n if (!asExpression.test(utils.getTagDescription(tag)) || !thisNamepath) {\n report(`@borrows must have an \"as\" expression. Found \"${utils.getTagDescription(tag)}\"`, null, tag);\n\n continue;\n }\n\n if (validNamepathParsing(thisNamepath, 'borrows')) {\n const thatNamepath = tag.name;\n\n validNamepathParsing(thatNamepath);\n }\n\n continue;\n }\n\n if (tag.tag === 'suppress' && mode === 'closure') {\n let parsedTypes;\n\n try {\n parsedTypes = tryParse(tag.type);\n } catch {\n // Ignore\n }\n\n if (parsedTypes) {\n traverse(parsedTypes, (node) => {\n const {\n value: type,\n } = node;\n if (type !== undefined && !suppressTypes.has(type)) {\n report(`Syntax error in supresss type: ${type}`, null, tag);\n }\n });\n }\n }\n\n const otherModeMaps = [\n 'jsdoc', 'typescript', 'closure', 'permissive',\n ].filter(\n (mde) => {\n return mde !== mode;\n },\n ).map((mde) => {\n return utils.getTagStructureForMode(mde);\n });\n\n const tagMightHaveNamePosition = utils.tagMightHaveNamePosition(tag.tag, otherModeMaps);\n if (tagMightHaveNamePosition !== true && tag.name) {\n const modeInfo = tagMightHaveNamePosition === false ? '' : ` in \"${mode}\" mode`;\n report(`@${tag.tag} should not have a name${modeInfo}.`, null, tag);\n\n continue;\n }\n\n const mightHaveTypePosition = utils.tagMightHaveTypePosition(tag.tag, otherModeMaps);\n if (mightHaveTypePosition !== true && tag.type) {\n const modeInfo = mightHaveTypePosition === false ? '' : ` in \"${mode}\" mode`;\n report(`@${tag.tag} should not have a bracketed type${modeInfo}.`, null, tag);\n\n continue;\n }\n\n // REQUIRED NAME\n const tagMustHaveNamePosition = utils.tagMustHaveNamePosition(tag.tag, otherModeMaps);\n\n // Don't handle `@param` here though it does require name as handled by\n // `require-param-name` (`@property` would similarly seem to require one,\n // but is handled by `require-property-name`)\n if (tagMustHaveNamePosition !== false && !tag.name && !allowEmptyNamepaths && ![\n 'param', 'arg', 'argument',\n 'property', 'prop',\n ].includes(tag.tag) &&\n (tag.tag !== 'see' || !utils.getTagDescription(tag).includes('{@link'))\n ) {\n const modeInfo = tagMustHaveNamePosition === true ? '' : ` in \"${mode}\" mode`;\n report(`Tag @${tag.tag} must have a name/namepath${modeInfo}.`, null, tag);\n\n continue;\n }\n\n // REQUIRED TYPE\n const mustHaveTypePosition = utils.tagMustHaveTypePosition(tag.tag, otherModeMaps);\n if (mustHaveTypePosition !== false && !tag.type) {\n const modeInfo = mustHaveTypePosition === true ? '' : ` in \"${mode}\" mode`;\n report(`Tag @${tag.tag} must have a type${modeInfo}.`, null, tag);\n\n continue;\n }\n\n // REQUIRED TYPE OR NAME/NAMEPATH\n const tagMissingRequiredTypeOrNamepath = utils.tagMissingRequiredTypeOrNamepath(tag, otherModeMaps);\n if (tagMissingRequiredTypeOrNamepath !== false && !allowEmptyNamepaths) {\n const modeInfo = tagMissingRequiredTypeOrNamepath === true ? '' : ` in \"${mode}\" mode`;\n report(`Tag @${tag.tag} must have either a type or namepath${modeInfo}.`, null, tag);\n\n continue;\n }\n\n // VALID TYPE\n const hasTypePosition = mightHaveTypePosition === true && Boolean(tag.type);\n if (hasTypePosition) {\n validTypeParsing(tag.type);\n }\n\n // VALID NAME/NAMEPATH\n const hasNameOrNamepathPosition = (\n tagMustHaveNamePosition !== false ||\n utils.tagMightHaveNamepath(tag.tag)\n ) && Boolean(tag.name);\n\n if (hasNameOrNamepathPosition) {\n if (mode !== 'jsdoc' && tag.tag === 'template') {\n for (const namepath of utils.parseClosureTemplateTag(tag)) {\n validNamepathParsing(namepath);\n }\n } else {\n validNamepathParsing(tag.name, tag.tag);\n }\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires all types to be valid JSDoc or Closure compiler types without syntax errors.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-valid-types',\n },\n schema: [\n {\n additionalProperies: false,\n properties: {\n allowEmptyNamepaths: {\n default: false,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AAKA;AAA2C;AAE3C,MAAMA,YAAY,GAAG,QAAQ;AAE7B,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAAC;AAC5B;AACA;AACA,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,6BAA6B,EAC7B,OAAO,EACP,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,YAA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,MAAM8B,yBAAyB,GAAG,CAChCN,uBAAuB,KAAK,KAAK,IACjC3C,KAAK,CAACkD,oBAAoB,CAAC5C,GAAG,CAACA,GAAG,CAAC,KAChC0C,OAAO,CAAC1C,GAAG,CAACqB,IAAI,CAAC;IAEtB,IAAIsB,yBAAyB,EAAE;MAC7B,IAAI5C,IAAI,KAAK,OAAO,IAAIC,GAAG,CAACA,GAAG,KAAK,UAAU,EAAE;QAC9C,KAAK,MAAMG,QAAQ,IAAIT,KAAK,CAACmD,uBAAuB,CAAC7C,GAAG,CAAC,EAAE;UACzDE,oBAAoB,CAACC,QAAQ,CAAC;QAChC;MACF,CAAC,MAAM;QACLD,oBAAoB,CAACF,GAAG,CAACqB,IAAI,EAAErB,GAAG,CAACA,GAAG,CAAC;MACzC;IACF;EACF;AACF,CAAC,EAAE;EACD8C,gBAAgB,EAAE,IAAI;EACtBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,uFAAuF;MACpGC,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,mBAAmB,EAAE,KAAK;MAC1BC,UAAU,EAAE;QACVxD,mBAAmB,EAAE;UACnByD,OAAO,EAAE,KAAK;UACdzC,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA;AAAA"}
|
package/dist/tagNames.js
CHANGED
|
@@ -10,7 +10,8 @@ const jsdocTagsUndocumented = {
|
|
|
10
10
|
// https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js#L594
|
|
11
11
|
modifies: []
|
|
12
12
|
};
|
|
13
|
-
const jsdocTags = {
|
|
13
|
+
const jsdocTags = {
|
|
14
|
+
...jsdocTagsUndocumented,
|
|
14
15
|
abstract: ['virtual'],
|
|
15
16
|
access: [],
|
|
16
17
|
alias: [],
|
|
@@ -83,7 +84,8 @@ const jsdocTags = { ...jsdocTagsUndocumented,
|
|
|
83
84
|
yields: ['yield']
|
|
84
85
|
};
|
|
85
86
|
exports.jsdocTags = jsdocTags;
|
|
86
|
-
const typeScriptTags = {
|
|
87
|
+
const typeScriptTags = {
|
|
88
|
+
...jsdocTags,
|
|
87
89
|
// https://www.typescriptlang.org/tsconfig/#stripInternal
|
|
88
90
|
internal: [],
|
|
89
91
|
// `@template` is also in TypeScript per:
|
|
@@ -113,15 +115,16 @@ const {
|
|
|
113
115
|
internal,
|
|
114
116
|
// Will be inverted to prefer `return`
|
|
115
117
|
returns,
|
|
116
|
-
|
|
117
118
|
/* eslint-enable no-unused-vars */
|
|
118
119
|
...typeScriptTagsInClosure
|
|
119
120
|
} = typeScriptTags;
|
|
120
|
-
const closureTags = {
|
|
121
|
+
const closureTags = {
|
|
122
|
+
...typeScriptTagsInClosure,
|
|
121
123
|
...undocumentedClosureTags,
|
|
122
124
|
// From https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler
|
|
123
125
|
// These are all recognized in https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js
|
|
124
126
|
// except for the experimental `noinline` and the casing differences noted below
|
|
127
|
+
|
|
125
128
|
// Defined as a synonym of `const` in jsdoc `definitions.js`
|
|
126
129
|
define: [],
|
|
127
130
|
dict: [],
|
package/dist/tagNames.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagNames.js","names":["jsdocTagsUndocumented","modifies","jsdocTags","abstract","access","alias","async","augments","author","borrows","callback","class","classdesc","constant","constructs","copyright","default","deprecated","description","enum","event","example","exports","external","file","fires","function","generator","global","hideconstructor","ignore","implements","inheritdoc","inheritDoc","inner","instance","interface","kind","lends","license","listens","member","memberof","mixes","mixin","module","name","namespace","override","package","param","private","property","protected","public","readonly","requires","returns","see","since","static","summary","this","throws","todo","tutorial","type","typedef","variation","version","yields","typeScriptTags","internal","template","undocumentedClosureTags","closurePrimitive","customElement","expose","hidden","idGenerator","meaning","mixinClass","mixinFunction","ngInject","owner","typeSummary","wizaction","typeScriptTagsInClosure","closureTags","define","dict","export","externs","final","implicitCast","noalias","nocollapse","nocompile","noinline","nosideeffects","polymer","polymerBehavior","preserve","record","return","struct","suppress","unrestricted"],"sources":["../src/tagNames.js"],"sourcesContent":["const jsdocTagsUndocumented = {\n // Undocumented but present; see\n // https://github.com/jsdoc/jsdoc/issues/1283#issuecomment-516816802\n // https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js#L594\n modifies: [],\n};\n\nconst jsdocTags = {\n ...jsdocTagsUndocumented,\n abstract: [\n 'virtual',\n ],\n access: [],\n alias: [],\n async: [],\n augments: [\n 'extends',\n ],\n author: [],\n borrows: [],\n callback: [],\n class: [\n 'constructor',\n ],\n classdesc: [],\n constant: [\n 'const',\n ],\n constructs: [],\n copyright: [],\n default: [\n 'defaultvalue',\n ],\n deprecated: [],\n description: [\n 'desc',\n ],\n enum: [],\n event: [],\n example: [],\n exports: [],\n external: [\n 'host',\n ],\n file: [\n 'fileoverview',\n 'overview',\n ],\n fires: [\n 'emits',\n ],\n function: [\n 'func',\n 'method',\n ],\n generator: [],\n global: [],\n hideconstructor: [],\n ignore: [],\n implements: [],\n inheritdoc: [],\n\n // Allowing casing distinct from jsdoc `definitions.js` (required in Closure)\n inheritDoc: [],\n\n inner: [],\n instance: [],\n interface: [],\n kind: [],\n lends: [],\n license: [],\n listens: [],\n member: [\n 'var',\n ],\n memberof: [],\n 'memberof!': [],\n mixes: [],\n mixin: [],\n\n module: [],\n name: [],\n namespace: [],\n override: [],\n package: [],\n param: [\n 'arg',\n 'argument',\n ],\n private: [],\n property: [\n 'prop',\n ],\n protected: [],\n public: [],\n readonly: [],\n requires: [],\n returns: [\n 'return',\n ],\n see: [],\n since: [],\n static: [],\n summary: [],\n\n this: [],\n throws: [\n 'exception',\n ],\n todo: [],\n tutorial: [],\n type: [],\n typedef: [],\n variation: [],\n version: [],\n yields: [\n 'yield',\n ],\n};\n\nconst typeScriptTags = {\n ...jsdocTags,\n\n // https://www.typescriptlang.org/tsconfig/#stripInternal\n internal: [],\n\n // `@template` is also in TypeScript per:\n // https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc\n template: [],\n};\n\nconst undocumentedClosureTags = {\n // These are in Closure source but not in jsdoc source nor in the Closure\n // docs: https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/Annotation.java\n closurePrimitive: [],\n customElement: [],\n expose: [],\n hidden: [],\n idGenerator: [],\n meaning: [],\n mixinClass: [],\n mixinFunction: [],\n ngInject: [],\n owner: [],\n typeSummary: [],\n wizaction: [],\n};\n\nconst {\n /* eslint-disable no-unused-vars */\n inheritdoc,\n internal,\n\n // Will be inverted to prefer `return`\n returns,\n /* eslint-enable no-unused-vars */\n ...typeScriptTagsInClosure\n} = typeScriptTags;\n\nconst closureTags = {\n ...typeScriptTagsInClosure,\n ...undocumentedClosureTags,\n\n // From https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler\n // These are all recognized in https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js\n // except for the experimental `noinline` and the casing differences noted below\n\n // Defined as a synonym of `const` in jsdoc `definitions.js`\n define: [],\n\n dict: [],\n export: [],\n externs: [],\n final: [],\n\n // With casing distinct from jsdoc `definitions.js`\n implicitCast: [],\n\n noalias: [],\n nocollapse: [],\n nocompile: [],\n noinline: [],\n nosideeffects: [],\n polymer: [],\n polymerBehavior: [],\n preserve: [],\n\n // Defined as a synonym of `interface` in jsdoc `definitions.js`\n record: [],\n\n return: [\n 'returns',\n ],\n\n struct: [],\n suppress: [],\n\n unrestricted: [],\n};\n\nexport {\n jsdocTags,\n closureTags,\n typeScriptTags,\n};\n"],"mappings":";;;;;;AAAA,MAAMA,qBAAqB,GAAG;EAC5B;EACA;EACA;EACAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"tagNames.js","names":["jsdocTagsUndocumented","modifies","jsdocTags","abstract","access","alias","async","augments","author","borrows","callback","class","classdesc","constant","constructs","copyright","default","deprecated","description","enum","event","example","exports","external","file","fires","function","generator","global","hideconstructor","ignore","implements","inheritdoc","inheritDoc","inner","instance","interface","kind","lends","license","listens","member","memberof","mixes","mixin","module","name","namespace","override","package","param","private","property","protected","public","readonly","requires","returns","see","since","static","summary","this","throws","todo","tutorial","type","typedef","variation","version","yields","typeScriptTags","internal","template","undocumentedClosureTags","closurePrimitive","customElement","expose","hidden","idGenerator","meaning","mixinClass","mixinFunction","ngInject","owner","typeSummary","wizaction","typeScriptTagsInClosure","closureTags","define","dict","export","externs","final","implicitCast","noalias","nocollapse","nocompile","noinline","nosideeffects","polymer","polymerBehavior","preserve","record","return","struct","suppress","unrestricted"],"sources":["../src/tagNames.js"],"sourcesContent":["const jsdocTagsUndocumented = {\n // Undocumented but present; see\n // https://github.com/jsdoc/jsdoc/issues/1283#issuecomment-516816802\n // https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js#L594\n modifies: [],\n};\n\nconst jsdocTags = {\n ...jsdocTagsUndocumented,\n abstract: [\n 'virtual',\n ],\n access: [],\n alias: [],\n async: [],\n augments: [\n 'extends',\n ],\n author: [],\n borrows: [],\n callback: [],\n class: [\n 'constructor',\n ],\n classdesc: [],\n constant: [\n 'const',\n ],\n constructs: [],\n copyright: [],\n default: [\n 'defaultvalue',\n ],\n deprecated: [],\n description: [\n 'desc',\n ],\n enum: [],\n event: [],\n example: [],\n exports: [],\n external: [\n 'host',\n ],\n file: [\n 'fileoverview',\n 'overview',\n ],\n fires: [\n 'emits',\n ],\n function: [\n 'func',\n 'method',\n ],\n generator: [],\n global: [],\n hideconstructor: [],\n ignore: [],\n implements: [],\n inheritdoc: [],\n\n // Allowing casing distinct from jsdoc `definitions.js` (required in Closure)\n inheritDoc: [],\n\n inner: [],\n instance: [],\n interface: [],\n kind: [],\n lends: [],\n license: [],\n listens: [],\n member: [\n 'var',\n ],\n memberof: [],\n 'memberof!': [],\n mixes: [],\n mixin: [],\n\n module: [],\n name: [],\n namespace: [],\n override: [],\n package: [],\n param: [\n 'arg',\n 'argument',\n ],\n private: [],\n property: [\n 'prop',\n ],\n protected: [],\n public: [],\n readonly: [],\n requires: [],\n returns: [\n 'return',\n ],\n see: [],\n since: [],\n static: [],\n summary: [],\n\n this: [],\n throws: [\n 'exception',\n ],\n todo: [],\n tutorial: [],\n type: [],\n typedef: [],\n variation: [],\n version: [],\n yields: [\n 'yield',\n ],\n};\n\nconst typeScriptTags = {\n ...jsdocTags,\n\n // https://www.typescriptlang.org/tsconfig/#stripInternal\n internal: [],\n\n // `@template` is also in TypeScript per:\n // https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html#supported-jsdoc\n template: [],\n};\n\nconst undocumentedClosureTags = {\n // These are in Closure source but not in jsdoc source nor in the Closure\n // docs: https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/Annotation.java\n closurePrimitive: [],\n customElement: [],\n expose: [],\n hidden: [],\n idGenerator: [],\n meaning: [],\n mixinClass: [],\n mixinFunction: [],\n ngInject: [],\n owner: [],\n typeSummary: [],\n wizaction: [],\n};\n\nconst {\n /* eslint-disable no-unused-vars */\n inheritdoc,\n internal,\n\n // Will be inverted to prefer `return`\n returns,\n /* eslint-enable no-unused-vars */\n ...typeScriptTagsInClosure\n} = typeScriptTags;\n\nconst closureTags = {\n ...typeScriptTagsInClosure,\n ...undocumentedClosureTags,\n\n // From https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler\n // These are all recognized in https://github.com/jsdoc/jsdoc/blob/master/packages/jsdoc/lib/jsdoc/tag/dictionary/definitions.js\n // except for the experimental `noinline` and the casing differences noted below\n\n // Defined as a synonym of `const` in jsdoc `definitions.js`\n define: [],\n\n dict: [],\n export: [],\n externs: [],\n final: [],\n\n // With casing distinct from jsdoc `definitions.js`\n implicitCast: [],\n\n noalias: [],\n nocollapse: [],\n nocompile: [],\n noinline: [],\n nosideeffects: [],\n polymer: [],\n polymerBehavior: [],\n preserve: [],\n\n // Defined as a synonym of `interface` in jsdoc `definitions.js`\n record: [],\n\n return: [\n 'returns',\n ],\n\n struct: [],\n suppress: [],\n\n unrestricted: [],\n};\n\nexport {\n jsdocTags,\n closureTags,\n typeScriptTags,\n};\n"],"mappings":";;;;;;AAAA,MAAMA,qBAAqB,GAAG;EAC5B;EACA;EACA;EACAC,QAAQ,EAAE;AACZ,CAAC;AAED,MAAMC,SAAS,GAAG;EAChB,GAAGF,qBAAqB;EACxBG,QAAQ,EAAE,CACR,SAAS,CACV;EACDC,MAAM,EAAE,EAAE;EACVC,KAAK,EAAE,EAAE;EACTC,KAAK,EAAE,EAAE;EACTC,QAAQ,EAAE,CACR,SAAS,CACV;EACDC,MAAM,EAAE,EAAE;EACVC,OAAO,EAAE,EAAE;EACXC,QAAQ,EAAE,EAAE;EACZC,KAAK,EAAE,CACL,aAAa,CACd;EACDC,SAAS,EAAE,EAAE;EACbC,QAAQ,EAAE,CACR,OAAO,CACR;EACDC,UAAU,EAAE,EAAE;EACdC,SAAS,EAAE,EAAE;EACbC,OAAO,EAAE,CACP,cAAc,CACf;EACDC,UAAU,EAAE,EAAE;EACdC,WAAW,EAAE,CACX,MAAM,CACP;EACDC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE,EAAE;EACTC,OAAO,EAAE,EAAE;EACXC,OAAO,EAAE,EAAE;EACXC,QAAQ,EAAE,CACR,MAAM,CACP;EACDC,IAAI,EAAE,CACJ,cAAc,EACd,UAAU,CACX;EACDC,KAAK,EAAE,CACL,OAAO,CACR;EACDC,QAAQ,EAAE,CACR,MAAM,EACN,QAAQ,CACT;EACDC,SAAS,EAAE,EAAE;EACbC,MAAM,EAAE,EAAE;EACVC,eAAe,EAAE,EAAE;EACnBC,MAAM,EAAE,EAAE;EACVC,UAAU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