eslint-plugin-jsdoc 45.0.0 → 46.1.0
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 +6 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/iterateJsdoc.js +35 -7
- package/dist/iterateJsdoc.js.map +1 -1
- package/dist/rules/noMissingSyntax.js +5 -12
- package/dist/rules/noMissingSyntax.js.map +1 -1
- package/dist/rules/noRestrictedSyntax.js +7 -18
- package/dist/rules/noRestrictedSyntax.js.map +1 -1
- package/dist/rules/requireReturns.js +19 -1
- package/dist/rules/requireReturns.js.map +1 -1
- package/docs/rules/check-examples.md +1 -1
- package/docs/rules/check-indentation.md +1 -1
- package/docs/rules/check-line-alignment.md +1 -1
- package/docs/rules/check-param-names.md +1 -1
- package/docs/rules/check-types.md +1 -1
- package/docs/rules/check-values.md +1 -1
- package/docs/rules/match-description.md +1 -1
- package/docs/rules/multiline-blocks.md +1 -1
- package/docs/rules/no-multi-asterisks.md +1 -1
- package/docs/rules/no-undefined-types.md +1 -1
- package/docs/rules/require-asterisk-prefix.md +1 -1
- package/docs/rules/require-description-complete-sentence.md +1 -1
- package/docs/rules/require-description.md +1 -1
- package/docs/rules/require-example.md +1 -1
- package/docs/rules/require-hyphen-before-param-description.md +1 -1
- package/docs/rules/require-param-description.md +1 -1
- package/docs/rules/require-param-type.md +1 -1
- package/docs/rules/require-param.md +1 -1
- package/docs/rules/require-returns-check.md +1 -1
- package/docs/rules/require-returns.md +28 -1
- package/docs/rules/require-throws.md +1 -1
- package/docs/rules/require-yields-check.md +1 -1
- package/docs/rules/require-yields.md +1 -1
- package/docs/rules/sort-tags.md +1 -1
- package/docs/rules/tag-lines.md +1 -1
- package/docs/rules/text-escaping.md +1 -1
- package/package.json +5 -2
- package/dist/bin/generateRule.js +0 -237
- package/dist/bin/generateRule.js.map +0 -1
- package/dist/bin/gitdown.d.ts +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noMissingSyntax.js","names":["_iterateJsdoc","_interopRequireDefault","require","_esquery","obj","__esModule","default","setDefaults","state","selectorMap","incrementSelector","selector","comment","_default","iterateJsdoc","context","node","info","sourceCode","options","contexts","foundContext","find","cntxt","esquery","matches","parse","undefined","visitorKeys","contextStr","String","contextSelected","exit","settings","length","report","loc","end","column","line","start","message","some","contextKey","minimum","Object","values","every","cmmnt","data","matchContext","meta","docs","description","url","fixable","schema","additionalProperties","properties","items","anyOf","type","exports","module"],"sources":["../../src/rules/noMissingSyntax.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\nimport esquery from 'esquery';\n\n/**\n * @typedef {{\n * comment: string,\n * context: string,\n * message: string,\n * minimum: import('../iterateJsdoc.js').Integer\n * }} ContextObject\n */\n\n/**\n * @typedef {string|ContextObject} Context\n */\n\n/**\n * @param {import('../iterateJsdoc.js').StateObject} state\n * @returns {void}\n */\nconst setDefaults = (state) => {\n if (!state.selectorMap) {\n state.selectorMap = {};\n }\n};\n\n/**\n * @param {import('../iterateJsdoc.js').StateObject} state\n * @param {string} selector\n * @param {string} comment\n * @returns {void}\n */\nconst incrementSelector = (state, selector, comment) => {\n if (!state.selectorMap[selector]) {\n state.selectorMap[selector] = {};\n }\n\n if (!state.selectorMap[selector][comment]) {\n state.selectorMap[selector][comment] = 0;\n }\n\n state.selectorMap[selector][comment]++;\n};\n\nexport default iterateJsdoc(({\n context,\n node,\n info: {\n comment,\n },\n sourceCode,\n state,\n}) => {\n if (!context.options[0]) {\n // Handle error later\n return;\n }\n\n /**\n * @type {Context[]}\n */\n const contexts = context.options[0].contexts;\n\n const foundContext = contexts.find((cntxt) => {\n return typeof cntxt === 'string' ?\n esquery.matches(\n /** @type {import('../iterateJsdoc.js').Node} */ (node),\n esquery.parse(cntxt),\n undefined,\n {\n visitorKeys: sourceCode.visitorKeys,\n },\n ) :\n (!cntxt.context || cntxt.context === 'any' ||\n esquery.matches(\n /** @type {import('../iterateJsdoc.js').Node} */ (node),\n esquery.parse(cntxt.context),\n undefined,\n {\n visitorKeys: sourceCode.visitorKeys,\n },\n )) && comment === cntxt.comment;\n });\n\n const contextStr = typeof foundContext === 'object' ?\n foundContext.context ?? 'any' :\n String(foundContext);\n\n setDefaults(state);\n\n incrementSelector(state, contextStr, String(comment));\n}, {\n contextSelected: true,\n exit ({\n context,\n settings,\n state,\n }) {\n if (!context.options.length && !settings.contexts) {\n context.report({\n loc: {\n end: {\n column: 1,\n line: 1,\n },\n start: {\n column: 1,\n line: 1,\n },\n },\n message: 'Rule `no-missing-syntax` is missing a `contexts` option.',\n });\n\n return;\n }\n\n setDefaults(state);\n\n /**\n * @type {Context[]}\n */\n const contexts = (context.options[0] ?? {}).contexts ?? settings?.contexts;\n\n // Report when MISSING\n contexts.some((cntxt) => {\n const contextStr = typeof cntxt === 'object' ? cntxt.context ?? 'any' : cntxt;\n const comment = typeof cntxt === 'string' ? '' : cntxt?.comment;\n\n const contextKey = contextStr === 'any' ? 'undefined' : contextStr;\n\n if (\n (!state.selectorMap[contextKey] ||\n !state.selectorMap[contextKey][comment] ||\n state.selectorMap[contextKey][comment] < (\n // @ts-expect-error comment would need an object, not string\n cntxt?.minimum ?? 1\n )) &&\n (contextStr !== 'any' || Object.values(state.selectorMap).every((cmmnt) => {\n return !cmmnt[comment] || cmmnt[comment] < (\n // @ts-expect-error comment would need an object, not string\n cntxt?.minimum ?? 1\n );\n }))\n ) {\n const message = typeof cntxt === 'string' ?\n 'Syntax is required: {{context}}' :\n cntxt?.message ?? ('Syntax is required: {{context}}' +\n (comment ? ' with {{comment}}' : ''));\n context.report({\n data: {\n comment,\n context: contextStr,\n },\n loc: {\n end: {\n column: 1,\n line: 1,\n },\n start: {\n column: 1,\n line: 1,\n },\n },\n message,\n });\n\n return true;\n }\n\n return false;\n });\n },\n matchContext: true,\n meta: {\n docs: {\n description: 'Reports when certain comment structures are always expected.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-missing-syntax.md#repos-sticky-header',\n },\n fixable: 'code',\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 message: {\n type: 'string',\n },\n minimum: {\n type: 'integer',\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,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA8B,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA,MAAMG,WAAW,GAAIC,KAAK,IAAK;EAC7B,IAAI,CAACA,KAAK,CAACC,WAAW,EAAE;IACtBD,KAAK,CAACC,WAAW,GAAG,CAAC,CAAC;EACxB;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAGA,CAACF,KAAK,EAAEG,QAAQ,EAAEC,OAAO,KAAK;EACtD,IAAI,CAACJ,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,EAAE;IAChCH,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,GAAG,CAAC,CAAC;EAClC;EAEA,IAAI,CAACH,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,CAACC,OAAO,CAAC,EAAE;IACzCJ,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,CAACC,OAAO,CAAC,GAAG,CAAC;EAC1C;EAEAJ,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,CAACC,OAAO,CAAC,EAAE;AACxC,CAAC;AAAC,IAAAC,QAAA,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AAO,EAAE;kBACPoB,IAAI,EAAE;gBACR,CAAC;gBACDjB,OAAO,EAAE;kBACPiB,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;AAAAC,OAAA,CAAAxD,OAAA,GAAAO,QAAA;AAAAkD,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAAxD,OAAA"}
|
|
1
|
+
{"version":3,"file":"noMissingSyntax.js","names":["_iterateJsdoc","_interopRequireDefault","require","obj","__esModule","default","setDefaults","state","selectorMap","incrementSelector","selector","comment","_default","iterateJsdoc","context","info","utils","options","contexts","contextStr","findContext","String","contextSelected","exit","settings","length","report","loc","end","column","line","start","message","some","cntxt","contextKey","minimum","Object","values","every","cmmnt","data","matchContext","meta","docs","description","url","fixable","schema","additionalProperties","properties","items","anyOf","type","exports","module"],"sources":["../../src/rules/noMissingSyntax.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\n/**\n * @typedef {{\n * comment: string,\n * context: string,\n * message: string,\n * minimum: import('../iterateJsdoc.js').Integer\n * }} ContextObject\n */\n\n/**\n * @typedef {string|ContextObject} Context\n */\n\n/**\n * @param {import('../iterateJsdoc.js').StateObject} state\n * @returns {void}\n */\nconst setDefaults = (state) => {\n if (!state.selectorMap) {\n state.selectorMap = {};\n }\n};\n\n/**\n * @param {import('../iterateJsdoc.js').StateObject} state\n * @param {string} selector\n * @param {string} comment\n * @returns {void}\n */\nconst incrementSelector = (state, selector, comment) => {\n if (!state.selectorMap[selector]) {\n state.selectorMap[selector] = {};\n }\n\n if (!state.selectorMap[selector][comment]) {\n state.selectorMap[selector][comment] = 0;\n }\n\n state.selectorMap[selector][comment]++;\n};\n\nexport default iterateJsdoc(({\n context,\n info: {\n comment,\n },\n state,\n utils,\n}) => {\n if (!context.options[0]) {\n // Handle error later\n return;\n }\n\n /**\n * @type {Context[]}\n */\n const contexts = context.options[0].contexts;\n\n const {\n contextStr,\n } = utils.findContext(contexts, comment);\n\n setDefaults(state);\n\n incrementSelector(state, contextStr, String(comment));\n}, {\n contextSelected: true,\n exit ({\n context,\n settings,\n state,\n }) {\n if (!context.options.length && !settings.contexts) {\n context.report({\n loc: {\n end: {\n column: 1,\n line: 1,\n },\n start: {\n column: 1,\n line: 1,\n },\n },\n message: 'Rule `no-missing-syntax` is missing a `contexts` option.',\n });\n\n return;\n }\n\n setDefaults(state);\n\n /**\n * @type {Context[]}\n */\n const contexts = (context.options[0] ?? {}).contexts ?? settings?.contexts;\n\n // Report when MISSING\n contexts.some((cntxt) => {\n const contextStr = typeof cntxt === 'object' ? cntxt.context ?? 'any' : cntxt;\n const comment = typeof cntxt === 'string' ? '' : cntxt?.comment;\n\n const contextKey = contextStr === 'any' ? 'undefined' : contextStr;\n\n if (\n (!state.selectorMap[contextKey] ||\n !state.selectorMap[contextKey][comment] ||\n state.selectorMap[contextKey][comment] < (\n // @ts-expect-error comment would need an object, not string\n cntxt?.minimum ?? 1\n )) &&\n (contextStr !== 'any' || Object.values(state.selectorMap).every((cmmnt) => {\n return !cmmnt[comment] || cmmnt[comment] < (\n // @ts-expect-error comment would need an object, not string\n cntxt?.minimum ?? 1\n );\n }))\n ) {\n const message = typeof cntxt === 'string' ?\n 'Syntax is required: {{context}}' :\n cntxt?.message ?? ('Syntax is required: {{context}}' +\n (comment ? ' with {{comment}}' : ''));\n context.report({\n data: {\n comment,\n context: contextStr,\n },\n loc: {\n end: {\n column: 1,\n line: 1,\n },\n start: {\n column: 1,\n line: 1,\n },\n },\n message,\n });\n\n return true;\n }\n\n return false;\n });\n },\n matchContext: true,\n meta: {\n docs: {\n description: 'Reports when certain comment structures are always expected.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-missing-syntax.md#repos-sticky-header',\n },\n fixable: 'code',\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 message: {\n type: 'string',\n },\n minimum: {\n type: 'integer',\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,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA,MAAMG,WAAW,GAAIC,KAAK,IAAK;EAC7B,IAAI,CAACA,KAAK,CAACC,WAAW,EAAE;IACtBD,KAAK,CAACC,WAAW,GAAG,CAAC,CAAC;EACxB;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAGA,CAACF,KAAK,EAAEG,QAAQ,EAAEC,OAAO,KAAK;EACtD,IAAI,CAACJ,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,EAAE;IAChCH,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,GAAG,CAAC,CAAC;EAClC;EAEA,IAAI,CAACH,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,CAACC,OAAO,CAAC,EAAE;IACzCJ,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,CAACC,OAAO,CAAC,GAAG,CAAC;EAC1C;EAEAJ,KAAK,CAACC,WAAW,CAACE,QAAQ,CAAC,CAACC,OAAO,CAAC,EAAE;AACxC,CAAC;AAAC,IAAAC,QAAA,GAEa,IAAAC,qBAAY,EAAC,CAAC;EAC3BC,OAAO;EACPC,IAAI,EAAE;IACJJ;EACF,CAAC;EACDJ,KAAK;EAC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;MACb;MAEA,OAAO,KAAK;IACd,CAAC,CAAC;EACJ,CAAC;EACDU,YAAY,EAAE,IAAI;EAClBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,8DAA8D;MAC3EC,GAAG,EAAE;IACP,CAAC;IACDC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVhC,QAAQ,EAAE;UACRiC,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACEC,IAAI,EAAE;YACR,CAAC,EACD;cACEJ,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACVvC,OAAO,EAAE;kBACP0C,IAAI,EAAE;gBACR,CAAC;gBACDvC,OAAO,EAAE;kBACPuC,IAAI,EAAE;gBACR,CAAC;gBACDrB,OAAO,EAAE;kBACPqB,IAAI,EAAE;gBACR,CAAC;gBACDjB,OAAO,EAAE;kBACPiB,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;AAAAC,OAAA,CAAAjD,OAAA,GAAAO,QAAA;AAAA2C,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAAjD,OAAA"}
|
|
@@ -5,16 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc"));
|
|
8
|
-
var _esquery = _interopRequireDefault(require("esquery"));
|
|
9
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
9
|
var _default = (0, _iterateJsdoc.default)(({
|
|
11
|
-
node,
|
|
12
10
|
context,
|
|
13
11
|
info: {
|
|
14
12
|
comment
|
|
15
13
|
},
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
report,
|
|
15
|
+
utils
|
|
18
16
|
}) => {
|
|
19
17
|
if (!context.options.length) {
|
|
20
18
|
report('Rule `no-restricted-syntax` is missing a `contexts` option.');
|
|
@@ -23,26 +21,17 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
23
21
|
const {
|
|
24
22
|
contexts
|
|
25
23
|
} = context.options[0];
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*/
|
|
31
|
-
cntxt => {
|
|
32
|
-
return typeof cntxt === 'string' ? _esquery.default.matches( /** @type {import('../iterateJsdoc.js').Node} */node, _esquery.default.parse(cntxt), undefined, {
|
|
33
|
-
visitorKeys: sourceCode.visitorKeys
|
|
34
|
-
}) : (!cntxt.context || cntxt.context === 'any' || _esquery.default.matches( /** @type {import('../iterateJsdoc.js').Node} */node, _esquery.default.parse(cntxt.context), undefined, {
|
|
35
|
-
visitorKeys: sourceCode.visitorKeys
|
|
36
|
-
})) && comment === cntxt.comment;
|
|
37
|
-
});
|
|
24
|
+
const {
|
|
25
|
+
foundContext,
|
|
26
|
+
contextStr
|
|
27
|
+
} = utils.findContext(contexts, comment);
|
|
38
28
|
|
|
39
29
|
// We are not on the *particular* matching context/comment, so don't assume
|
|
40
30
|
// we need reporting
|
|
41
31
|
if (!foundContext) {
|
|
42
32
|
return;
|
|
43
33
|
}
|
|
44
|
-
const
|
|
45
|
-
const message = (foundContext === null || foundContext === void 0 ? void 0 : foundContext.message) ?? 'Syntax is restricted: {{context}}' + (comment ? ' with {{comment}}' : '');
|
|
34
|
+
const message = /** @type {import('../iterateJsdoc.js').ContextObject} */(foundContext === null || foundContext === void 0 ? void 0 : foundContext.message) ?? 'Syntax is restricted: {{context}}' + (comment ? ' with {{comment}}' : '');
|
|
46
35
|
report(message, null, null, comment ? {
|
|
47
36
|
comment,
|
|
48
37
|
context: contextStr
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noRestrictedSyntax.js","names":["_iterateJsdoc","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"file":"noRestrictedSyntax.js","names":["_iterateJsdoc","_interopRequireDefault","require","obj","__esModule","default","_default","iterateJsdoc","context","info","comment","report","utils","options","length","contexts","foundContext","contextStr","findContext","message","contextSelected","meta","docs","description","url","fixable","schema","additionalProperties","properties","items","anyOf","type","required","nonGlobalSettings","exports","module"],"sources":["../../src/rules/noRestrictedSyntax.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\nexport default iterateJsdoc(({\n context,\n info: {\n comment,\n },\n report,\n utils,\n}) => {\n if (!context.options.length) {\n report('Rule `no-restricted-syntax` is missing a `contexts` option.');\n\n return;\n }\n\n const {\n contexts,\n } = context.options[0];\n\n const {\n foundContext,\n contextStr,\n } = utils.findContext(contexts, comment);\n\n // We are not on the *particular* matching context/comment, so don't assume\n // we need reporting\n if (!foundContext) {\n return;\n }\n\n const message = /** @type {import('../iterateJsdoc.js').ContextObject} */ (\n foundContext\n )?.message ??\n 'Syntax is restricted: {{context}}' +\n (comment ? ' with {{comment}}' : '');\n\n report(message, null, null, comment ? {\n comment,\n context: contextStr,\n } : {\n context: contextStr,\n });\n}, {\n contextSelected: true,\n meta: {\n docs: {\n description: 'Reports when certain comment structures are present.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-restricted-syntax.md#repos-sticky-header',\n },\n fixable: 'code',\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 message: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n required: [\n 'contexts',\n ],\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n nonGlobalSettings: true,\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,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,UAAU,EAAE;gBACVlB,OAAO,EAAE;kBACPqB,IAAI,EAAE;gBACR,CAAC;gBACDvB,OAAO,EAAE;kBACPuB,IAAI,EAAE;gBACR,CAAC;gBACDZ,OAAO,EAAE;kBACPY,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDC,QAAQ,EAAE,CACR,UAAU,CACX;MACDD,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR,CAAC;EACDE,iBAAiB,EAAE;AACrB,CAAC,CAAC;AAAAC,OAAA,CAAA7B,OAAA,GAAAC,QAAA;AAAA6B,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAA7B,OAAA"}
|
|
@@ -33,11 +33,15 @@ const canSkip = utils => {
|
|
|
33
33
|
'interface']) || utils.avoidDocs();
|
|
34
34
|
};
|
|
35
35
|
var _default = (0, _iterateJsdoc.default)(({
|
|
36
|
+
info: {
|
|
37
|
+
comment
|
|
38
|
+
},
|
|
36
39
|
report,
|
|
37
40
|
utils,
|
|
38
41
|
context
|
|
39
42
|
}) => {
|
|
40
43
|
const {
|
|
44
|
+
contexts,
|
|
41
45
|
forceRequireReturn = false,
|
|
42
46
|
forceReturnsWithAsync = false
|
|
43
47
|
} = context.options[0] || {};
|
|
@@ -47,6 +51,17 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
47
51
|
if (canSkip(utils)) {
|
|
48
52
|
return;
|
|
49
53
|
}
|
|
54
|
+
|
|
55
|
+
/** @type {boolean|undefined} */
|
|
56
|
+
let forceRequireReturnContext;
|
|
57
|
+
if (contexts) {
|
|
58
|
+
const {
|
|
59
|
+
foundContext
|
|
60
|
+
} = utils.findContext(contexts, comment);
|
|
61
|
+
if (typeof foundContext === 'object') {
|
|
62
|
+
forceRequireReturnContext = foundContext.forceRequireReturn;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
50
65
|
const tagName = /** @type {string} */utils.getPreferredTagName({
|
|
51
66
|
tagName: 'returns'
|
|
52
67
|
});
|
|
@@ -66,7 +81,7 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
66
81
|
if (!missingReturnTag) {
|
|
67
82
|
return false;
|
|
68
83
|
}
|
|
69
|
-
if (forceRequireReturn && (iteratingFunction || utils.isVirtualFunction())) {
|
|
84
|
+
if ((forceRequireReturn || forceRequireReturnContext) && (iteratingFunction || utils.isVirtualFunction())) {
|
|
70
85
|
return true;
|
|
71
86
|
}
|
|
72
87
|
const isAsync = !iteratingFunction && utils.hasTag('async') || iteratingFunction && utils.isAsync();
|
|
@@ -108,6 +123,9 @@ var _default = (0, _iterateJsdoc.default)(({
|
|
|
108
123
|
},
|
|
109
124
|
context: {
|
|
110
125
|
type: 'string'
|
|
126
|
+
},
|
|
127
|
+
forceRequireReturn: {
|
|
128
|
+
type: 'boolean'
|
|
111
129
|
}
|
|
112
130
|
},
|
|
113
131
|
type: 'object'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requireReturns.js","names":["_iterateJsdoc","_interopRequireDefault","require","obj","__esModule","default","canSkip","utils","hasATag","avoidDocs","_default","iterateJsdoc","report","context","forceRequireReturn","forceReturnsWithAsync","options","tagName","getPreferredTagName","tags","getTags","length","iteratingFunction","isIteratingFunction","tag","missingReturnTag","shouldReport","isVirtualFunction","isAsync","hasTag","hasValueOrExecutorHasNonEmptyResolveValue","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","checkConstructors","type","checkGetters","
|
|
1
|
+
{"version":3,"file":"requireReturns.js","names":["_iterateJsdoc","_interopRequireDefault","require","obj","__esModule","default","canSkip","utils","hasATag","avoidDocs","_default","iterateJsdoc","info","comment","report","context","contexts","forceRequireReturn","forceReturnsWithAsync","options","forceRequireReturnContext","foundContext","findContext","tagName","getPreferredTagName","tags","getTags","length","iteratingFunction","isIteratingFunction","tag","missingReturnTag","shouldReport","isVirtualFunction","isAsync","hasTag","hasValueOrExecutorHasNonEmptyResolveValue","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","checkConstructors","type","checkGetters","items","anyOf","exemptedBy","exports","module"],"sources":["../../src/rules/requireReturns.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc';\n\n/**\n * We can skip checking for a return value, in case the documentation is inherited\n * or the method is either a constructor or an abstract method.\n *\n * In either of these cases the return value is optional or not defined.\n * @param {import('../iterateJsdoc.js').Utils} utils\n * a reference to the utils which are used to probe if a tag is present or not.\n * @returns {boolean}\n * true in case deep checking can be skipped; otherwise false.\n */\nconst canSkip = (utils) => {\n return utils.hasATag([\n // inheritdoc implies that all documentation is inherited\n // see https://jsdoc.app/tags-inheritdoc.html\n //\n // Abstract methods are by definition incomplete,\n // so it is not an error if it declares a return value but does not implement it.\n 'abstract',\n 'virtual',\n\n // Constructors do not have a return value by definition (https://jsdoc.app/tags-class.html)\n // So we can bail out here, too.\n 'class',\n 'constructor',\n\n // Return type is specified by type in @type\n 'type',\n\n // This seems to imply a class as well\n 'interface',\n ]) ||\n utils.avoidDocs();\n};\n\nexport default iterateJsdoc(({\n info: {\n comment,\n },\n report,\n utils,\n context,\n}) => {\n const {\n contexts,\n forceRequireReturn = false,\n forceReturnsWithAsync = false,\n } = context.options[0] || {};\n\n // A preflight check. We do not need to run a deep check\n // in case the @returns comment is optional or undefined.\n if (canSkip(utils)) {\n return;\n }\n\n /** @type {boolean|undefined} */\n let forceRequireReturnContext;\n if (contexts) {\n const {\n foundContext,\n } = utils.findContext(contexts, comment);\n if (typeof foundContext === 'object') {\n forceRequireReturnContext = foundContext.forceRequireReturn;\n }\n }\n\n const tagName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'returns',\n }));\n if (!tagName) {\n return;\n }\n\n const tags = utils.getTags(tagName);\n\n if (tags.length > 1) {\n report(`Found more than one @${tagName} declaration.`);\n }\n\n const iteratingFunction = utils.isIteratingFunction();\n\n // In case the code returns something, we expect a return value in JSDoc.\n const [\n tag,\n ] = tags;\n const missingReturnTag = typeof tag === 'undefined' || tag === null;\n\n const shouldReport = () => {\n if (!missingReturnTag) {\n return false;\n }\n\n if ((forceRequireReturn || forceRequireReturnContext) && (\n iteratingFunction || utils.isVirtualFunction()\n )) {\n return true;\n }\n\n const isAsync = !iteratingFunction && utils.hasTag('async') ||\n iteratingFunction && utils.isAsync();\n\n if (forceReturnsWithAsync && isAsync) {\n return true;\n }\n\n return iteratingFunction && utils.hasValueOrExecutorHasNonEmptyResolveValue(\n forceReturnsWithAsync,\n );\n };\n\n if (shouldReport()) {\n report(`Missing JSDoc @${tagName} declaration.`);\n }\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that returns are documented.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n checkConstructors: {\n default: false,\n type: 'boolean',\n },\n checkGetters: {\n default: true,\n type: 'boolean',\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 forceRequireReturn: {\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n exemptedBy: {\n items: {\n type: 'string',\n },\n type: 'array',\n },\n forceRequireReturn: {\n default: false,\n type: 'boolean',\n },\n forceReturnsWithAsync: {\n default: false,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA2C,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,OAAO,GAAIC,KAAK,IAAK;EACzB,OAAOA,KAAK,CAACC,OAAO,CA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P+B,IAAI,EAAE;gBACR,CAAC;gBACD7B,kBAAkB,EAAE;kBAClB6B,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDI,UAAU,EAAE;UACVF,KAAK,EAAE;YACLF,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACD7B,kBAAkB,EAAE;UAClBZ,OAAO,EAAE,KAAK;UACdyC,IAAI,EAAE;QACR,CAAC;QACD5B,qBAAqB,EAAE;UACrBb,OAAO,EAAE,KAAK;UACdyC,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAK,OAAA,CAAA9C,OAAA,GAAAK,QAAA;AAAA0C,MAAA,CAAAD,OAAA,GAAAA,OAAA,CAAA9C,OAAA"}
|
|
@@ -212,7 +212,7 @@ expression-oriented rules will be used by default as well:
|
|
|
212
212
|
|Context|everywhere|
|
|
213
213
|
|Tags|`example`|
|
|
214
214
|
|Recommended|false|
|
|
215
|
-
|Options
|
|
215
|
+
|Options|`allowInlineConfig`, `baseConfig`, `captionRequired`, `checkDefaults`, `checkEslintrc`, `checkParams`, `checkProperties`, `configFile`, `exampleCodeRegex`, `matchingFileName`, `matchingFileNameDefaults`, `matchingFileNameParams`, `matchingFileNameProperties`, `noDefaultExampleRules`, `paddedIndent`, `rejectExampleCodeRegex`, `reportUnusedDisableDirectives`|
|
|
216
216
|
|
|
217
217
|
<a name="user-content-check-examples-failing-examples"></a>
|
|
218
218
|
<a name="check-examples-failing-examples"></a>
|
|
@@ -64,7 +64,7 @@ report a padding issue:
|
|
|
64
64
|
|Context|everywhere|
|
|
65
65
|
|Tags|N/A|
|
|
66
66
|
|Recommended|false|
|
|
67
|
-
|Options
|
|
67
|
+
|Options|`excludeTags`|
|
|
68
68
|
|
|
69
69
|
<a name="user-content-check-indentation-failing-examples"></a>
|
|
70
70
|
<a name="check-indentation-failing-examples"></a>
|
|
@@ -79,7 +79,7 @@ Default to the empty string (no indent).
|
|
|
79
79
|
|||
|
|
80
80
|
|---|---|
|
|
81
81
|
|Context|everywhere|
|
|
82
|
-
|Options|
|
|
82
|
+
|Options|string ("always", "never", "any") followed by object with `customSpacings`, `preserveMainDescriptionPostDelimiter`, `tags`, `wrapIndent`|
|
|
83
83
|
|Tags|`param`, `property`, `returns` and others added by `tags`|
|
|
84
84
|
|Aliases|`arg`, `argument`, `prop`, `return`|
|
|
85
85
|
|Recommended|false|
|
|
@@ -123,7 +123,7 @@ that are available and actually used in the function.
|
|
|
123
123
|
|||
|
|
124
124
|
|---|---|
|
|
125
125
|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
|
|
126
|
-
|Options|`allowExtraTrailingParamDocs`, `checkDestructured`, `checkRestProperty`, `checkTypesPattern`, `
|
|
126
|
+
|Options|`allowExtraTrailingParamDocs`, `checkDestructured`, `checkRestProperty`, `checkTypesPattern`, `disableExtraPropertyReporting`, `enableFixer`, `useDefaultObjectProperties`|
|
|
127
127
|
|Tags|`param`|
|
|
128
128
|
|Aliases|`arg`, `argument`|
|
|
129
129
|
|Recommended|true|
|
|
@@ -183,7 +183,7 @@ permitted.
|
|
|
183
183
|
|Aliases|`constructor`, `const`, `extends`, `var`, `arg`, `argument`, `prop`, `return`, `exception`, `yield`|
|
|
184
184
|
|Closure-only|`package`, `private`, `protected`, `public`, `static`|
|
|
185
185
|
|Recommended|true|
|
|
186
|
-
|Options|`
|
|
186
|
+
|Options|`exemptTagContexts`, `noDefaults`, `unifyParentAndChildTypeChecks`|
|
|
187
187
|
|Settings|`preferredTypes`, `mode`, `structuredTags`|
|
|
188
188
|
|
|
189
189
|
<a name="user-content-check-types-failing-examples"></a>
|
|
@@ -78,7 +78,7 @@ Whether to enable validation that `@variation` must be a number. Defaults to
|
|
|
78
78
|
|Context|everywhere|
|
|
79
79
|
|Tags|`@version`, `@since`, `@kind`, `@license`, `@author`, `@variation`|
|
|
80
80
|
|Recommended|true|
|
|
81
|
-
|Options|`allowedAuthors`, `allowedLicenses`, `licensePattern`|
|
|
81
|
+
|Options|`allowedAuthors`, `allowedLicenses`, `licensePattern`, `numericOnlyVariation`|
|
|
82
82
|
|Settings|`tagNamePreference`|
|
|
83
83
|
|
|
84
84
|
<a name="user-content-check-values-failing-examples"></a>
|
|
@@ -186,7 +186,7 @@ section of our README for more on the expected format.
|
|
|
186
186
|
|Aliases|`@desc`|
|
|
187
187
|
|Recommended|false|
|
|
188
188
|
|Settings||
|
|
189
|
-
|Options|`contexts`, `
|
|
189
|
+
|Options|`contexts`, `mainDescription`, `matchDescription`, `message`, `tags`|
|
|
190
190
|
|
|
191
191
|
<a name="user-content-match-description-failing-examples"></a>
|
|
192
192
|
<a name="match-description-failing-examples"></a>
|
|
@@ -120,7 +120,7 @@ cannot be reliably added after the tag either).
|
|
|
120
120
|
|Tags|Any (though `singleLineTags` and `multilineTags` control the application)|
|
|
121
121
|
|Recommended|true|
|
|
122
122
|
|Settings||
|
|
123
|
-
|Options|`
|
|
123
|
+
|Options|`allowMultipleTags`, `minimumLengthForMultiline`, `multilineTags`, `noFinalLineText`, `noMultilineBlocks`, `noSingleLineBlocks`, `noZeroLineText`, `singleLineTags`|
|
|
124
124
|
|
|
125
125
|
<a name="user-content-failing-examples"></a>
|
|
126
126
|
<a name="failing-examples"></a>
|
|
@@ -68,7 +68,7 @@ Prevent the likes of this:
|
|
|
68
68
|
|Tags|(any)|
|
|
69
69
|
|Recommended|true|
|
|
70
70
|
|Settings||
|
|
71
|
-
|Options|`preventAtEnd`, `preventAtMiddleLines`|
|
|
71
|
+
|Options|`allowWhitespace`, `preventAtEnd`, `preventAtMiddleLines`|
|
|
72
72
|
|
|
73
73
|
<a name="user-content-failing-examples"></a>
|
|
74
74
|
<a name="failing-examples"></a>
|
|
@@ -79,7 +79,7 @@ An option object may have the following keys:
|
|
|
79
79
|
|Aliases|`constructor`, `const`, `extends`, `var`, `arg`, `argument`, `prop`, `return`, `exception`, `yield`|
|
|
80
80
|
|Closure-only|`package`, `private`, `protected`, `public`, `static`|
|
|
81
81
|
|Recommended|true|
|
|
82
|
-
|Options|`definedTypes`, `
|
|
82
|
+
|Options|`definedTypes`, `disableReporting`, `markVariablesAsUsed`|
|
|
83
83
|
|Settings|`preferredTypes`, `mode`, `structuredTags`|
|
|
84
84
|
|
|
85
85
|
|
|
@@ -53,7 +53,7 @@ which applies to the main jsdoc block description.
|
|
|
53
53
|
|---|---|
|
|
54
54
|
|Context|everywhere|
|
|
55
55
|
|Tags|All or as limited by the `tags` option|
|
|
56
|
-
|Options|
|
|
56
|
+
|Options|string ("always", "never", "any") followed by object with `tags`|
|
|
57
57
|
|
|
58
58
|
<a name="user-content-failing-examples"></a>
|
|
59
59
|
<a name="failing-examples"></a>
|
|
@@ -90,7 +90,7 @@ nouns, for example).
|
|
|
90
90
|
|Tags|doc block, `param`, `returns`, `description`, `property`, `summary`, `file`, `classdesc`, `todo`, `deprecated`, `throws`, 'yields' and others added by `tags`|
|
|
91
91
|
|Aliases|`arg`, `argument`, `return`, `desc`, `prop`, `fileoverview`, `overview`, `exception`, `yield`|
|
|
92
92
|
|Recommended|false|
|
|
93
|
-
|Options|`
|
|
93
|
+
|Options|`abbreviations`, `newlineBeforeCapsAssumesBadSentenceEnd`, `tags`|
|
|
94
94
|
|
|
95
95
|
<a name="user-content-require-description-complete-sentence-failing-examples"></a>
|
|
96
96
|
<a name="require-description-complete-sentence-failing-examples"></a>
|
|
@@ -52,7 +52,7 @@ An options object may have any of the following properties:
|
|
|
52
52
|
| Tags | `description` or jsdoc block |
|
|
53
53
|
| Aliases | `desc` |
|
|
54
54
|
| Recommended | false |
|
|
55
|
-
| Options
|
|
55
|
+
| Options |`checkConstructors`, `checkGetters`, `checkSetters`, `contexts`, `descriptionStyle`, `exemptedBy`|
|
|
56
56
|
| Settings | `ignoreReplacesDocs`, `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |
|
|
57
57
|
|
|
58
58
|
<a name="user-content-require-description-failing-examples"></a>
|
|
@@ -98,7 +98,7 @@ Defaults to `true`.
|
|
|
98
98
|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|
|
99
99
|
|Tags|`example`|
|
|
100
100
|
|Recommended|false|
|
|
101
|
-
|Options|`
|
|
101
|
+
|Options|`checkConstructors`, `checkGetters`, `checkSetters`, `contexts`, `enableFixer`, `exemptedBy`, `exemptNoArguments`|
|
|
102
102
|
|Settings|`ignoreReplacesDocs`, `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|
|
|
103
103
|
|
|
104
104
|
<a name="user-content-failing-examples"></a>
|
|
@@ -48,7 +48,7 @@ other tags besides the `@param` tag (or the `@arg` tag if so set):
|
|
|
48
48
|
|Tags|`param` and optionally other tags within `tags`|
|
|
49
49
|
|Aliases|`arg`, `argument`; potentially `prop` or other aliases|
|
|
50
50
|
|Recommended|false|
|
|
51
|
-
|Options|
|
|
51
|
+
|Options|string ("always", "never") followed by object with `tags`|
|
|
52
52
|
|
|
53
53
|
<a name="user-content-require-hyphen-before-param-description-failing-examples"></a>
|
|
54
54
|
<a name="require-hyphen-before-param-description-failing-examples"></a>
|
|
@@ -64,7 +64,7 @@ section of our README for more on the expected format.
|
|
|
64
64
|
|Tags|`param`|
|
|
65
65
|
|Aliases|`arg`, `argument`|
|
|
66
66
|
|Recommended|true|
|
|
67
|
-
|Options|`
|
|
67
|
+
|Options|`contexts`, `defaultDestructuredRootDescription`, `setDefaultDestructuredRootDescription`|
|
|
68
68
|
|Settings|`exemptDestructuredRootsFromChecks`|
|
|
69
69
|
|
|
70
70
|
<a name="user-content-require-param-description-failing-examples"></a>
|
|
@@ -63,7 +63,7 @@ section of our README for more on the expected format.
|
|
|
63
63
|
|Tags|`param`|
|
|
64
64
|
|Aliases|`arg`, `argument`|
|
|
65
65
|
|Recommended|true|
|
|
66
|
-
|Options|`
|
|
66
|
+
|Options|`contexts`, `defaultDestructuredRootType`, `setDefaultDestructuredRootType`|
|
|
67
67
|
|Settings|`exemptDestructuredRootsFromChecks`|
|
|
68
68
|
|
|
69
69
|
<a name="user-content-require-param-type-failing-examples"></a>
|
|
@@ -447,7 +447,7 @@ supplied as default values. Defaults to `false`.
|
|
|
447
447
|
| Tags | `param` |
|
|
448
448
|
| Aliases | `arg`, `argument` |
|
|
449
449
|
|Recommended | true|
|
|
450
|
-
| Options
|
|
450
|
+
| Options |`autoIncrementBase`, `checkConstructors`, `checkDestructured`, `checkDestructuredRoots`, `checkGetters`, `checkRestProperty`, `checkSetters`, `checkTypesPattern`, `contexts`, `enableFixer`, `enableRestElementFixer`, `enableRootFixer`, `exemptedBy`, `unnamedRootBase`, `useDefaultObjectProperties`|
|
|
451
451
|
| Settings | `ignoreReplacesDocs`, `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|
|
|
452
452
|
|
|
453
453
|
<a name="user-content-require-param-failing-examples"></a>
|
|
@@ -54,7 +54,7 @@ Will also report if multiple `@returns` tags are present.
|
|
|
54
54
|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
|
|
55
55
|
|Tags|`returns`|
|
|
56
56
|
|Aliases|`return`|
|
|
57
|
-
|Options|`exemptAsync`, `reportMissingReturnForUndefinedTypes`|
|
|
57
|
+
|Options|`exemptAsync`, `exemptGenerators`, `reportMissingReturnForUndefinedTypes`|
|
|
58
58
|
|Recommended|true|
|
|
59
59
|
|
|
60
60
|
<a name="user-content-require-returns-check-failing-examples"></a>
|
|
@@ -61,7 +61,7 @@ Will also report if multiple `@returns` tags are present.
|
|
|
61
61
|
| Tags | `returns` |
|
|
62
62
|
| Aliases | `return` |
|
|
63
63
|
|Recommended|true|
|
|
64
|
-
| Options
|
|
64
|
+
| Options |`checkConstructors`, `checkGetters`, `contexts`, `exemptedBy`, `forceRequireReturn`, `forceReturnsWithAsync`|
|
|
65
65
|
| Settings | `ignoreReplacesDocs`, `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |
|
|
66
66
|
|
|
67
67
|
<a name="user-content-require-returns-failing-examples"></a>
|
|
@@ -634,6 +634,20 @@ export default async function demo() {
|
|
|
634
634
|
return true;
|
|
635
635
|
}
|
|
636
636
|
// Message: Missing JSDoc @returns declaration.
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
*
|
|
640
|
+
*/
|
|
641
|
+
function quux () {}
|
|
642
|
+
|
|
643
|
+
class Test {
|
|
644
|
+
/**
|
|
645
|
+
*
|
|
646
|
+
*/
|
|
647
|
+
abstract Test(): string;
|
|
648
|
+
}
|
|
649
|
+
// "jsdoc/require-returns": ["error"|"warn", {"contexts":["FunctionDeclaration",{"context":"TSEmptyBodyFunctionExpression","forceRequireReturn":true}]}]
|
|
650
|
+
// Message: Missing JSDoc @returns declaration.
|
|
637
651
|
````
|
|
638
652
|
|
|
639
653
|
|
|
@@ -1160,5 +1174,18 @@ export function readFixture(path: string): void;
|
|
|
1160
1174
|
* Reads a test fixture.
|
|
1161
1175
|
*/
|
|
1162
1176
|
export function readFixture(path: string);
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
*
|
|
1180
|
+
*/
|
|
1181
|
+
function quux () {}
|
|
1182
|
+
|
|
1183
|
+
class Test {
|
|
1184
|
+
/**
|
|
1185
|
+
* @returns {string} The test value
|
|
1186
|
+
*/
|
|
1187
|
+
abstract Test(): string;
|
|
1188
|
+
}
|
|
1189
|
+
// "jsdoc/require-returns": ["error"|"warn", {"contexts":["FunctionDeclaration",{"context":"TSEmptyBodyFunctionExpression","forceRequireReturn":true}]}]
|
|
1163
1190
|
````
|
|
1164
1191
|
|
|
@@ -49,7 +49,7 @@ on why TypeScript doesn't offer such a feature.
|
|
|
49
49
|
| Tags | `throws` |
|
|
50
50
|
| Aliases | `exception` |
|
|
51
51
|
|Recommended|true|
|
|
52
|
-
| Options
|
|
52
|
+
| Options |`contexts`, `exemptedBy`|
|
|
53
53
|
| Settings | `ignoreReplacesDocs`, `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |
|
|
54
54
|
|
|
55
55
|
<a name="user-content-require-throws-failing-examples"></a>
|
|
@@ -54,7 +54,7 @@ Will also report if multiple `@yields` tags are present.
|
|
|
54
54
|
|Tags|`yields`|
|
|
55
55
|
|Aliases|`yield`|
|
|
56
56
|
|Recommended|true|
|
|
57
|
-
|Options|`checkGeneratorsOnly`|
|
|
57
|
+
|Options|`checkGeneratorsOnly`, `contexts`, `exemptedBy`, `next`|
|
|
58
58
|
|
|
59
59
|
<a name="user-content-require-yields-check-failing-examples"></a>
|
|
60
60
|
<a name="require-yields-check-failing-examples"></a>
|
|
@@ -75,7 +75,7 @@ option to expect a non-standard `@next` tag.
|
|
|
75
75
|
|Tags|`yields`|
|
|
76
76
|
|Aliases|`yield`|
|
|
77
77
|
|Recommended|true|
|
|
78
|
-
| Options
|
|
78
|
+
| Options |`contexts`, `exemptedBy`, `forceRequireNext`, `forceRequireYields`, `next`, `nextWithGeneratorTag`, `withGeneratorTag`|
|
|
79
79
|
| Settings | `ignoreReplacesDocs`, `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |
|
|
80
80
|
|
|
81
81
|
<a name="user-content-require-yields-failing-examples"></a>
|
package/docs/rules/sort-tags.md
CHANGED
|
@@ -272,7 +272,7 @@ such tags. Do not use with `true` if you are using `tag-lines` and `always`.
|
|
|
272
272
|
|Tags|any|
|
|
273
273
|
|Recommended|false|
|
|
274
274
|
|Settings||
|
|
275
|
-
|Options|`
|
|
275
|
+
|Options|`alphabetizeExtras`, `linesBetween`, `reportIntraTagGroupSpacing`, `reportTagGroupSpacing`, `tagSequence`|
|
|
276
276
|
|
|
277
277
|
<a name="user-content-sort-tags-failing-examples"></a>
|
|
278
278
|
<a name="sort-tags-failing-examples"></a>
|
package/docs/rules/tag-lines.md
CHANGED
|
@@ -94,7 +94,7 @@ following keys:
|
|
|
94
94
|
|Tags|Any|
|
|
95
95
|
|Recommended|true|
|
|
96
96
|
|Settings|N/A|
|
|
97
|
-
|Options|
|
|
97
|
+
|Options|string ("always", "any", "never") followed by object with `applyToEndTag`, `count`, `endLines`, `startLines`, `tags`|
|
|
98
98
|
|
|
99
99
|
<a name="user-content-tag-lines-failing-examples"></a>
|
|
100
100
|
<a name="tag-lines-failing-examples"></a>
|
|
@@ -52,7 +52,7 @@ This option escapes the first backtick (`` ` ``) in a paired sequence.
|
|
|
52
52
|
|Tags|``|
|
|
53
53
|
|Recommended|false|
|
|
54
54
|
|Settings||
|
|
55
|
-
|Options
|
|
55
|
+
|Options|`escapeHTML`, `escapeMarkdown`|
|
|
56
56
|
|
|
57
57
|
<a name="user-content-text-escaping-failing-examples"></a>
|
|
58
58
|
<a name="text-escaping-failing-examples"></a>
|
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@babel/plugin-transform-flow-strip-types": "^7.21.0",
|
|
25
25
|
"@babel/preset-env": "^7.21.5",
|
|
26
26
|
"@babel/register": "^7.21.0",
|
|
27
|
+
"@es-joy/escodegen": "^3.5.1",
|
|
27
28
|
"@es-joy/jsdoc-eslint-parser": "^0.19.0",
|
|
28
29
|
"@hkdobrev/run-if-changed": "^0.3.1",
|
|
29
30
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"decamelize": "^5.0.1",
|
|
49
50
|
"eslint": "8.41.0",
|
|
50
51
|
"eslint-config-canonical": "~41.0.4",
|
|
52
|
+
"espree": "^9.5.2",
|
|
51
53
|
"gitdown": "^3.1.5",
|
|
52
54
|
"glob": "^10.2.6",
|
|
53
55
|
"husky": "^8.0.3",
|
|
@@ -120,8 +122,9 @@
|
|
|
120
122
|
"tsc": "tsc",
|
|
121
123
|
"build": "rimraf ./dist && cross-env NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --ignore ./src/bin/*.js --no-copy-ignored",
|
|
122
124
|
"check-docs": "babel-node ./src/bin/generateDocs.js --check",
|
|
123
|
-
"create-docs": "babel-node ./src/bin/generateDocs.js",
|
|
125
|
+
"create-docs": "npm run create-options && babel-node ./src/bin/generateDocs.js",
|
|
124
126
|
"create-rule": "babel-node ./src/bin/generateRule.js",
|
|
127
|
+
"create-options": "node ./src/bin/generateOptions.mjs",
|
|
125
128
|
"install-offline": "pnpm install --prefer-offline --no-audit",
|
|
126
129
|
"lint": "npm run lint-arg -- .",
|
|
127
130
|
"lint-arg": "eslint --report-unused-disable-directives",
|
|
@@ -132,5 +135,5 @@
|
|
|
132
135
|
"test-cov": "cross-env TIMING=1 nyc --reporter text npm run test-no-cov",
|
|
133
136
|
"test-index": "npm run test-no-cov -- test/rules/index.js"
|
|
134
137
|
},
|
|
135
|
-
"version": "
|
|
138
|
+
"version": "46.1.0"
|
|
136
139
|
}
|