eslint-plugin-jsdoc 62.8.1 → 63.0.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/dist/cjs/iterateJsdoc.d.ts +1 -1
- package/dist/exportParser.cjs +1 -1
- package/dist/exportParser.cjs.map +1 -1
- package/dist/iterateJsdoc.cjs +3 -2
- package/dist/iterateJsdoc.cjs.map +1 -1
- package/dist/iterateJsdoc.d.ts +1 -1
- package/dist/rules/requireThrows.cjs +1 -1
- package/dist/rules/requireThrows.cjs.map +1 -1
- package/dist/rules/validTypes.cjs +1 -5
- package/dist/rules/validTypes.cjs.map +1 -1
- package/package.json +32 -45
- package/src/exportParser.js +1 -1
- package/src/iterateJsdoc.js +5 -2
- package/src/rules/requireThrows.js +1 -1
- package/src/rules/validTypes.js +1 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requireThrows.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","canSkip","utils","hasATag","avoidDocs","_default","exports","iterateJsdoc","report","tagName","getPreferredTagName","tags","getTags","iteratingFunction","isIteratingFunction","tag","missingThrowsTag","shouldReport","type","trim","hasThrowValue","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context","exemptedBy","module"],"sources":["../../src/rules/requireThrows.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\n/**\n * We can skip checking for a throws value, in case the documentation is inherited\n * or the method is either a constructor or an abstract method.\n * @param {import('../iterateJsdoc.js').Utils} utils a reference to the utils which are used to probe if a tag is present or not.\n * @returns {boolean} 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 necessary to document that they throw an error.\n 'abstract',\n 'virtual',\n\n // The designated type can itself document `@throws`\n 'type',\n ]) ||\n utils.avoidDocs();\n};\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n // A preflight check. We do not need to run a deep check for abstract\n // functions.\n if (canSkip(utils)) {\n return;\n }\n\n const tagName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'throws',\n }));\n if (!tagName) {\n return;\n }\n\n const tags = utils.getTags(tagName);\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 missingThrowsTag = typeof tag === 'undefined' || tag === null;\n\n const shouldReport = () => {\n if (!missingThrowsTag) {\n if (tag.type.trim() === 'never' && iteratingFunction && utils.hasThrowValue()) {\n report(`JSDoc @${tagName} declaration set to \"never\" but throw value found.`);\n }\n\n return false;\n }\n\n return iteratingFunction && utils.hasThrowValue();\n };\n\n if (shouldReport()) {\n report(`Missing JSDoc @${tagName} declaration.`);\n }\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that throw statements are documented with `@throws` tags.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n description: `Set this to an array of strings representing the AST context\n(or objects with optional \\`context\\` and \\`comment\\` properties) where you wish\nthe rule to be applied.\n\n\\`context\\` defaults to \\`any\\` and \\`comment\\` defaults to no specific comment context.\n\nOverrides the default contexts (\\`ArrowFunctionExpression\\`, \\`FunctionDeclaration\\`,\n\\`FunctionExpression\\`). Set to \\`\"any\"\\` if you want\nthe rule to apply to any JSDoc block throughout your files (as is necessary\nfor finding function blocks not attached to a function declaration or\nexpression, i.e., \\`@callback\\` or \\`@function\\` (or its aliases \\`@func\\` or\n\\`@method\\`) (including those associated with an \\`@interface\\`).`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n exemptedBy: {\n description: `Array of tags (e.g., \\`['type']\\`) whose presence on the\ndocument block avoids the need for a \\`@throws\\`. Defaults to an array\nwith \\`inheritdoc\\`. If you set this array, it will overwrite the default,\nso be sure to add back \\`inheritdoc\\` if you wish its presence to cause\nexemption of the rule.`,\n items: {\n type: 'string',\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;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,OAAO,GAAIC,KAAK,IAAK;EACzB,OAAOA,KAAK,CAACC,OAAO,CAAC;EACnB;EACA;EACA;EACA;EACA;EACA,UAAU,EACV,SAAS;EAET;EACA,MAAM,CACP,CAAC,IACAD,KAAK,CAACE,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"requireThrows.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","canSkip","utils","hasATag","avoidDocs","_default","exports","iterateJsdoc","report","tagName","getPreferredTagName","tags","getTags","iteratingFunction","isIteratingFunction","tag","missingThrowsTag","shouldReport","type","trim","hasThrowValue","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context","exemptedBy","module"],"sources":["../../src/rules/requireThrows.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\n/**\n * We can skip checking for a throws value, in case the documentation is inherited\n * or the method is either a constructor or an abstract method.\n * @param {import('../iterateJsdoc.js').Utils} utils a reference to the utils which are used to probe if a tag is present or not.\n * @returns {boolean} 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 necessary to document that they throw an error.\n 'abstract',\n 'virtual',\n\n // The designated type can itself document `@throws`\n 'type',\n ]) ||\n utils.avoidDocs(false);\n};\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n // A preflight check. We do not need to run a deep check for abstract\n // functions.\n if (canSkip(utils)) {\n return;\n }\n\n const tagName = /** @type {string} */ (utils.getPreferredTagName({\n tagName: 'throws',\n }));\n if (!tagName) {\n return;\n }\n\n const tags = utils.getTags(tagName);\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 missingThrowsTag = typeof tag === 'undefined' || tag === null;\n\n const shouldReport = () => {\n if (!missingThrowsTag) {\n if (tag.type.trim() === 'never' && iteratingFunction && utils.hasThrowValue()) {\n report(`JSDoc @${tagName} declaration set to \"never\" but throw value found.`);\n }\n\n return false;\n }\n\n return iteratingFunction && utils.hasThrowValue();\n };\n\n if (shouldReport()) {\n report(`Missing JSDoc @${tagName} declaration.`);\n }\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that throw statements are documented with `@throws` tags.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n contexts: {\n description: `Set this to an array of strings representing the AST context\n(or objects with optional \\`context\\` and \\`comment\\` properties) where you wish\nthe rule to be applied.\n\n\\`context\\` defaults to \\`any\\` and \\`comment\\` defaults to no specific comment context.\n\nOverrides the default contexts (\\`ArrowFunctionExpression\\`, \\`FunctionDeclaration\\`,\n\\`FunctionExpression\\`). Set to \\`\"any\"\\` if you want\nthe rule to apply to any JSDoc block throughout your files (as is necessary\nfor finding function blocks not attached to a function declaration or\nexpression, i.e., \\`@callback\\` or \\`@function\\` (or its aliases \\`@func\\` or\n\\`@method\\`) (including those associated with an \\`@interface\\`).`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n exemptedBy: {\n description: `Array of tags (e.g., \\`['type']\\`) whose presence on the\ndocument block avoids the need for a \\`@throws\\`. Defaults to an array\nwith \\`inheritdoc\\`. If you set this array, it will overwrite the default,\nso be sure to add back \\`inheritdoc\\` if you wish its presence to cause\nexemption of the rule.`,\n items: {\n type: 'string',\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;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,OAAO,GAAIC,KAAK,IAAK;EACzB,OAAOA,KAAK,CAACC,OAAO,CAAC;EACnB;EACA;EACA;EACA;EACA;EACA,UAAU,EACV,SAAS;EAET;EACA,MAAM,CACP,CAAC,IACAD,KAAK,CAACE,SAAS,CAAC,KAAK,CAAC;AAC1B,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAN,OAAA,GAEa,IAAAO,qBAAY,EAAC,CAAC;EAC3BC,MAAM;EACNN;AACF,CAAC,KAAK;EACJ;EACA;EACA,IAAID,OAAO,CAACC,KAAK,CAAC,EAAE;IAClB;EACF;EAEA,MAAMO,OAAO,GAAG,qBAAuBP,KAAK,CAACQ,mBAAmB,CAAC;IAC/DD,OAAO,EAAE;EACX,CAAC,CAAE;EACH,IAAI,CAACA,OAAO,EAAE;IACZ;EACF;EAEA,MAAME,IAAI,GAAGT,KAAK,CAACU,OAAO,CAACH,OAAO,CAAC;EACnC,MAAMI,iBAAiB,GAAGX,KAAK,CAACY,mBAAmB,CAAC,CAAC;;EAErD;EACA,MAAM,CACJC,GAAG,CACJ,GAAGJ,IA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C;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAiB,MAAA,CAAA7B,OAAA,GAAAA,OAAA,CAAAN,OAAA","ignoreList":[]}
|
|
@@ -31,11 +31,7 @@ const suppressTypes = new Set([
|
|
|
31
31
|
*/
|
|
32
32
|
const tryParsePathIgnoreError = (path, mode) => {
|
|
33
33
|
try {
|
|
34
|
-
(0, _jsdoccomment.parseNamePath)(
|
|
35
|
-
// Todo: Should avoid need for this by letting comment-parser parse default
|
|
36
|
-
// values as such when they are not optional
|
|
37
|
-
// Strip default value
|
|
38
|
-
path.replace(/[=].*/v, ''), mode === 'permissive' ? 'jsdoc' : mode, {
|
|
34
|
+
(0, _jsdoccomment.parseNamePath)(path, mode === 'permissive' ? 'jsdoc' : mode, {
|
|
39
35
|
includeSpecial: true
|
|
40
36
|
});
|
|
41
37
|
return true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validTypes.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","e","__esModule","default","inlineTags","Set","asExpression","suppressTypes","tryParsePathIgnoreError","path","mode","parseNamePath","replace","includeSpecial","tryParseNameIgnoreError","name","parseName","_default","exports","iterateJsdoc","context","jsdoc","report","settings","utils","allowEmptyNamepaths","options","tag","tags","validNamepathParsing","namepath","tagName","handled","endChar","slice","includes","startsWith","test","startChar","charAt","validTypeParsing","type","parsedTypes","tryParse","undefined","classContext","parse","traverse","node","typ","right","meta","position","problems","length","msg","reduce","str","message","thisNamepath","getTagDescription","trim","thatNamepath","value","has","otherModeMaps","filter","mde","map","getTagStructureForMode","tagMightHaveNamePosition","modeInfo","description","mightHaveTypePosition","tagMightHaveTypePosition","tagMustHaveNamePosition","mustHaveTypePosition","tagMustHaveTypePosition","tagMissingRequiredTypeOrNamepath","hasTypePosition","Boolean","hasNamepathPosition","tagMightHaveNamepath","parseClosureTemplateTag","hasNamePosition","tagMightHaveName","inlineTag","text","namepathOrURL","iterateAllJsdocs","docs","url","schema","additionalProperties","properties","module"],"sources":["../../src/rules/validTypes.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n parse,\n parseName,\n parseNamePath,\n traverse,\n tryParse,\n} from '@es-joy/jsdoccomment';\n\nconst inlineTags = new Set([\n // Typdoc\n 'include', 'includeCode',\n // TSDoc\n 'inheritDoc',\n 'inheritdoc',\n 'label',\n // JSDoc\n 'link',\n 'linkcode', 'linkplain',\n 'tutorial',\n]);\n\nconst asExpression = /as\\s+/v;\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 'checkEs5InheritanceCorrectnessConditions',\n 'checkPrototypalTypes',\n 'checkRegExp',\n 'checkTypes',\n 'checkVars',\n 'closureClassChecks',\n 'closureDepMethodUsageChecks',\n 'const',\n 'constantProperty',\n 'dangerousUnrecognizedTypeError',\n 'deprecated',\n 'duplicate',\n 'es5Strict',\n 'externsValidation',\n 'extraProvide',\n 'extraRequire',\n 'globalThis',\n 'invalidCasts',\n 'lateProvide',\n 'legacyGoogScopeRequire',\n 'lintChecks',\n 'lintVarDeclarations',\n 'messageConventions',\n 'misplacedTypeAnnotation',\n 'missingOverride',\n 'missingPolyfill',\n 'missingProperties',\n 'missingProvide',\n 'missingRequire',\n 'missingReturn',\n 'missingSourcesWarnings',\n 'moduleLoad',\n 'msgDescriptions',\n 'nonStandardJsDocs',\n 'partialAlias',\n 'polymer',\n 'reportUnknownTypes',\n 'strictCheckTypes',\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\n // Not documented?\n 'unusedPrivateMembers',\n 'uselessCode',\n 'useOfGoogProvide',\n 'visibility',\n 'with',\n]);\n\n/**\n * @param {string} path\n * @param {import('jsdoc-type-pratt-parser').ParseMode|\"permissive\"} mode\n * @returns {boolean}\n */\nconst tryParsePathIgnoreError = (path, mode) => {\n try {\n parseNamePath(\n // Todo: Should avoid need for this by letting comment-parser parse default\n // values as such when they are not optional\n // Strip default value\n path.replace(/[=].*/v, ''),\n mode === 'permissive' ? 'jsdoc' : mode,\n {\n includeSpecial: true,\n },\n );\n\n return true;\n } catch {\n // Keep the original error for including the whole type\n }\n\n return false;\n};\n\n/**\n * @param {string} name\n * @param {import('jsdoc-type-pratt-parser').ParseMode} mode\n * @returns {boolean}\n */\nconst tryParseNameIgnoreError = (name, mode) => {\n try {\n parseName(name, mode);\n\n return true;\n } catch {\n // Keep the original error for including the whole type\n }\n\n return false;\n};\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n report,\n settings,\n utils,\n// eslint-disable-next-line complexity\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 /**\n * @param {string} namepath\n * @param {string} [tagName]\n * @returns {boolean}\n */\n const validNamepathParsing = function (namepath, tagName) {\n if (\n tryParsePathIgnoreError(namepath, mode)\n ) {\n return true;\n }\n\n let handled = false;\n\n if (tagName) {\n switch (tagName) {\n case 'memberof':\n case 'memberof!': {\n const endChar = namepath.slice(-1);\n if ([\n '#', '.', '~',\n ].includes(endChar)) {\n handled = tryParsePathIgnoreError(namepath.slice(0, -1), mode);\n }\n\n break;\n }\n\n case 'module': case 'requires': {\n if (!namepath.startsWith('module:')) {\n handled = tryParsePathIgnoreError(`module:${namepath}`, mode);\n }\n\n break;\n }\n\n case 'prop':\n case 'property': {\n if (mode === 'jsdoc' && (/^\\d+$/v).test(namepath)) {\n handled = true;\n }\n\n break;\n }\n\n case 'borrows': {\n const startChar = namepath.charAt(0);\n if ([\n '#', '.', '~',\n ].includes(startChar)) {\n handled = tryParsePathIgnoreError(namepath.slice(1), mode);\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 /**\n * @param {string} type\n * @returns {boolean}\n */\n const validTypeParsing = function (type) {\n let parsedTypes;\n try {\n if (mode === 'permissive') {\n parsedTypes = tryParse(type, undefined, {\n classContext: true,\n });\n } else {\n parsedTypes = parse(type, mode, {\n classContext: true,\n });\n }\n } catch {\n report(`Syntax error in type: ${type}`, null, tag);\n\n return false;\n }\n\n if (mode === 'closure' || mode === 'typescript') {\n traverse(parsedTypes, (node) => {\n const {\n type: typ,\n } = node;\n\n if (\n (typ === 'JsdocTypeObjectField' || typ === 'JsdocTypeKeyValue') &&\n node.right?.type === 'JsdocTypeNullable' &&\n node.right?.meta?.position === 'suffix'\n ) {\n report(`Syntax error in type: ${node.right.type}`, null, tag);\n }\n });\n }\n\n return true;\n };\n\n if (tag.problems.length) {\n const msg = tag.problems.reduce((str, {\n message,\n }) => {\n return str + '; ' + message;\n }, '').slice(2);\n report(`Invalid name: ${msg}`, null, tag);\n continue;\n }\n\n if (tag.tag === 'import') {\n // A named import will look like a type, but not be valid; we also don't\n // need to check the name/namepath\n continue;\n }\n\n if (tag.tag === 'borrows') {\n const thisNamepath = /** @type {string} */ (\n utils.getTagDescription(tag)\n ).replace(asExpression, '')\n .trim();\n\n if (!asExpression.test(/** @type {string} */ (\n utils.getTagDescription(tag)\n )) || !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 let type;\n if ('value' in node && typeof node.value === 'string') {\n type = node.value;\n }\n\n if (type !== undefined && !suppressTypes.has(type)) {\n report(`Syntax error in suppress type: ${type}`, null, tag);\n }\n });\n }\n }\n\n const otherModeMaps = /** @type {import('../jsdocUtils.js').ParserMode[]} */ ([\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 // Documentation like `@returns {@link SomeType}` is technically ambiguous. Specifically it\n // could either be intepreted as a type `\"@link SomeType\"` or a description `\"{@link SomeType}\"`.\n // However this is a good heuristic.\n if (tag.type.trim().startsWith('@')) {\n tag.description = `{${tag.type}} ${tag.description}`;\n tag.type = '';\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 'arg', 'argument', 'param',\n 'prop', 'property',\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 // Auto-added to settings and has own rule already, so don't duplicate\n tag.tag !== 'next'\n ) {\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 && (tag.type !== 'const' || tag.tag !== 'type')) {\n validTypeParsing(tag.type);\n }\n\n // VALID NAME/NAMEPATH\n const hasNamepathPosition = (\n tagMustHaveNamePosition !== false ||\n utils.tagMightHaveNamepath(tag.tag)\n ) && Boolean(tag.name);\n\n if (hasNamepathPosition) {\n if (mode !== 'jsdoc' && tag.tag === 'template') {\n if (!tryParsePathIgnoreError(\n // May be an issue with the commas of\n // `utils.parseClosureTemplateTag`, so first try a raw\n // value; we really need a proper parser instead, however.\n tag.name.trim().replace(/^\\[?(?<name>.*?)=.*$/v, '$<name>'),\n mode,\n )) {\n for (const namepath of utils.parseClosureTemplateTag(tag)) {\n validNamepathParsing(namepath);\n }\n }\n } else {\n validNamepathParsing(tag.name, tag.tag);\n }\n }\n\n const hasNamePosition = utils.tagMightHaveName(tag.tag) &&\n Boolean(tag.name);\n if (\n hasNamePosition &&\n mode === 'typescript' &&\n !tryParseNameIgnoreError(tag.name, mode)\n ) {\n report(`Syntax error in name: ${tag.name}`, null, tag);\n } else if (hasNamePosition && mode !== 'typescript') {\n validNamepathParsing(tag.name, tag.tag);\n }\n\n for (const inlineTag of tag.inlineTags) {\n if (inlineTags.has(inlineTag.tag) && !inlineTag.text && !inlineTag.namepathOrURL) {\n report(`Inline tag \"${inlineTag.tag}\" missing content`, null, tag);\n }\n }\n }\n\n for (const inlineTag of jsdoc.inlineTags) {\n if (inlineTags.has(inlineTag.tag) && !inlineTag.text && !inlineTag.namepathOrURL) {\n report(`Inline tag \"${inlineTag.tag}\" missing content`);\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires all types/namepaths to be valid JSDoc, Closure compiler, or TypeScript types (configurable in settings).',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowEmptyNamepaths: {\n default: false,\n description: `Set to \\`false\\` to bulk disallow\nempty name paths with namepath groups 2 and 4 (these might often be\nexpected to have an accompanying name path, though they have some\nindicative value without one; these may also allow names to be defined\nin another manner elsewhere in the block); you can use\n\\`settings.jsdoc.structuredTags\\` with the \\`required\\` key set to \"name\" if you\nwish to require name paths on a tag-by-tag basis. Defaults to \\`true\\`.`,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAM8B,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9B,MAAMG,UAAU,GAAG,IAAIC,GAAG,CAAC;AACzB;AACA,SAAS,EAAE,aAAa;AACxB;AACA,YAAY,EACZ,YAAY,EACZ,OAAO;AACP;AACA,MAAM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AAA,CAAA7E,OAAA,GAAAA,OAAA,CAAAf,OAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"validTypes.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","_jsdoccomment","e","__esModule","default","inlineTags","Set","asExpression","suppressTypes","tryParsePathIgnoreError","path","mode","parseNamePath","includeSpecial","tryParseNameIgnoreError","name","parseName","_default","exports","iterateJsdoc","context","jsdoc","report","settings","utils","allowEmptyNamepaths","options","tag","tags","validNamepathParsing","namepath","tagName","handled","endChar","slice","includes","startsWith","test","startChar","charAt","validTypeParsing","type","parsedTypes","tryParse","undefined","classContext","parse","traverse","node","typ","right","meta","position","problems","length","msg","reduce","str","message","thisNamepath","getTagDescription","replace","trim","thatNamepath","value","has","otherModeMaps","filter","mde","map","getTagStructureForMode","tagMightHaveNamePosition","modeInfo","description","mightHaveTypePosition","tagMightHaveTypePosition","tagMustHaveNamePosition","mustHaveTypePosition","tagMustHaveTypePosition","tagMissingRequiredTypeOrNamepath","hasTypePosition","Boolean","hasNamepathPosition","tagMightHaveNamepath","parseClosureTemplateTag","hasNamePosition","tagMightHaveName","inlineTag","text","namepathOrURL","iterateAllJsdocs","docs","url","schema","additionalProperties","properties","module"],"sources":["../../src/rules/validTypes.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport {\n parse,\n parseName,\n parseNamePath,\n traverse,\n tryParse,\n} from '@es-joy/jsdoccomment';\n\nconst inlineTags = new Set([\n // Typdoc\n 'include', 'includeCode',\n // TSDoc\n 'inheritDoc',\n 'inheritdoc',\n 'label',\n // JSDoc\n 'link',\n 'linkcode', 'linkplain',\n 'tutorial',\n]);\n\nconst asExpression = /as\\s+/v;\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 'checkEs5InheritanceCorrectnessConditions',\n 'checkPrototypalTypes',\n 'checkRegExp',\n 'checkTypes',\n 'checkVars',\n 'closureClassChecks',\n 'closureDepMethodUsageChecks',\n 'const',\n 'constantProperty',\n 'dangerousUnrecognizedTypeError',\n 'deprecated',\n 'duplicate',\n 'es5Strict',\n 'externsValidation',\n 'extraProvide',\n 'extraRequire',\n 'globalThis',\n 'invalidCasts',\n 'lateProvide',\n 'legacyGoogScopeRequire',\n 'lintChecks',\n 'lintVarDeclarations',\n 'messageConventions',\n 'misplacedTypeAnnotation',\n 'missingOverride',\n 'missingPolyfill',\n 'missingProperties',\n 'missingProvide',\n 'missingRequire',\n 'missingReturn',\n 'missingSourcesWarnings',\n 'moduleLoad',\n 'msgDescriptions',\n 'nonStandardJsDocs',\n 'partialAlias',\n 'polymer',\n 'reportUnknownTypes',\n 'strictCheckTypes',\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\n // Not documented?\n 'unusedPrivateMembers',\n 'uselessCode',\n 'useOfGoogProvide',\n 'visibility',\n 'with',\n]);\n\n/**\n * @param {string} path\n * @param {import('jsdoc-type-pratt-parser').ParseMode|\"permissive\"} mode\n * @returns {boolean}\n */\nconst tryParsePathIgnoreError = (path, mode) => {\n try {\n parseNamePath(\n path,\n mode === 'permissive' ? 'jsdoc' : mode,\n {\n includeSpecial: true,\n },\n );\n\n return true;\n } catch {\n // Keep the original error for including the whole type\n }\n\n return false;\n};\n\n/**\n * @param {string} name\n * @param {import('jsdoc-type-pratt-parser').ParseMode} mode\n * @returns {boolean}\n */\nconst tryParseNameIgnoreError = (name, mode) => {\n try {\n parseName(name, mode);\n\n return true;\n } catch {\n // Keep the original error for including the whole type\n }\n\n return false;\n};\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n report,\n settings,\n utils,\n// eslint-disable-next-line complexity\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 /**\n * @param {string} namepath\n * @param {string} [tagName]\n * @returns {boolean}\n */\n const validNamepathParsing = function (namepath, tagName) {\n if (\n tryParsePathIgnoreError(namepath, mode)\n ) {\n return true;\n }\n\n let handled = false;\n\n if (tagName) {\n switch (tagName) {\n case 'memberof':\n case 'memberof!': {\n const endChar = namepath.slice(-1);\n if ([\n '#', '.', '~',\n ].includes(endChar)) {\n handled = tryParsePathIgnoreError(namepath.slice(0, -1), mode);\n }\n\n break;\n }\n\n case 'module': case 'requires': {\n if (!namepath.startsWith('module:')) {\n handled = tryParsePathIgnoreError(`module:${namepath}`, mode);\n }\n\n break;\n }\n\n case 'prop':\n case 'property': {\n if (mode === 'jsdoc' && (/^\\d+$/v).test(namepath)) {\n handled = true;\n }\n\n break;\n }\n\n case 'borrows': {\n const startChar = namepath.charAt(0);\n if ([\n '#', '.', '~',\n ].includes(startChar)) {\n handled = tryParsePathIgnoreError(namepath.slice(1), mode);\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 /**\n * @param {string} type\n * @returns {boolean}\n */\n const validTypeParsing = function (type) {\n let parsedTypes;\n try {\n if (mode === 'permissive') {\n parsedTypes = tryParse(type, undefined, {\n classContext: true,\n });\n } else {\n parsedTypes = parse(type, mode, {\n classContext: true,\n });\n }\n } catch {\n report(`Syntax error in type: ${type}`, null, tag);\n\n return false;\n }\n\n if (mode === 'closure' || mode === 'typescript') {\n traverse(parsedTypes, (node) => {\n const {\n type: typ,\n } = node;\n\n if (\n (typ === 'JsdocTypeObjectField' || typ === 'JsdocTypeKeyValue') &&\n node.right?.type === 'JsdocTypeNullable' &&\n node.right?.meta?.position === 'suffix'\n ) {\n report(`Syntax error in type: ${node.right.type}`, null, tag);\n }\n });\n }\n\n return true;\n };\n\n if (tag.problems.length) {\n const msg = tag.problems.reduce((str, {\n message,\n }) => {\n return str + '; ' + message;\n }, '').slice(2);\n report(`Invalid name: ${msg}`, null, tag);\n continue;\n }\n\n if (tag.tag === 'import') {\n // A named import will look like a type, but not be valid; we also don't\n // need to check the name/namepath\n continue;\n }\n\n if (tag.tag === 'borrows') {\n const thisNamepath = /** @type {string} */ (\n utils.getTagDescription(tag)\n ).replace(asExpression, '')\n .trim();\n\n if (!asExpression.test(/** @type {string} */ (\n utils.getTagDescription(tag)\n )) || !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 let type;\n if ('value' in node && typeof node.value === 'string') {\n type = node.value;\n }\n\n if (type !== undefined && !suppressTypes.has(type)) {\n report(`Syntax error in suppress type: ${type}`, null, tag);\n }\n });\n }\n }\n\n const otherModeMaps = /** @type {import('../jsdocUtils.js').ParserMode[]} */ ([\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 // Documentation like `@returns {@link SomeType}` is technically ambiguous. Specifically it\n // could either be intepreted as a type `\"@link SomeType\"` or a description `\"{@link SomeType}\"`.\n // However this is a good heuristic.\n if (tag.type.trim().startsWith('@')) {\n tag.description = `{${tag.type}} ${tag.description}`;\n tag.type = '';\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 'arg', 'argument', 'param',\n 'prop', 'property',\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 // Auto-added to settings and has own rule already, so don't duplicate\n tag.tag !== 'next'\n ) {\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 && (tag.type !== 'const' || tag.tag !== 'type')) {\n validTypeParsing(tag.type);\n }\n\n // VALID NAME/NAMEPATH\n const hasNamepathPosition = (\n tagMustHaveNamePosition !== false ||\n utils.tagMightHaveNamepath(tag.tag)\n ) && Boolean(tag.name);\n\n if (hasNamepathPosition) {\n if (mode !== 'jsdoc' && tag.tag === 'template') {\n if (!tryParsePathIgnoreError(\n // May be an issue with the commas of\n // `utils.parseClosureTemplateTag`, so first try a raw\n // value; we really need a proper parser instead, however.\n tag.name.trim().replace(/^\\[?(?<name>.*?)=.*$/v, '$<name>'),\n mode,\n )) {\n for (const namepath of utils.parseClosureTemplateTag(tag)) {\n validNamepathParsing(namepath);\n }\n }\n } else {\n validNamepathParsing(tag.name, tag.tag);\n }\n }\n\n const hasNamePosition = utils.tagMightHaveName(tag.tag) &&\n Boolean(tag.name);\n if (\n hasNamePosition &&\n mode === 'typescript' &&\n !tryParseNameIgnoreError(tag.name, mode)\n ) {\n report(`Syntax error in name: ${tag.name}`, null, tag);\n } else if (hasNamePosition && mode !== 'typescript') {\n validNamepathParsing(tag.name, tag.tag);\n }\n\n for (const inlineTag of tag.inlineTags) {\n if (inlineTags.has(inlineTag.tag) && !inlineTag.text && !inlineTag.namepathOrURL) {\n report(`Inline tag \"${inlineTag.tag}\" missing content`, null, tag);\n }\n }\n }\n\n for (const inlineTag of jsdoc.inlineTags) {\n if (inlineTags.has(inlineTag.tag) && !inlineTag.text && !inlineTag.namepathOrURL) {\n report(`Inline tag \"${inlineTag.tag}\" missing content`);\n }\n }\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires all types/namepaths to be valid JSDoc, Closure compiler, or TypeScript types (configurable in settings).',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n allowEmptyNamepaths: {\n default: false,\n description: `Set to \\`false\\` to bulk disallow\nempty name paths with namepath groups 2 and 4 (these might often be\nexpected to have an accompanying name path, though they have some\nindicative value without one; these may also allow names to be defined\nin another manner elsewhere in the block); you can use\n\\`settings.jsdoc.structuredTags\\` with the \\`required\\` key set to \"name\" if you\nwish to require name paths on a tag-by-tag basis. Defaults to \\`true\\`.`,\n type: 'boolean',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAM8B,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9B,MAAMG,UAAU,GAAG,IAAIC,GAAG,CAAC;AACzB;AACA,SAAS,EAAE,aAAa;AACxB;AACA,YAAY,EACZ,YAAY,EACZ,OAAO;AACP;AACA,MAAM,EACN,UAAU,EAAE,WAAW,EACvB,UAAU,CACX,CAAC;AAEF,MAAMC,YAAY,GAAG,QAAQ;AAE7B,MAAMC,aAAa,GAAG,IAAIF,GAAG,CAAC;AAC5B;AACA;AACA,gBAAgB,EAChB,wBAAwB,EACxB,0CAA0C,EAC1C,sBAAsB,EACtB,aAAa,EACb,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,6BAA6B,EAC7B,OAAO,EACP,kBAAkB,EAClB,gCAAgC,EAChC,YAAY,EACZ,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,cAAc,EACd,aAAa,EACb,wBAAwB,EACxB,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,SAAS,EAC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AAI,CAACD,SAAS,CAACE,aAAa,EAAE;MAChFnE,MAAM,CAAC,eAAeiE,SAAS,CAAC5D,GAAG,mBAAmB,CAAC;IACzD;EACF;AACF,CAAC,EAAE;EACD+D,gBAAgB,EAAE,IAAI;EACtBvC,IAAI,EAAE;IACJwC,IAAI,EAAE;MACJlB,WAAW,EAAE,mHAAmH;MAChImB,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVtE,mBAAmB,EAAE;UACnBrB,OAAO,EAAE,KAAK;UACdqE,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA,wEAAwE;UAC5DhC,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAuD,MAAA,CAAA9E,OAAA,GAAAA,OAAA,CAAAd,OAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -5,79 +5,78 @@
|
|
|
5
5
|
"url": "http://gajus.com"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@es-joy/jsdoccomment": "~0.
|
|
8
|
+
"@es-joy/jsdoccomment": "~0.86.0",
|
|
9
9
|
"@es-joy/resolve.exports": "1.2.0",
|
|
10
10
|
"are-docs-informative": "^0.0.2",
|
|
11
|
-
"comment-parser": "1.4.
|
|
11
|
+
"comment-parser": "1.4.6",
|
|
12
12
|
"debug": "^4.4.3",
|
|
13
13
|
"escape-string-regexp": "^4.0.0",
|
|
14
|
-
"espree": "^11.
|
|
14
|
+
"espree": "^11.2.0",
|
|
15
15
|
"esquery": "^1.7.0",
|
|
16
16
|
"html-entities": "^2.6.0",
|
|
17
17
|
"object-deep-merge": "^2.0.0",
|
|
18
18
|
"parse-imports-exports": "^0.2.4",
|
|
19
|
-
"semver": "^7.
|
|
19
|
+
"semver": "^7.8.0",
|
|
20
20
|
"spdx-expression-parse": "^4.0.0",
|
|
21
21
|
"to-valid-identifier": "^1.0.0"
|
|
22
22
|
},
|
|
23
23
|
"description": "JSDoc linting rules for ESLint.",
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
26
|
-
"@babel/cli": "
|
|
27
|
-
"@babel/core": "8.0.0-rc.
|
|
28
|
-
"@babel/eslint-parser": "8.0.0-rc.
|
|
29
|
-
"@babel/plugin-transform-flow-strip-types": "8.0.0-rc.
|
|
30
|
-
"@babel/preset-env": "8.0.0-rc.
|
|
26
|
+
"@babel/cli": "8.0.0-rc.5",
|
|
27
|
+
"@babel/core": "8.0.0-rc.5",
|
|
28
|
+
"@babel/eslint-parser": "8.0.0-rc.5",
|
|
29
|
+
"@babel/plugin-transform-flow-strip-types": "8.0.0-rc.5",
|
|
30
|
+
"@babel/preset-env": "8.0.0-rc.5",
|
|
31
31
|
"@es-joy/escodegen": "^4.2.0",
|
|
32
32
|
"@es-joy/jsdoc-eslint-parser": "^0.27.0",
|
|
33
|
-
"@eslint/core": "^1.1
|
|
33
|
+
"@eslint/core": "^1.2.1",
|
|
34
34
|
"@hkdobrev/run-if-changed": "^0.6.3",
|
|
35
35
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
36
36
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
37
|
-
"@semantic-release/github": "^12.0.
|
|
38
|
-
"@semantic-release/npm": "^13.1.
|
|
37
|
+
"@semantic-release/github": "^12.0.8",
|
|
38
|
+
"@semantic-release/npm": "^13.1.5",
|
|
39
39
|
"@types/chai": "^5.2.3",
|
|
40
|
-
"@types/debug": "^4.1.
|
|
41
|
-
"@types/espree": "^10.1.0",
|
|
40
|
+
"@types/debug": "^4.1.13",
|
|
42
41
|
"@types/esquery": "^1.5.4",
|
|
43
|
-
"@types/estree": "^1.0.
|
|
42
|
+
"@types/estree": "^1.0.9",
|
|
44
43
|
"@types/json-schema": "^7.0.15",
|
|
45
44
|
"@types/mocha": "^10.0.10",
|
|
46
|
-
"@types/node": "^25.
|
|
45
|
+
"@types/node": "^25.9.0",
|
|
47
46
|
"@types/semver": "^7.7.1",
|
|
48
|
-
"@types/spdx-expression-parse": "^
|
|
49
|
-
"@typescript-eslint/types": "8.
|
|
47
|
+
"@types/spdx-expression-parse": "^4.0.0",
|
|
48
|
+
"@typescript-eslint/types": "8.59.4",
|
|
50
49
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
51
|
-
"babel-plugin-istanbul": "^
|
|
50
|
+
"babel-plugin-istanbul": "^8.0.0",
|
|
52
51
|
"babel-plugin-transform-import-meta": "^2.3.3",
|
|
53
|
-
"c8": "^
|
|
52
|
+
"c8": "^11.0.0",
|
|
54
53
|
"camelcase": "^9.0.0",
|
|
55
54
|
"chai": "^6.2.2",
|
|
56
55
|
"decamelize": "^6.0.1",
|
|
57
|
-
"eslint": "10.
|
|
56
|
+
"eslint": "10.4.0",
|
|
58
57
|
"eslint-config-canonical": "^47.4.2",
|
|
59
58
|
"gitdown": "^4.1.1",
|
|
60
|
-
"glob": "^13.0.
|
|
61
|
-
"globals": "^17.
|
|
59
|
+
"glob": "^13.0.6",
|
|
60
|
+
"globals": "^17.6.0",
|
|
62
61
|
"husky": "^9.1.7",
|
|
63
|
-
"jsdoc-type-pratt-parser": "^7.
|
|
62
|
+
"jsdoc-type-pratt-parser": "^7.2.0",
|
|
64
63
|
"json-schema": "^0.4.0",
|
|
65
64
|
"json-schema-to-typescript": "^15.0.4",
|
|
66
|
-
"lint-staged": "^
|
|
65
|
+
"lint-staged": "^17.0.5",
|
|
67
66
|
"mocha": "^11.7.5",
|
|
68
67
|
"open-editor": "^6.0.0",
|
|
69
|
-
"playwright": "^1.
|
|
68
|
+
"playwright": "^1.60.0",
|
|
70
69
|
"replace": "^1.2.2",
|
|
71
70
|
"rimraf": "^6.1.3",
|
|
72
|
-
"rollup": "^4.
|
|
71
|
+
"rollup": "^4.60.4",
|
|
73
72
|
"semantic-release": "^25.0.3",
|
|
74
|
-
"sinon": "^
|
|
75
|
-
"ts-api-utils": "^2.
|
|
73
|
+
"sinon": "^22.0.0",
|
|
74
|
+
"ts-api-utils": "^2.5.0",
|
|
76
75
|
"typescript": "5.9.3",
|
|
77
|
-
"typescript-eslint": "8.
|
|
76
|
+
"typescript-eslint": "8.59.4"
|
|
78
77
|
},
|
|
79
78
|
"engines": {
|
|
80
|
-
"node": "^
|
|
79
|
+
"node": "^22.13.0 || >=24"
|
|
81
80
|
},
|
|
82
81
|
"keywords": [
|
|
83
82
|
"eslint",
|
|
@@ -159,18 +158,6 @@
|
|
|
159
158
|
"run-if-changed": {
|
|
160
159
|
"pnpm-lock.yaml": "pnpm run install-offline"
|
|
161
160
|
},
|
|
162
|
-
"pnpm": {
|
|
163
|
-
"overrides": {
|
|
164
|
-
"@types/eslint": "0.0.0-interferes-with-eslint-now",
|
|
165
|
-
"eslint-scope": "9.1.0"
|
|
166
|
-
},
|
|
167
|
-
"ignoredBuiltDependencies": [
|
|
168
|
-
"core-js",
|
|
169
|
-
"core-js-pure",
|
|
170
|
-
"re2",
|
|
171
|
-
"unrs-resolver"
|
|
172
|
-
]
|
|
173
|
-
},
|
|
174
161
|
"scripts": {
|
|
175
162
|
"ruleTypes": "node ./src/bin/generateRuleTypes.js",
|
|
176
163
|
"tsc": "tsc",
|
|
@@ -183,7 +170,7 @@
|
|
|
183
170
|
"create-docs": "pnpm run create-options && node ./src/bin/generateDocs.js && pnpm ruleTypes",
|
|
184
171
|
"create-rule": "node ./src/bin/generateRule.js",
|
|
185
172
|
"create-options": "node ./src/bin/generateOptions.js",
|
|
186
|
-
"install-offline": "pnpm install --prefer-offline",
|
|
173
|
+
"install-offline": "CI=1 pnpm install --prefer-offline --no-frozen-lockfile",
|
|
187
174
|
"lint": "eslint",
|
|
188
175
|
"lint-fix": "eslint --fix",
|
|
189
176
|
"prepare": "husky",
|
|
@@ -192,5 +179,5 @@
|
|
|
192
179
|
"test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
|
|
193
180
|
"test-index": "pnpm run test-no-cov test/rules/index.js"
|
|
194
181
|
},
|
|
195
|
-
"version": "
|
|
182
|
+
"version": "63.0.0"
|
|
196
183
|
}
|
package/src/exportParser.js
CHANGED
|
@@ -282,7 +282,7 @@ const getSymbol = function (node, globals, scope, opt) {
|
|
|
282
282
|
/* c8 ignore next 8 */
|
|
283
283
|
if (propVal) {
|
|
284
284
|
val.props[
|
|
285
|
-
/** @type {import('estree').
|
|
285
|
+
/** @type {import('estree').Identifier} */
|
|
286
286
|
(
|
|
287
287
|
/** @type {import('estree').Property} */ (prop).key
|
|
288
288
|
).name
|
package/src/iterateJsdoc.js
CHANGED
|
@@ -337,6 +337,7 @@ import esquery from 'esquery';
|
|
|
337
337
|
|
|
338
338
|
/**
|
|
339
339
|
* @callback AvoidDocs
|
|
340
|
+
* @param {boolean} [exemptSpecialMethods]
|
|
340
341
|
* @returns {boolean}
|
|
341
342
|
*/
|
|
342
343
|
|
|
@@ -1462,7 +1463,9 @@ const getUtils = (
|
|
|
1462
1463
|
};
|
|
1463
1464
|
|
|
1464
1465
|
/** @type {AvoidDocs} */
|
|
1465
|
-
utils.avoidDocs = (
|
|
1466
|
+
utils.avoidDocs = (
|
|
1467
|
+
exemptSpecialMethods = true,
|
|
1468
|
+
) => {
|
|
1466
1469
|
if (
|
|
1467
1470
|
ignoreReplacesDocs !== false &&
|
|
1468
1471
|
(utils.hasTag('ignore') || utils.classHasTag('ignore')) ||
|
|
@@ -1480,7 +1483,7 @@ const getUtils = (
|
|
|
1480
1483
|
return true;
|
|
1481
1484
|
}
|
|
1482
1485
|
|
|
1483
|
-
if (jsdocUtils.exemptSpeciaMethods(
|
|
1486
|
+
if (exemptSpecialMethods && jsdocUtils.exemptSpeciaMethods(
|
|
1484
1487
|
jsdoc,
|
|
1485
1488
|
node,
|
|
1486
1489
|
context,
|
package/src/rules/validTypes.js
CHANGED
|
@@ -96,10 +96,7 @@ const suppressTypes = new Set([
|
|
|
96
96
|
const tryParsePathIgnoreError = (path, mode) => {
|
|
97
97
|
try {
|
|
98
98
|
parseNamePath(
|
|
99
|
-
|
|
100
|
-
// values as such when they are not optional
|
|
101
|
-
// Strip default value
|
|
102
|
-
path.replace(/[=].*/v, ''),
|
|
99
|
+
path,
|
|
103
100
|
mode === 'permissive' ? 'jsdoc' : mode,
|
|
104
101
|
{
|
|
105
102
|
includeSpecial: true,
|