eslint-plugin-jsdoc 60.5.0 → 60.7.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 +2 -0
- package/dist/cjs/jsdocUtils.d.ts +1 -0
- package/dist/cjs/rules/escapeInlineTags.d.ts +2 -0
- package/dist/generateDocs.cjs +5 -6
- package/dist/generateDocs.cjs.map +1 -1
- package/dist/index-cjs.cjs +4 -1
- package/dist/index-cjs.cjs.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/jsdocUtils.cjs +3 -2
- package/dist/jsdocUtils.cjs.map +1 -1
- package/dist/jsdocUtils.d.ts +1 -0
- package/dist/rules/checkLineAlignment.cjs +1 -2
- package/dist/rules/checkLineAlignment.cjs.map +1 -1
- package/dist/rules/checkTypes.cjs +2 -3
- package/dist/rules/checkTypes.cjs.map +1 -1
- package/dist/rules/convertToJsdocComments.cjs +2 -4
- package/dist/rules/convertToJsdocComments.cjs.map +1 -1
- package/dist/rules/emptyTags.cjs +1 -2
- package/dist/rules/emptyTags.cjs.map +1 -1
- package/dist/rules/escapeInlineTags.cjs +149 -0
- package/dist/rules/escapeInlineTags.cjs.map +1 -0
- package/dist/rules/escapeInlineTags.d.ts +3 -0
- package/dist/rules/informativeDocs.cjs +3 -6
- package/dist/rules/informativeDocs.cjs.map +1 -1
- package/dist/rules/linesBeforeBlock.cjs +4 -8
- package/dist/rules/linesBeforeBlock.cjs.map +1 -1
- package/dist/rules/matchDescription.cjs +2 -4
- package/dist/rules/matchDescription.cjs.map +1 -1
- package/dist/rules/matchName.cjs +1 -2
- package/dist/rules/matchName.cjs.map +1 -1
- package/dist/rules/multilineBlocks.cjs +3 -6
- package/dist/rules/multilineBlocks.cjs.map +1 -1
- package/dist/rules/noBadBlocks.cjs +1 -2
- package/dist/rules/noBadBlocks.cjs.map +1 -1
- package/dist/rules/noTypes.cjs +1 -2
- package/dist/rules/noTypes.cjs.map +1 -1
- package/dist/rules/preferImportTag.cjs +6 -2
- package/dist/rules/preferImportTag.cjs.map +1 -1
- package/dist/rules/requireAsteriskPrefix.cjs +1 -2
- package/dist/rules/requireAsteriskPrefix.cjs.map +1 -1
- package/dist/rules/requireDescriptionCompleteSentence.cjs +1 -2
- package/dist/rules/requireDescriptionCompleteSentence.cjs.map +1 -1
- package/dist/rules/requireFileOverview.cjs +1 -3
- package/dist/rules/requireFileOverview.cjs.map +1 -1
- package/dist/rules/requireHyphenBeforeParamDescription.cjs +1 -2
- package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +1 -1
- package/dist/rules/requireJsdoc.cjs +3 -6
- package/dist/rules/requireJsdoc.cjs.map +1 -1
- package/dist/rules/requireParam.cjs +6 -12
- package/dist/rules/requireParam.cjs.map +1 -1
- package/dist/rules/requireParamName.cjs +1 -2
- package/dist/rules/requireParamName.cjs.map +1 -1
- package/dist/rules/requireReturns.cjs +1 -2
- package/dist/rules/requireReturns.cjs.map +1 -1
- package/dist/rules/requireReturnsCheck.cjs +13 -1
- package/dist/rules/requireReturnsCheck.cjs.map +1 -1
- package/dist/rules/requireTemplate.cjs +1 -2
- package/dist/rules/requireTemplate.cjs.map +1 -1
- package/dist/rules/sortTags.cjs +1 -2
- package/dist/rules/sortTags.cjs.map +1 -1
- package/dist/rules.d.ts +30 -37
- package/package.json +9 -9
- package/src/index-cjs.js +4 -0
- package/src/index.js +4 -0
- package/src/jsdocUtils.js +17 -1
- package/src/rules/checkLineAlignment.js +1 -2
- package/src/rules/checkTypes.js +3 -15
- package/src/rules/convertToJsdocComments.js +2 -4
- package/src/rules/emptyTags.js +1 -2
- package/src/rules/escapeInlineTags.js +189 -0
- package/src/rules/informativeDocs.js +3 -6
- package/src/rules/linesBeforeBlock.js +4 -8
- package/src/rules/matchDescription.js +2 -4
- package/src/rules/matchName.js +1 -2
- package/src/rules/multilineBlocks.js +3 -6
- package/src/rules/noBadBlocks.js +1 -2
- package/src/rules/noTypes.js +1 -2
- package/src/rules/preferImportTag.js +8 -3
- package/src/rules/requireAsteriskPrefix.js +1 -2
- package/src/rules/requireDescriptionCompleteSentence.js +1 -2
- package/src/rules/requireFileOverview.js +1 -3
- package/src/rules/requireHyphenBeforeParamDescription.js +1 -2
- package/src/rules/requireJsdoc.js +3 -6
- package/src/rules/requireParam.js +6 -12
- package/src/rules/requireParamName.js +1 -2
- package/src/rules/requireReturns.js +1 -2
- package/src/rules/requireReturnsCheck.js +16 -1
- package/src/rules/requireTemplate.js +1 -2
- package/src/rules/sortTags.js +1 -2
- package/src/rules.d.ts +30 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortTags.cjs","names":["_defaultTagOrder","_interopRequireDefault","require","_iterateJsdoc","e","__esModule","default","_default","exports","iterateJsdoc","context","jsdoc","utils","alphabetizeExtras","linesBetween","reportIntraTagGroupSpacing","reportTagGroupSpacing","tagSequence","defaultTagOrder","options","tagList","flatMap","obj","tags","otherPos","indexOf","endPos","length","ongoingCount","idx","tag","entries","originalIndex","source","originalLine","firstChangedTagLine","firstChangedTagIndex","sortedTags","JSON","parse","stringify","sort","tagNew","tagOld","checkOrSetFirstChanged","newPos","oldPos","preferredNewPos","preferredOldPos","undefined","lastTagsOfGroup","badLastTagsOfGroup","countTagEmptyLines","reduce","acc","tokens","description","end","name","tg","type","empty","Number","innerIdx","currentTag","lastTag","includes","some","tgs","push","ct","fixer","currIdx","newIdx","emptyLine","number","seedTokens","delimiter","start","existingEmptyLines","nextTokens","lineDiff","lines","Array","from","splice","srcIdx","src","reportJSDoc","tagIdx","foundFirstTag","nextIdx","ignore","lastTagOfGroup","firstLine","getFirstLine","fix","itemsToMoveRange","keys","unchangedPriorTagDescriptions","slice","initialOffset","removeTag","changedTags","extraTagCount","changedTag","addTag","addLine","join","iterateAllJsdocs","meta","docs","url","fixable","schema","additionalProperties","properties","items","module"],"sources":["../../src/rules/sortTags.js"],"sourcesContent":["import defaultTagOrder from '../defaultTagOrder.js';\nimport iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n utils,\n}) => {\n const\n /**\n * @type {{\n * linesBetween: import('../iterateJsdoc.js').Integer,\n * tagSequence: {\n * tags: string[]\n * }[],\n * alphabetizeExtras: boolean,\n * reportTagGroupSpacing: boolean,\n * reportIntraTagGroupSpacing: boolean,\n * }}\n */ {\n alphabetizeExtras = false,\n linesBetween = 1,\n reportIntraTagGroupSpacing = true,\n reportTagGroupSpacing = true,\n tagSequence = defaultTagOrder,\n } = context.options[0] || {};\n\n const tagList = tagSequence.flatMap((obj) => {\n /* typeof obj === 'string' ? obj : */\n return obj.tags;\n });\n\n const otherPos = tagList.indexOf('-other');\n const endPos = otherPos > -1 ? otherPos : tagList.length;\n\n let ongoingCount = 0;\n for (const [\n idx,\n tag,\n ] of\n /**\n * @type {(\n * import('@es-joy/jsdoccomment').JsdocTagWithInline & {\n * originalIndex: import('../iterateJsdoc.js').Integer,\n * originalLine: import('../iterateJsdoc.js').Integer,\n * }\n * )[]}\n */ (jsdoc.tags).entries()) {\n tag.originalIndex = idx;\n ongoingCount += tag.source.length;\n tag.originalLine = ongoingCount;\n }\n\n /** @type {import('../iterateJsdoc.js').Integer|undefined} */\n let firstChangedTagLine;\n /** @type {import('../iterateJsdoc.js').Integer|undefined} */\n let firstChangedTagIndex;\n\n /**\n * @type {(import('comment-parser').Spec & {\n * originalIndex: import('../iterateJsdoc.js').Integer,\n * originalLine: import('../iterateJsdoc.js').Integer,\n * })[]}\n */\n const sortedTags = JSON.parse(JSON.stringify(jsdoc.tags));\n sortedTags.sort(({\n tag: tagNew,\n }, {\n originalIndex,\n originalLine,\n tag: tagOld,\n }) => {\n // Optimize: Just keep relative positions if the same tag name\n if (tagNew === tagOld) {\n return 0;\n }\n\n const checkOrSetFirstChanged = () => {\n if (!firstChangedTagLine || originalLine < firstChangedTagLine) {\n firstChangedTagLine = originalLine;\n firstChangedTagIndex = originalIndex;\n }\n };\n\n const newPos = tagList.indexOf(tagNew);\n const oldPos = tagList.indexOf(tagOld);\n\n const preferredNewPos = newPos === -1 ? endPos : newPos;\n const preferredOldPos = oldPos === -1 ? endPos : oldPos;\n\n if (preferredNewPos < preferredOldPos) {\n checkOrSetFirstChanged();\n return -1;\n }\n\n if (preferredNewPos > preferredOldPos) {\n return 1;\n }\n\n // preferredNewPos === preferredOldPos\n if (\n !alphabetizeExtras ||\n\n // Optimize: If tagNew (or tagOld which is the same) was found in the\n // priority array, it can maintain its relative position—without need\n // of alphabetizing (secondary sorting)\n newPos >= 0\n ) {\n return 0;\n }\n\n if (tagNew < tagOld) {\n checkOrSetFirstChanged();\n return -1;\n }\n\n // tagNew > tagOld\n return 1;\n });\n\n if (firstChangedTagLine === undefined) {\n // Should be ordered by now\n\n /**\n * @type {import('comment-parser').Spec[]}\n */\n const lastTagsOfGroup = [];\n\n /**\n * @type {[\n * import('comment-parser').Spec,\n * import('../iterateJsdoc.js').Integer\n * ][]}\n */\n const badLastTagsOfGroup = [];\n\n /**\n * @param {import('comment-parser').Spec} tag\n */\n const countTagEmptyLines = (tag) => {\n return tag.source.reduce((acc, {\n tokens: {\n description,\n end,\n name,\n tag: tg,\n type,\n },\n }) => {\n const empty = !tg && !type && !name && !description;\n // Reset the count so long as there is content\n return empty ? acc + Number(empty && !end) : 0;\n }, 0);\n };\n\n let idx = 0;\n for (const {\n tags,\n } of tagSequence) {\n let innerIdx;\n /** @type {import('comment-parser').Spec} */\n let currentTag;\n /** @type {import('comment-parser').Spec|undefined} */\n let lastTag;\n do {\n currentTag = jsdoc.tags[idx];\n if (!currentTag) {\n idx++;\n break;\n }\n\n innerIdx = tags.indexOf(currentTag.tag);\n\n if (\n innerIdx === -1 &&\n // eslint-disable-next-line no-loop-func -- Safe\n (!tags.includes('-other') || tagSequence.some(({\n tags: tgs,\n }) => {\n return tgs.includes(currentTag.tag);\n }))\n ) {\n idx++;\n break;\n }\n\n lastTag = currentTag;\n\n idx++;\n } while (true);\n\n idx--;\n\n if (lastTag) {\n lastTagsOfGroup.push(lastTag);\n const ct = countTagEmptyLines(lastTag);\n if (\n ct !== linesBetween &&\n // Use another rule for adding to end (should be of interest outside this rule)\n jsdoc.tags[idx]\n ) {\n badLastTagsOfGroup.push([\n lastTag, ct,\n ]);\n }\n }\n }\n\n if (reportTagGroupSpacing && badLastTagsOfGroup.length) {\n /**\n * @param {import('comment-parser').Spec} tg\n * @returns {() => void}\n */\n const fixer = (tg) => {\n return () => {\n // Due to https://github.com/syavorsky/comment-parser/issues/110 ,\n // we have to modify `jsdoc.source` rather than just modify tags\n // directly\n for (const [\n currIdx,\n {\n tokens,\n },\n ] of jsdoc.source.entries()) {\n if (tokens.tag !== '@' + tg.tag) {\n continue;\n }\n\n // Cannot be `tokens.end`, as dropped off last tag, so safe to\n // go on\n let newIdx = currIdx;\n\n const emptyLine = () => {\n return {\n number: 0,\n source: '',\n tokens: utils.seedTokens({\n delimiter: '*',\n start: jsdoc.source[newIdx - 1].tokens.start,\n }),\n };\n };\n\n let existingEmptyLines = 0;\n while (true) {\n const nextTokens = jsdoc.source[++newIdx]?.tokens;\n\n /* c8 ignore next 3 -- Guard */\n if (!nextTokens) {\n return;\n }\n\n // Should be no `nextTokens.end` to worry about since ignored\n // if not followed by tag\n\n if (nextTokens.tag) {\n // Haven't made it to last tag instance yet, so keep looking\n if (nextTokens.tag === tokens.tag) {\n existingEmptyLines = 0;\n continue;\n }\n\n const lineDiff = linesBetween - existingEmptyLines;\n if (lineDiff > 0) {\n const lines = Array.from({\n length: lineDiff,\n }, () => {\n return emptyLine();\n });\n jsdoc.source.splice(newIdx, 0, ...lines);\n } else {\n // lineDiff < 0\n jsdoc.source.splice(\n newIdx + lineDiff,\n -lineDiff,\n );\n }\n\n break;\n }\n\n const empty = !nextTokens.type && !nextTokens.name &&\n !nextTokens.description;\n\n if (empty) {\n existingEmptyLines++;\n } else {\n // Has content again, so reset empty line count\n existingEmptyLines = 0;\n }\n }\n\n break;\n }\n\n for (const [\n srcIdx,\n src,\n ] of jsdoc.source.entries()) {\n src.number = srcIdx;\n }\n };\n };\n\n for (const [\n tg,\n ] of badLastTagsOfGroup) {\n utils.reportJSDoc(\n 'Tag groups do not have the expected whitespace',\n tg,\n fixer(tg),\n );\n }\n\n return;\n }\n\n if (!reportIntraTagGroupSpacing) {\n return;\n }\n\n for (const [\n tagIdx,\n tag,\n ] of jsdoc.tags.entries()) {\n if (!jsdoc.tags[tagIdx + 1] || lastTagsOfGroup.includes(tag)) {\n continue;\n }\n\n const ct = countTagEmptyLines(tag);\n if (ct) {\n const fixer = () => {\n let foundFirstTag = false;\n\n /** @type {string|undefined} */\n let currentTag;\n\n for (const [\n currIdx,\n {\n tokens: {\n description,\n end,\n name,\n tag: tg,\n type,\n },\n },\n ] of jsdoc.source.entries()) {\n if (tg) {\n foundFirstTag = true;\n currentTag = tg;\n }\n\n if (!foundFirstTag) {\n continue;\n }\n\n if (currentTag && !tg && !type && !name && !description && !end) {\n let nextIdx = currIdx;\n\n let ignore = true;\n // Even if a tag of the same name as the last tags in a group,\n // could still be an earlier tag in that group\n\n // eslint-disable-next-line no-loop-func -- Safe\n if (lastTagsOfGroup.some((lastTagOfGroup) => {\n return currentTag === '@' + lastTagOfGroup.tag;\n })) {\n while (true) {\n const nextTokens = jsdoc.source[++nextIdx]?.tokens;\n if (!nextTokens) {\n break;\n }\n\n if (!nextTokens.tag) {\n continue;\n }\n\n // Followed by the same tag name, so not actually last in group,\n // and of interest\n if (nextTokens.tag === currentTag) {\n ignore = false;\n }\n }\n } else {\n while (true) {\n const nextTokens = jsdoc.source[++nextIdx]?.tokens;\n if (!nextTokens || nextTokens.end) {\n break;\n }\n\n // Not the very last tag, so don't ignore\n if (nextTokens.tag) {\n ignore = false;\n break;\n }\n }\n }\n\n if (!ignore) {\n jsdoc.source.splice(currIdx, 1);\n for (const [\n srcIdx,\n src,\n ] of jsdoc.source.entries()) {\n src.number = srcIdx;\n }\n }\n }\n }\n };\n\n utils.reportJSDoc(\n 'Intra-group tags have unexpected whitespace',\n tag,\n fixer,\n );\n }\n }\n\n return;\n }\n\n const firstLine = utils.getFirstLine();\n\n const fix = () => {\n const itemsToMoveRange = [\n ...Array.from({\n length: jsdoc.tags.length -\n /** @type {import('../iterateJsdoc.js').Integer} */ (\n firstChangedTagIndex\n ),\n }).keys(),\n ];\n\n const unchangedPriorTagDescriptions = jsdoc.tags.slice(\n 0,\n firstChangedTagIndex,\n ).reduce((ct, {\n source,\n }) => {\n return ct + source.length - 1;\n }, 0);\n\n // This offset includes not only the offset from where the first tag\n // must begin, and the additional offset of where the first changed\n // tag begins, but it must also account for prior descriptions\n const initialOffset = /** @type {import('../iterateJsdoc.js').Integer} */ (\n firstLine\n ) + /** @type {import('../iterateJsdoc.js').Integer} */ (firstChangedTagIndex) +\n\n // May be the first tag, so don't try finding a prior one if so\n unchangedPriorTagDescriptions;\n\n // Use `firstChangedTagLine` for line number to begin reporting/splicing\n for (const idx of itemsToMoveRange) {\n utils.removeTag(\n idx +\n /** @type {import('../iterateJsdoc.js').Integer} */ (\n firstChangedTagIndex\n ),\n );\n }\n\n const changedTags = sortedTags.slice(firstChangedTagIndex);\n let extraTagCount = 0;\n\n for (const idx of itemsToMoveRange) {\n const changedTag = changedTags[idx];\n\n utils.addTag(\n changedTag.tag,\n extraTagCount + initialOffset + idx,\n {\n ...changedTag.source[0].tokens,\n\n // `comment-parser` puts the `end` within the `tags` section, so\n // avoid adding another to jsdoc.source\n end: '',\n },\n );\n\n for (const {\n tokens,\n } of changedTag.source.slice(1)) {\n if (!tokens.end) {\n utils.addLine(\n extraTagCount + initialOffset + idx + 1,\n {\n ...tokens,\n end: '',\n },\n );\n extraTagCount++;\n }\n }\n }\n };\n\n utils.reportJSDoc(\n `Tags are not in the prescribed order: ${\n tagList.join(', ') || '(alphabetical)'\n }`,\n jsdoc.tags[/** @type {import('../iterateJsdoc.js').Integer} */ (\n firstChangedTagIndex\n )],\n fix,\n true,\n );\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n alphabetizeExtras: {\n description: `Defaults to \\`false\\`. Alphabetizes any items not within \\`tagSequence\\` after any\nitems within \\`tagSequence\\` (or in place of the special \\`-other\\` pseudo-tag)\nare sorted.\n\nIf you want all your tags alphabetized, you can supply an empty array for\n\\`tagSequence\\` along with setting this option to \\`true\\`.`,\n type: 'boolean',\n },\n linesBetween: {\n description: `Indicates the number of lines to be added between tag groups. Defaults to 1.\nDo not set to 0 or 2+ if you are using \\`tag-lines\\` and \\`\"always\"\\` and do not\nset to 1+ if you are using \\`tag-lines\\` and \\`\"never\"\\`.`,\n type: 'integer',\n },\n reportIntraTagGroupSpacing: {\n description: `Whether to enable reporting and fixing of line breaks within tags of a given\ntag group. Defaults to \\`true\\` which will remove any line breaks at the end of\nsuch tags. Do not use with \\`true\\` if you are using \\`tag-lines\\` and \\`always\\`.`,\n type: 'boolean',\n },\n reportTagGroupSpacing: {\n description: `Whether to enable reporting and fixing of line breaks between tag groups\nas set by \\`linesBetween\\`. Defaults to \\`true\\`. Note that the very last tag\nwill not have spacing applied regardless. For adding line breaks there, you\nmay wish to use the \\`endLines\\` option of the \\`tag-lines\\` rule.`,\n type: 'boolean',\n },\n tagSequence: {\n description: `An array of tag group objects indicating the preferred sequence for sorting tags.\n\nEach item in the array should be an object with a \\`tags\\` property set to an array\nof tag names.\n\nTag names earlier in the list will be arranged first. The relative position of\ntags of the same name will not be changed.\n\nEarlier groups will also be arranged before later groups, but with the added\nfeature that additional line breaks may be added between (or before or after)\nsuch groups (depending on the setting of \\`linesBetween\\`).\n\nTag names not in the list will be grouped together at the end. The pseudo-tag\n\\`-other\\` can be used to place them anywhere else if desired. The tags will be\nplaced in their order of appearance, or alphabetized if \\`alphabetizeExtras\\`\nis enabled, see more below about that option.\n\nDefaults to the array below (noting that it is just a single tag group with\nno lines between groups by default).\n\nPlease note that this order is still experimental, so if you want to retain\na fixed order that doesn't change into the future, supply your own\n\\`tagSequence\\`.\n\n\\`\\`\\`js\n[{tags: [\n // Brief descriptions\n 'summary',\n 'typeSummary',\n\n // Module/file-level\n 'module',\n 'exports',\n 'file',\n 'fileoverview',\n 'overview',\n 'import',\n\n // Identifying (name, type)\n 'typedef',\n 'interface',\n 'record',\n 'template',\n 'name',\n 'kind',\n 'type',\n 'alias',\n 'external',\n 'host',\n 'callback',\n 'func',\n 'function',\n 'method',\n 'class',\n 'constructor',\n\n // Relationships\n 'modifies',\n 'mixes',\n 'mixin',\n 'mixinClass',\n 'mixinFunction',\n 'namespace',\n 'borrows',\n 'constructs',\n 'lends',\n 'implements',\n 'requires',\n\n // Long descriptions\n 'desc',\n 'description',\n 'classdesc',\n 'tutorial',\n 'copyright',\n 'license',\n\n // Simple annotations\n 'const',\n 'constant',\n 'final',\n 'global',\n 'readonly',\n 'abstract',\n 'virtual',\n 'var',\n 'member',\n 'memberof',\n 'memberof!',\n 'inner',\n 'instance',\n 'inheritdoc',\n 'inheritDoc',\n 'override',\n 'hideconstructor',\n\n // Core function/object info\n 'param',\n 'arg',\n 'argument',\n 'prop',\n 'property',\n 'return',\n 'returns',\n\n // Important behavior details\n 'async',\n 'generator',\n 'default',\n 'defaultvalue',\n 'enum',\n 'augments',\n 'extends',\n 'throws',\n 'exception',\n 'yield',\n 'yields',\n 'event',\n 'fires',\n 'emits',\n 'listens',\n 'this',\n\n // Access\n 'static',\n 'private',\n 'protected',\n 'public',\n 'access',\n 'package',\n\n '-other',\n\n // Supplementary descriptions\n 'see',\n 'example',\n\n // METADATA\n\n // Other Closure (undocumented) metadata\n 'closurePrimitive',\n 'customElement',\n 'expose',\n 'hidden',\n 'idGenerator',\n 'meaning',\n 'ngInject',\n 'owner',\n 'wizaction',\n\n // Other Closure (documented) metadata\n 'define',\n 'dict',\n 'export',\n 'externs',\n 'implicitCast',\n 'noalias',\n 'nocollapse',\n 'nocompile',\n 'noinline',\n 'nosideeffects',\n 'polymer',\n 'polymerBehavior',\n 'preserve',\n 'struct',\n 'suppress',\n 'unrestricted',\n\n // @homer0/prettier-plugin-jsdoc metadata\n 'category',\n\n // Non-Closure metadata\n 'ignore',\n 'author',\n 'version',\n 'variation',\n 'since',\n 'deprecated',\n 'todo',\n]}];\n\\`\\`\\`\n`,\n items: {\n additionalProperties: false,\n properties: {\n tags: {\n description: 'See description on `tagSequence`.',\n items: {\n type: 'string',\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAE/B,IAAAG,qBAAY,EAAC,CAAC;EAC3BC,OAAO;EACPC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ;EACE;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAAQ;IACFC,iBAAiB,GAAG,KAAK;IACzBC,YAAY,GAAG,CAAC;IAChBC,0BAA0B,GAAG,IAAI;IACjCC,qBAAqB,GAAG,IAAI;IAC5BC,WAAW,GAAGC;EAChB,CAAC,GAAGR,OAAO,CAACS,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;EAE9B,MAAMC,OAAO,GAAGH,WAAW,CAACI,OAAO,CAAEC,GAAG,IAAK;IAC3C;IACA,OAAOA,GAAG,CAACC,IAAI;EACjB,CAAC,CAAC;EAEF,MAAMC,QAAQ,GAAGJ,OAAO,CAACK,OAAO,CAAC,QAAQ,CAAC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qB,EAAE;UACrBwC,WAAW,EAAE;AACzB;AACA;AACA,mEAAmE;UACvDI,IAAI,EAAE;QACR,CAAC;QACD3C,WAAW,EAAE;UACXuC,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;UACW6D,KAAK,EAAE;YACLF,oBAAoB,EAAE,KAAK;YAC3BC,UAAU,EAAE;cACV7F,IAAI,EAAE;gBACJiC,WAAW,EAAE,mCAAmC;gBAChD6D,KAAK,EAAE;kBACLzD,IAAI,EAAE;gBACR,CAAC;gBACDA,IAAI,EAAE;cACR;YACF,CAAC;YACDA,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA0D,MAAA,CAAA9G,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"sortTags.cjs","names":["_defaultTagOrder","_interopRequireDefault","require","_iterateJsdoc","e","__esModule","default","_default","exports","iterateJsdoc","context","jsdoc","utils","alphabetizeExtras","linesBetween","reportIntraTagGroupSpacing","reportTagGroupSpacing","tagSequence","defaultTagOrder","options","tagList","flatMap","obj","tags","otherPos","indexOf","endPos","length","ongoingCount","idx","tag","entries","originalIndex","source","originalLine","firstChangedTagLine","firstChangedTagIndex","sortedTags","JSON","parse","stringify","sort","tagNew","tagOld","checkOrSetFirstChanged","newPos","oldPos","preferredNewPos","preferredOldPos","undefined","lastTagsOfGroup","badLastTagsOfGroup","countTagEmptyLines","reduce","acc","tokens","description","end","name","tg","type","empty","Number","innerIdx","currentTag","lastTag","includes","some","tgs","push","ct","fixer","currIdx","newIdx","emptyLine","number","seedTokens","delimiter","start","existingEmptyLines","nextTokens","lineDiff","lines","Array","from","splice","srcIdx","src","reportJSDoc","tagIdx","foundFirstTag","nextIdx","ignore","lastTagOfGroup","firstLine","getFirstLine","fix","itemsToMoveRange","keys","unchangedPriorTagDescriptions","slice","initialOffset","removeTag","changedTags","extraTagCount","changedTag","addTag","addLine","join","iterateAllJsdocs","meta","docs","url","fixable","schema","additionalProperties","properties","items","module"],"sources":["../../src/rules/sortTags.js"],"sourcesContent":["import defaultTagOrder from '../defaultTagOrder.js';\nimport iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n utils,\n}) => {\n const\n /**\n * @type {{\n * linesBetween: import('../iterateJsdoc.js').Integer,\n * tagSequence: {\n * tags: string[]\n * }[],\n * alphabetizeExtras: boolean,\n * reportTagGroupSpacing: boolean,\n * reportIntraTagGroupSpacing: boolean,\n * }}\n */ {\n alphabetizeExtras = false,\n linesBetween = 1,\n reportIntraTagGroupSpacing = true,\n reportTagGroupSpacing = true,\n tagSequence = defaultTagOrder,\n } = context.options[0] || {};\n\n const tagList = tagSequence.flatMap((obj) => {\n /* typeof obj === 'string' ? obj : */\n return obj.tags;\n });\n\n const otherPos = tagList.indexOf('-other');\n const endPos = otherPos > -1 ? otherPos : tagList.length;\n\n let ongoingCount = 0;\n for (const [\n idx,\n tag,\n ] of\n /**\n * @type {(\n * import('@es-joy/jsdoccomment').JsdocTagWithInline & {\n * originalIndex: import('../iterateJsdoc.js').Integer,\n * originalLine: import('../iterateJsdoc.js').Integer,\n * }\n * )[]}\n */ (jsdoc.tags).entries()) {\n tag.originalIndex = idx;\n ongoingCount += tag.source.length;\n tag.originalLine = ongoingCount;\n }\n\n /** @type {import('../iterateJsdoc.js').Integer|undefined} */\n let firstChangedTagLine;\n /** @type {import('../iterateJsdoc.js').Integer|undefined} */\n let firstChangedTagIndex;\n\n /**\n * @type {(import('comment-parser').Spec & {\n * originalIndex: import('../iterateJsdoc.js').Integer,\n * originalLine: import('../iterateJsdoc.js').Integer,\n * })[]}\n */\n const sortedTags = JSON.parse(JSON.stringify(jsdoc.tags));\n sortedTags.sort(({\n tag: tagNew,\n }, {\n originalIndex,\n originalLine,\n tag: tagOld,\n }) => {\n // Optimize: Just keep relative positions if the same tag name\n if (tagNew === tagOld) {\n return 0;\n }\n\n const checkOrSetFirstChanged = () => {\n if (!firstChangedTagLine || originalLine < firstChangedTagLine) {\n firstChangedTagLine = originalLine;\n firstChangedTagIndex = originalIndex;\n }\n };\n\n const newPos = tagList.indexOf(tagNew);\n const oldPos = tagList.indexOf(tagOld);\n\n const preferredNewPos = newPos === -1 ? endPos : newPos;\n const preferredOldPos = oldPos === -1 ? endPos : oldPos;\n\n if (preferredNewPos < preferredOldPos) {\n checkOrSetFirstChanged();\n return -1;\n }\n\n if (preferredNewPos > preferredOldPos) {\n return 1;\n }\n\n // preferredNewPos === preferredOldPos\n if (\n !alphabetizeExtras ||\n\n // Optimize: If tagNew (or tagOld which is the same) was found in the\n // priority array, it can maintain its relative position—without need\n // of alphabetizing (secondary sorting)\n newPos >= 0\n ) {\n return 0;\n }\n\n if (tagNew < tagOld) {\n checkOrSetFirstChanged();\n return -1;\n }\n\n // tagNew > tagOld\n return 1;\n });\n\n if (firstChangedTagLine === undefined) {\n // Should be ordered by now\n\n /**\n * @type {import('comment-parser').Spec[]}\n */\n const lastTagsOfGroup = [];\n\n /**\n * @type {[\n * import('comment-parser').Spec,\n * import('../iterateJsdoc.js').Integer\n * ][]}\n */\n const badLastTagsOfGroup = [];\n\n /**\n * @param {import('comment-parser').Spec} tag\n */\n const countTagEmptyLines = (tag) => {\n return tag.source.reduce((acc, {\n tokens: {\n description,\n end,\n name,\n tag: tg,\n type,\n },\n }) => {\n const empty = !tg && !type && !name && !description;\n // Reset the count so long as there is content\n return empty ? acc + Number(empty && !end) : 0;\n }, 0);\n };\n\n let idx = 0;\n for (const {\n tags,\n } of tagSequence) {\n let innerIdx;\n /** @type {import('comment-parser').Spec} */\n let currentTag;\n /** @type {import('comment-parser').Spec|undefined} */\n let lastTag;\n do {\n currentTag = jsdoc.tags[idx];\n if (!currentTag) {\n idx++;\n break;\n }\n\n innerIdx = tags.indexOf(currentTag.tag);\n\n if (\n innerIdx === -1 &&\n // eslint-disable-next-line no-loop-func -- Safe\n (!tags.includes('-other') || tagSequence.some(({\n tags: tgs,\n }) => {\n return tgs.includes(currentTag.tag);\n }))\n ) {\n idx++;\n break;\n }\n\n lastTag = currentTag;\n\n idx++;\n } while (true);\n\n idx--;\n\n if (lastTag) {\n lastTagsOfGroup.push(lastTag);\n const ct = countTagEmptyLines(lastTag);\n if (\n ct !== linesBetween &&\n // Use another rule for adding to end (should be of interest outside this rule)\n jsdoc.tags[idx]\n ) {\n badLastTagsOfGroup.push([\n lastTag, ct,\n ]);\n }\n }\n }\n\n if (reportTagGroupSpacing && badLastTagsOfGroup.length) {\n /**\n * @param {import('comment-parser').Spec} tg\n * @returns {() => void}\n */\n const fixer = (tg) => {\n return () => {\n // Due to https://github.com/syavorsky/comment-parser/issues/110 ,\n // we have to modify `jsdoc.source` rather than just modify tags\n // directly\n for (const [\n currIdx,\n {\n tokens,\n },\n ] of jsdoc.source.entries()) {\n if (tokens.tag !== '@' + tg.tag) {\n continue;\n }\n\n // Cannot be `tokens.end`, as dropped off last tag, so safe to\n // go on\n let newIdx = currIdx;\n\n const emptyLine = () => {\n return {\n number: 0,\n source: '',\n tokens: utils.seedTokens({\n delimiter: '*',\n start: jsdoc.source[newIdx - 1].tokens.start,\n }),\n };\n };\n\n let existingEmptyLines = 0;\n while (true) {\n const nextTokens = jsdoc.source[++newIdx]?.tokens;\n\n /* c8 ignore next 3 -- Guard */\n if (!nextTokens) {\n return;\n }\n\n // Should be no `nextTokens.end` to worry about since ignored\n // if not followed by tag\n\n if (nextTokens.tag) {\n // Haven't made it to last tag instance yet, so keep looking\n if (nextTokens.tag === tokens.tag) {\n existingEmptyLines = 0;\n continue;\n }\n\n const lineDiff = linesBetween - existingEmptyLines;\n if (lineDiff > 0) {\n const lines = Array.from({\n length: lineDiff,\n }, () => {\n return emptyLine();\n });\n jsdoc.source.splice(newIdx, 0, ...lines);\n } else {\n // lineDiff < 0\n jsdoc.source.splice(\n newIdx + lineDiff,\n -lineDiff,\n );\n }\n\n break;\n }\n\n const empty = !nextTokens.type && !nextTokens.name &&\n !nextTokens.description;\n\n if (empty) {\n existingEmptyLines++;\n } else {\n // Has content again, so reset empty line count\n existingEmptyLines = 0;\n }\n }\n\n break;\n }\n\n for (const [\n srcIdx,\n src,\n ] of jsdoc.source.entries()) {\n src.number = srcIdx;\n }\n };\n };\n\n for (const [\n tg,\n ] of badLastTagsOfGroup) {\n utils.reportJSDoc(\n 'Tag groups do not have the expected whitespace',\n tg,\n fixer(tg),\n );\n }\n\n return;\n }\n\n if (!reportIntraTagGroupSpacing) {\n return;\n }\n\n for (const [\n tagIdx,\n tag,\n ] of jsdoc.tags.entries()) {\n if (!jsdoc.tags[tagIdx + 1] || lastTagsOfGroup.includes(tag)) {\n continue;\n }\n\n const ct = countTagEmptyLines(tag);\n if (ct) {\n const fixer = () => {\n let foundFirstTag = false;\n\n /** @type {string|undefined} */\n let currentTag;\n\n for (const [\n currIdx,\n {\n tokens: {\n description,\n end,\n name,\n tag: tg,\n type,\n },\n },\n ] of jsdoc.source.entries()) {\n if (tg) {\n foundFirstTag = true;\n currentTag = tg;\n }\n\n if (!foundFirstTag) {\n continue;\n }\n\n if (currentTag && !tg && !type && !name && !description && !end) {\n let nextIdx = currIdx;\n\n let ignore = true;\n // Even if a tag of the same name as the last tags in a group,\n // could still be an earlier tag in that group\n\n // eslint-disable-next-line no-loop-func -- Safe\n if (lastTagsOfGroup.some((lastTagOfGroup) => {\n return currentTag === '@' + lastTagOfGroup.tag;\n })) {\n while (true) {\n const nextTokens = jsdoc.source[++nextIdx]?.tokens;\n if (!nextTokens) {\n break;\n }\n\n if (!nextTokens.tag) {\n continue;\n }\n\n // Followed by the same tag name, so not actually last in group,\n // and of interest\n if (nextTokens.tag === currentTag) {\n ignore = false;\n }\n }\n } else {\n while (true) {\n const nextTokens = jsdoc.source[++nextIdx]?.tokens;\n if (!nextTokens || nextTokens.end) {\n break;\n }\n\n // Not the very last tag, so don't ignore\n if (nextTokens.tag) {\n ignore = false;\n break;\n }\n }\n }\n\n if (!ignore) {\n jsdoc.source.splice(currIdx, 1);\n for (const [\n srcIdx,\n src,\n ] of jsdoc.source.entries()) {\n src.number = srcIdx;\n }\n }\n }\n }\n };\n\n utils.reportJSDoc(\n 'Intra-group tags have unexpected whitespace',\n tag,\n fixer,\n );\n }\n }\n\n return;\n }\n\n const firstLine = utils.getFirstLine();\n\n const fix = () => {\n const itemsToMoveRange = [\n ...Array.from({\n length: jsdoc.tags.length -\n /** @type {import('../iterateJsdoc.js').Integer} */ (\n firstChangedTagIndex\n ),\n }).keys(),\n ];\n\n const unchangedPriorTagDescriptions = jsdoc.tags.slice(\n 0,\n firstChangedTagIndex,\n ).reduce((ct, {\n source,\n }) => {\n return ct + source.length - 1;\n }, 0);\n\n // This offset includes not only the offset from where the first tag\n // must begin, and the additional offset of where the first changed\n // tag begins, but it must also account for prior descriptions\n const initialOffset = /** @type {import('../iterateJsdoc.js').Integer} */ (\n firstLine\n ) + /** @type {import('../iterateJsdoc.js').Integer} */ (firstChangedTagIndex) +\n\n // May be the first tag, so don't try finding a prior one if so\n unchangedPriorTagDescriptions;\n\n // Use `firstChangedTagLine` for line number to begin reporting/splicing\n for (const idx of itemsToMoveRange) {\n utils.removeTag(\n idx +\n /** @type {import('../iterateJsdoc.js').Integer} */ (\n firstChangedTagIndex\n ),\n );\n }\n\n const changedTags = sortedTags.slice(firstChangedTagIndex);\n let extraTagCount = 0;\n\n for (const idx of itemsToMoveRange) {\n const changedTag = changedTags[idx];\n\n utils.addTag(\n changedTag.tag,\n extraTagCount + initialOffset + idx,\n {\n ...changedTag.source[0].tokens,\n\n // `comment-parser` puts the `end` within the `tags` section, so\n // avoid adding another to jsdoc.source\n end: '',\n },\n );\n\n for (const {\n tokens,\n } of changedTag.source.slice(1)) {\n if (!tokens.end) {\n utils.addLine(\n extraTagCount + initialOffset + idx + 1,\n {\n ...tokens,\n end: '',\n },\n );\n extraTagCount++;\n }\n }\n }\n };\n\n utils.reportJSDoc(\n `Tags are not in the prescribed order: ${\n tagList.join(', ') || '(alphabetical)'\n }`,\n jsdoc.tags[/** @type {import('../iterateJsdoc.js').Integer} */ (\n firstChangedTagIndex\n )],\n fix,\n true,\n );\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n alphabetizeExtras: {\n description: `Defaults to \\`false\\`. Alphabetizes any items not within \\`tagSequence\\` after any\nitems within \\`tagSequence\\` (or in place of the special \\`-other\\` pseudo-tag)\nare sorted.\n\nIf you want all your tags alphabetized, you can supply an empty array for\n\\`tagSequence\\` along with setting this option to \\`true\\`.`,\n type: 'boolean',\n },\n linesBetween: {\n description: `Indicates the number of lines to be added between tag groups. Defaults to 1.\nDo not set to 0 or 2+ if you are using \\`tag-lines\\` and \\`\"always\"\\` and do not\nset to 1+ if you are using \\`tag-lines\\` and \\`\"never\"\\`.`,\n type: 'integer',\n },\n reportIntraTagGroupSpacing: {\n description: `Whether to enable reporting and fixing of line breaks within tags of a given\ntag group. Defaults to \\`true\\` which will remove any line breaks at the end of\nsuch tags. Do not use with \\`true\\` if you are using \\`tag-lines\\` and \\`always\\`.`,\n type: 'boolean',\n },\n reportTagGroupSpacing: {\n description: `Whether to enable reporting and fixing of line breaks between tag groups\nas set by \\`linesBetween\\`. Defaults to \\`true\\`. Note that the very last tag\nwill not have spacing applied regardless. For adding line breaks there, you\nmay wish to use the \\`endLines\\` option of the \\`tag-lines\\` rule.`,\n type: 'boolean',\n },\n tagSequence: {\n description: `An array of tag group objects indicating the preferred sequence for sorting tags.\n\nEach item in the array should be an object with a \\`tags\\` property set to an array\nof tag names.\n\nTag names earlier in the list will be arranged first. The relative position of\ntags of the same name will not be changed.\n\nEarlier groups will also be arranged before later groups, but with the added\nfeature that additional line breaks may be added between (or before or after)\nsuch groups (depending on the setting of \\`linesBetween\\`).\n\nTag names not in the list will be grouped together at the end. The pseudo-tag\n\\`-other\\` can be used to place them anywhere else if desired. The tags will be\nplaced in their order of appearance, or alphabetized if \\`alphabetizeExtras\\`\nis enabled, see more below about that option.\n\nDefaults to the array below (noting that it is just a single tag group with\nno lines between groups by default).\n\nPlease note that this order is still experimental, so if you want to retain\na fixed order that doesn't change into the future, supply your own\n\\`tagSequence\\`.\n\n\\`\\`\\`js\n[{tags: [\n // Brief descriptions\n 'summary',\n 'typeSummary',\n\n // Module/file-level\n 'module',\n 'exports',\n 'file',\n 'fileoverview',\n 'overview',\n 'import',\n\n // Identifying (name, type)\n 'typedef',\n 'interface',\n 'record',\n 'template',\n 'name',\n 'kind',\n 'type',\n 'alias',\n 'external',\n 'host',\n 'callback',\n 'func',\n 'function',\n 'method',\n 'class',\n 'constructor',\n\n // Relationships\n 'modifies',\n 'mixes',\n 'mixin',\n 'mixinClass',\n 'mixinFunction',\n 'namespace',\n 'borrows',\n 'constructs',\n 'lends',\n 'implements',\n 'requires',\n\n // Long descriptions\n 'desc',\n 'description',\n 'classdesc',\n 'tutorial',\n 'copyright',\n 'license',\n\n // Simple annotations\n 'const',\n 'constant',\n 'final',\n 'global',\n 'readonly',\n 'abstract',\n 'virtual',\n 'var',\n 'member',\n 'memberof',\n 'memberof!',\n 'inner',\n 'instance',\n 'inheritdoc',\n 'inheritDoc',\n 'override',\n 'hideconstructor',\n\n // Core function/object info\n 'param',\n 'arg',\n 'argument',\n 'prop',\n 'property',\n 'return',\n 'returns',\n\n // Important behavior details\n 'async',\n 'generator',\n 'default',\n 'defaultvalue',\n 'enum',\n 'augments',\n 'extends',\n 'throws',\n 'exception',\n 'yield',\n 'yields',\n 'event',\n 'fires',\n 'emits',\n 'listens',\n 'this',\n\n // Access\n 'static',\n 'private',\n 'protected',\n 'public',\n 'access',\n 'package',\n\n '-other',\n\n // Supplementary descriptions\n 'see',\n 'example',\n\n // METADATA\n\n // Other Closure (undocumented) metadata\n 'closurePrimitive',\n 'customElement',\n 'expose',\n 'hidden',\n 'idGenerator',\n 'meaning',\n 'ngInject',\n 'owner',\n 'wizaction',\n\n // Other Closure (documented) metadata\n 'define',\n 'dict',\n 'export',\n 'externs',\n 'implicitCast',\n 'noalias',\n 'nocollapse',\n 'nocompile',\n 'noinline',\n 'nosideeffects',\n 'polymer',\n 'polymerBehavior',\n 'preserve',\n 'struct',\n 'suppress',\n 'unrestricted',\n\n // @homer0/prettier-plugin-jsdoc metadata\n 'category',\n\n // Non-Closure metadata\n 'ignore',\n 'author',\n 'version',\n 'variation',\n 'since',\n 'deprecated',\n 'todo',\n]}];\n\\`\\`\\``,\n items: {\n additionalProperties: false,\n properties: {\n tags: {\n description: 'See description on `tagSequence`.',\n items: {\n type: 'string',\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,gBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAE/B,IAAAG,qBAAY,EAAC,CAAC;EAC3BC,OAAO;EACPC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ;EACE;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAAQ;IACFC,iBAAiB,GAAG,KAAK;IACzBC,YAAY,GAAG,CAAC;IAChBC,0BAA0B,GAAG,IAAI;IACjCC,qBAAqB,GAAG,IAAI;IAC5BC,WAAW,GAAGC;EAChB,CAAC,GAAGR,OAAO,CAACS,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;EAE9B,MAAMC,OAAO,GAAGH,WAAW,CAACI,OAAO,CAAEC,GAAG,IAAK;IAC3C;IACA,OAAOA,GAAG,CAACC,IAAI;EACjB,CAAC,CAAC;EAEF,MAAMC,QAAQ,GAAGJ,OAAO,CAACK,OAAO,CAAC,QAAQ,CAAC;EAC1C,MAAMC,MAAM,GAAGF,QAAQ,GAAG,CAAC,CAAC,GAAGA,QAAQ,GAAGJ,OAAO,CAACO,MAAM;EAExD,IAAIC,YAAY,GAAG,CAAC;EACpB,KAAK,MAAM,CACTC,GAAG,EACHC,GAAG,CACJ;EACC;AACJ;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;UACK6D,KAAK,EAAE;YACLF,oBAAoB,EAAE,KAAK;YAC3BC,UAAU,EAAE;cACV7F,IAAI,EAAE;gBACJiC,WAAW,EAAE,mCAAmC;gBAChD6D,KAAK,EAAE;kBACLzD,IAAI,EAAE;gBACR,CAAC;gBACDA,IAAI,EAAE;cACR;YACF,CAAC;YACDA,IAAI,EAAE;UACR,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA0D,MAAA,CAAA9G,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
|
package/dist/rules.d.ts
CHANGED
|
@@ -82,7 +82,6 @@ export interface Rules {
|
|
|
82
82
|
/**
|
|
83
83
|
* An object with any of the following spacing keys set to an integer.
|
|
84
84
|
* If a spacing is not defined, it defaults to one.
|
|
85
|
-
*
|
|
86
85
|
*/
|
|
87
86
|
customSpacings?: {
|
|
88
87
|
/**
|
|
@@ -437,7 +436,6 @@ export interface Rules {
|
|
|
437
436
|
*
|
|
438
437
|
* Defaults to `ArrowFunctionExpression`, `FunctionDeclaration`,
|
|
439
438
|
* `FunctionExpression`, `TSDeclareFunction`.
|
|
440
|
-
*
|
|
441
439
|
*/
|
|
442
440
|
contexts?: (
|
|
443
441
|
| string
|
|
@@ -496,7 +494,6 @@ export interface Rules {
|
|
|
496
494
|
* ```
|
|
497
495
|
*
|
|
498
496
|
* Defaults to `multi`.
|
|
499
|
-
*
|
|
500
497
|
*/
|
|
501
498
|
enforceJsdocLineStyle?: "multi" | "single";
|
|
502
499
|
/**
|
|
@@ -526,12 +523,36 @@ export interface Rules {
|
|
|
526
523
|
* 'jsdoc/empty-tags': ['error', {tags: ['event']}]
|
|
527
524
|
* }
|
|
528
525
|
* ```
|
|
529
|
-
*
|
|
530
526
|
*/
|
|
531
527
|
tags?: string[];
|
|
532
528
|
}
|
|
533
529
|
];
|
|
534
530
|
|
|
531
|
+
/** Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode). */
|
|
532
|
+
"jsdoc/escape-inline-tags":
|
|
533
|
+
| []
|
|
534
|
+
| [
|
|
535
|
+
{
|
|
536
|
+
/**
|
|
537
|
+
* A listing of tags you wish to allow unescaped. Defaults to an empty array.
|
|
538
|
+
*/
|
|
539
|
+
allowedInlineTags?: string[];
|
|
540
|
+
/**
|
|
541
|
+
* Whether to enable the fixer. Defaults to `false`.
|
|
542
|
+
*/
|
|
543
|
+
enableFixer?: boolean;
|
|
544
|
+
/**
|
|
545
|
+
* How to escape the inline tag.
|
|
546
|
+
*
|
|
547
|
+
* May be "backticks" to enclose tags in backticks (treating as code segments), or
|
|
548
|
+
* "backslash" to escape tags with a backslash, i.e., `\@`
|
|
549
|
+
*
|
|
550
|
+
* Defaults to "backslash".
|
|
551
|
+
*/
|
|
552
|
+
fixType?: "backticks" | "backslash";
|
|
553
|
+
}
|
|
554
|
+
];
|
|
555
|
+
|
|
535
556
|
/** Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors). */
|
|
536
557
|
"jsdoc/implements-on-classes":
|
|
537
558
|
| []
|
|
@@ -588,7 +609,6 @@ export interface Rules {
|
|
|
588
609
|
* "a": ["an", "our"]
|
|
589
610
|
* }
|
|
590
611
|
* ```
|
|
591
|
-
*
|
|
592
612
|
*/
|
|
593
613
|
aliases?: {
|
|
594
614
|
/**
|
|
@@ -610,7 +630,6 @@ export interface Rules {
|
|
|
610
630
|
* ```
|
|
611
631
|
*
|
|
612
632
|
* No tags are excluded by default.
|
|
613
|
-
*
|
|
614
633
|
*/
|
|
615
634
|
excludedTags?: string[];
|
|
616
635
|
/**
|
|
@@ -628,7 +647,6 @@ export interface Rules {
|
|
|
628
647
|
* ```json
|
|
629
648
|
* ["a", "an", "i", "in", "of", "s", "the"]
|
|
630
649
|
* ```
|
|
631
|
-
*
|
|
632
650
|
*/
|
|
633
651
|
uselessWords?: string[];
|
|
634
652
|
}
|
|
@@ -642,26 +660,22 @@ export interface Rules {
|
|
|
642
660
|
/**
|
|
643
661
|
* Whether to additionally check the start of blocks, such as classes or functions.
|
|
644
662
|
* Defaults to `false`.
|
|
645
|
-
*
|
|
646
663
|
*/
|
|
647
664
|
checkBlockStarts?: boolean;
|
|
648
665
|
/**
|
|
649
666
|
* An array of tags whose presence in the JSDoc block will prevent the
|
|
650
667
|
* application of the rule. Defaults to `['type']` (i.e., if `@type` is present,
|
|
651
668
|
* lines before the block will not be added).
|
|
652
|
-
*
|
|
653
669
|
*/
|
|
654
670
|
excludedTags?: string[];
|
|
655
671
|
/**
|
|
656
672
|
* This option excludes cases where the JSDoc block occurs on the same line as a
|
|
657
673
|
* preceding code or comment. Defaults to `true`.
|
|
658
|
-
*
|
|
659
674
|
*/
|
|
660
675
|
ignoreSameLine?: boolean;
|
|
661
676
|
/**
|
|
662
677
|
* This option excludes cases where the JSDoc block is only one line long.
|
|
663
678
|
* Defaults to `true`.
|
|
664
|
-
*
|
|
665
679
|
*/
|
|
666
680
|
ignoreSingleLines?: boolean;
|
|
667
681
|
/**
|
|
@@ -689,7 +703,6 @@ export interface Rules {
|
|
|
689
703
|
*
|
|
690
704
|
* See the ["AST and Selectors"](../#advanced-ast-and-selectors)
|
|
691
705
|
* section of our Advanced docs for more on the expected format.
|
|
692
|
-
*
|
|
693
706
|
*/
|
|
694
707
|
contexts?: (
|
|
695
708
|
| string
|
|
@@ -771,7 +784,6 @@ export interface Rules {
|
|
|
771
784
|
*
|
|
772
785
|
* This can be overridden per tag or for the main block description by setting
|
|
773
786
|
* `message` within `tags` or `mainDescription`, respectively.
|
|
774
|
-
*
|
|
775
787
|
*/
|
|
776
788
|
message?: string;
|
|
777
789
|
/**
|
|
@@ -869,7 +881,6 @@ export interface Rules {
|
|
|
869
881
|
* tag of the desired tag and/or name and no `disallowName` (or `allowName`) is
|
|
870
882
|
* supplied. In such a case, only one error will be reported, but no fixer will
|
|
871
883
|
* be applied, however.
|
|
872
|
-
*
|
|
873
884
|
*/
|
|
874
885
|
match: {
|
|
875
886
|
/**
|
|
@@ -958,7 +969,6 @@ export interface Rules {
|
|
|
958
969
|
* lines.
|
|
959
970
|
*
|
|
960
971
|
* Defaults to `['*']`.
|
|
961
|
-
*
|
|
962
972
|
*/
|
|
963
973
|
multilineTags?: "*" | string[];
|
|
964
974
|
/**
|
|
@@ -983,7 +993,6 @@ export interface Rules {
|
|
|
983
993
|
* are whitelisted in `singleLineTags`.
|
|
984
994
|
*
|
|
985
995
|
* Defaults to `false`.
|
|
986
|
-
*
|
|
987
996
|
*/
|
|
988
997
|
noSingleLineBlocks?: boolean;
|
|
989
998
|
/**
|
|
@@ -1004,7 +1013,6 @@ export interface Rules {
|
|
|
1004
1013
|
* descriptions.
|
|
1005
1014
|
*
|
|
1006
1015
|
* Defaults to `null`.
|
|
1007
|
-
*
|
|
1008
1016
|
*/
|
|
1009
1017
|
requireSingleLineUnderCount?: number;
|
|
1010
1018
|
/**
|
|
@@ -1031,7 +1039,6 @@ export interface Rules {
|
|
|
1031
1039
|
*
|
|
1032
1040
|
* Defaults to `['ts-check', 'ts-expect-error', 'ts-ignore', 'ts-nocheck']`
|
|
1033
1041
|
* (some directives [used by TypeScript](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check)).
|
|
1034
|
-
*
|
|
1035
1042
|
*/
|
|
1036
1043
|
ignore?: string[];
|
|
1037
1044
|
/**
|
|
@@ -1239,7 +1246,6 @@ export interface Rules {
|
|
|
1239
1246
|
*
|
|
1240
1247
|
* See the ["AST and Selectors"](../#advanced-ast-and-selectors)
|
|
1241
1248
|
* section of our Advanced docs for more on the expected format.
|
|
1242
|
-
*
|
|
1243
1249
|
*/
|
|
1244
1250
|
contexts?: (
|
|
1245
1251
|
| string
|
|
@@ -1332,7 +1338,6 @@ export interface Rules {
|
|
|
1332
1338
|
* }]
|
|
1333
1339
|
* }
|
|
1334
1340
|
* ```
|
|
1335
|
-
*
|
|
1336
1341
|
*/
|
|
1337
1342
|
tags?: {
|
|
1338
1343
|
/**
|
|
@@ -1452,7 +1457,6 @@ export interface Rules {
|
|
|
1452
1457
|
* its "description" (e.g., for `@returns {someType} some description`, the
|
|
1453
1458
|
* description is `some description` while for `@some-tag xyz`, the description
|
|
1454
1459
|
* is `xyz`).
|
|
1455
|
-
*
|
|
1456
1460
|
*/
|
|
1457
1461
|
tags?: string[];
|
|
1458
1462
|
}
|
|
@@ -1583,8 +1587,6 @@ export interface Rules {
|
|
|
1583
1587
|
* in this configuration object regardless of whether you have configured
|
|
1584
1588
|
* `fileoverview` instead of `file` on `tagNamePreference` (i.e., `fileoverview`
|
|
1585
1589
|
* will be checked, but you must use `file` on the configuration object).
|
|
1586
|
-
*
|
|
1587
|
-
*
|
|
1588
1590
|
*/
|
|
1589
1591
|
tags?: {
|
|
1590
1592
|
/**
|
|
@@ -1615,7 +1617,6 @@ export interface Rules {
|
|
|
1615
1617
|
* `'*': 'always'` to apply hyphen checking to any tag (besides the preferred
|
|
1616
1618
|
* `@param` tag which follows the main string option setting and besides any
|
|
1617
1619
|
* other `tags` entries).
|
|
1618
|
-
*
|
|
1619
1620
|
*/
|
|
1620
1621
|
tags?:
|
|
1621
1622
|
| {
|
|
@@ -1646,7 +1647,6 @@ export interface Rules {
|
|
|
1646
1647
|
* getters should be checked but only when there is no setter. This may be useful
|
|
1647
1648
|
* if one only wishes documentation on one of the two accessors. Defaults to
|
|
1648
1649
|
* `false`.
|
|
1649
|
-
*
|
|
1650
1650
|
*/
|
|
1651
1651
|
checkGetters?: boolean | "no-setter";
|
|
1652
1652
|
/**
|
|
@@ -1701,7 +1701,6 @@ export interface Rules {
|
|
|
1701
1701
|
* function/method names are sufficient for themselves as documentation).
|
|
1702
1702
|
*
|
|
1703
1703
|
* Defaults to `false`.
|
|
1704
|
-
*
|
|
1705
1704
|
*/
|
|
1706
1705
|
exemptEmptyFunctions?: boolean;
|
|
1707
1706
|
/**
|
|
@@ -1734,7 +1733,6 @@ export interface Rules {
|
|
|
1734
1733
|
* - `esm` - ESM exports are checked for JSDoc comments (Defaults to `true`)
|
|
1735
1734
|
* - `cjs` - CommonJS exports are checked for JSDoc comments (Defaults to `true`)
|
|
1736
1735
|
* - `window` - Window global exports are checked for JSDoc comments
|
|
1737
|
-
*
|
|
1738
1736
|
*/
|
|
1739
1737
|
publicOnly?:
|
|
1740
1738
|
| boolean
|
|
@@ -1801,13 +1799,11 @@ export interface Rules {
|
|
|
1801
1799
|
/**
|
|
1802
1800
|
* Numeric to indicate the number at which to begin auto-incrementing roots.
|
|
1803
1801
|
* Defaults to `0`.
|
|
1804
|
-
*
|
|
1805
1802
|
*/
|
|
1806
1803
|
autoIncrementBase?: number;
|
|
1807
1804
|
/**
|
|
1808
1805
|
* A value indicating whether `constructor`s should be checked. Defaults to
|
|
1809
1806
|
* `true`.
|
|
1810
|
-
*
|
|
1811
1807
|
*/
|
|
1812
1808
|
checkConstructors?: boolean;
|
|
1813
1809
|
/**
|
|
@@ -1824,7 +1820,6 @@ export interface Rules {
|
|
|
1824
1820
|
* implied to be `false` (i.e., the inside of the roots will not be checked
|
|
1825
1821
|
* either, e.g., it will also not complain if `a` or `b` do not have their own
|
|
1826
1822
|
* documentation). Defaults to `true`.
|
|
1827
|
-
*
|
|
1828
1823
|
*/
|
|
1829
1824
|
checkDestructuredRoots?: boolean;
|
|
1830
1825
|
/**
|
|
@@ -1882,7 +1877,6 @@ export interface Rules {
|
|
|
1882
1877
|
* function quux ({num, ...extra}) {
|
|
1883
1878
|
* }
|
|
1884
1879
|
* ```
|
|
1885
|
-
*
|
|
1886
1880
|
*/
|
|
1887
1881
|
checkRestProperty?: boolean;
|
|
1888
1882
|
/**
|
|
@@ -1936,7 +1930,6 @@ export interface Rules {
|
|
|
1936
1930
|
*
|
|
1937
1931
|
* See the ["AST and Selectors"](../#advanced-ast-and-selectors)
|
|
1938
1932
|
* section of our Advanced docs for more on the expected format.
|
|
1939
|
-
*
|
|
1940
1933
|
*/
|
|
1941
1934
|
contexts?: (
|
|
1942
1935
|
| string
|
|
@@ -1983,7 +1976,6 @@ export interface Rules {
|
|
|
1983
1976
|
* type to use.
|
|
1984
1977
|
*
|
|
1985
1978
|
* Defaults to `true`.
|
|
1986
|
-
*
|
|
1987
1979
|
*/
|
|
1988
1980
|
enableRestElementFixer?: boolean;
|
|
1989
1981
|
/**
|
|
@@ -2134,7 +2126,6 @@ export interface Rules {
|
|
|
2134
2126
|
*
|
|
2135
2127
|
* See the ["AST and Selectors"](../#advanced-ast-and-selectors)
|
|
2136
2128
|
* section of our Advanced docs for more on the expected format.
|
|
2137
|
-
*
|
|
2138
2129
|
*/
|
|
2139
2130
|
contexts?: (
|
|
2140
2131
|
| string
|
|
@@ -2287,7 +2278,6 @@ export interface Rules {
|
|
|
2287
2278
|
* - `esm` - ESM exports are checked for `@returns` JSDoc comments (Defaults to `true`)
|
|
2288
2279
|
* - `cjs` - CommonJS exports are checked for `@returns` JSDoc comments (Defaults to `true`)
|
|
2289
2280
|
* - `window` - Window global exports are checked for `@returns` JSDoc comments
|
|
2290
|
-
*
|
|
2291
2281
|
*/
|
|
2292
2282
|
publicOnly?:
|
|
2293
2283
|
| boolean
|
|
@@ -2327,6 +2317,11 @@ export interface Rules {
|
|
|
2327
2317
|
* if you wish for a missing `return` to be flagged regardless.
|
|
2328
2318
|
*/
|
|
2329
2319
|
exemptGenerators?: boolean;
|
|
2320
|
+
/**
|
|
2321
|
+
* Whether to check that async functions do not
|
|
2322
|
+
* indicate they return non-native types. Defaults to `true`.
|
|
2323
|
+
*/
|
|
2324
|
+
noNativeTypes?: boolean;
|
|
2330
2325
|
/**
|
|
2331
2326
|
* If `true` and no return or
|
|
2332
2327
|
* resolve value is found, this setting will even insist that reporting occur
|
|
@@ -2444,7 +2439,6 @@ export interface Rules {
|
|
|
2444
2439
|
* ```
|
|
2445
2440
|
*
|
|
2446
2441
|
* Defaults to `false`.
|
|
2447
|
-
*
|
|
2448
2442
|
*/
|
|
2449
2443
|
requireSeparateTemplates?: boolean;
|
|
2450
2444
|
}
|
|
@@ -2848,7 +2842,6 @@ export interface Rules {
|
|
|
2848
2842
|
* 'todo',
|
|
2849
2843
|
* ]}];
|
|
2850
2844
|
* ```
|
|
2851
|
-
*
|
|
2852
2845
|
*/
|
|
2853
2846
|
tagSequence?: {
|
|
2854
2847
|
/**
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "http://gajus.com"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@es-joy/jsdoccomment": "~0.
|
|
8
|
+
"@es-joy/jsdoccomment": "~0.65.2",
|
|
9
9
|
"are-docs-informative": "^0.0.2",
|
|
10
10
|
"comment-parser": "1.4.1",
|
|
11
11
|
"debug": "^4.4.3",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"@types/estree": "^1.0.8",
|
|
42
42
|
"@types/json-schema": "^7.0.15",
|
|
43
43
|
"@types/mocha": "^10.0.10",
|
|
44
|
-
"@types/node": "^24.
|
|
44
|
+
"@types/node": "^24.6.1",
|
|
45
45
|
"@types/semver": "^7.7.1",
|
|
46
46
|
"@types/spdx-expression-parse": "^3.0.5",
|
|
47
|
-
"@typescript-eslint/types": "^8.
|
|
47
|
+
"@typescript-eslint/types": "^8.45.0",
|
|
48
48
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
49
49
|
"babel-plugin-istanbul": "^7.0.1",
|
|
50
50
|
"babel-plugin-transform-import-meta": "^2.3.3",
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
"glob": "^11.0.3",
|
|
59
59
|
"globals": "^16.4.0",
|
|
60
60
|
"husky": "^9.1.7",
|
|
61
|
-
"jsdoc-type-pratt-parser": "^
|
|
61
|
+
"jsdoc-type-pratt-parser": "^6.1.2",
|
|
62
62
|
"json-schema": "^0.4.0",
|
|
63
63
|
"json-schema-to-typescript": "^15.0.4",
|
|
64
|
-
"lint-staged": "^16.2.
|
|
65
|
-
"mocha": "^11.7.
|
|
64
|
+
"lint-staged": "^16.2.3",
|
|
65
|
+
"mocha": "^11.7.3",
|
|
66
66
|
"open-editor": "^5.1.0",
|
|
67
67
|
"replace": "^1.2.2",
|
|
68
68
|
"rimraf": "^6.0.1",
|
|
69
69
|
"semantic-release": "^24.2.9",
|
|
70
|
-
"typescript": "5.9.
|
|
71
|
-
"typescript-eslint": "^8.
|
|
70
|
+
"typescript": "5.9.3",
|
|
71
|
+
"typescript-eslint": "^8.45.0"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=20.11.0"
|
|
@@ -178,5 +178,5 @@
|
|
|
178
178
|
"test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
|
|
179
179
|
"test-index": "pnpm run test-no-cov test/rules/index.js"
|
|
180
180
|
},
|
|
181
|
-
"version": "60.
|
|
181
|
+
"version": "60.7.0"
|
|
182
182
|
}
|
package/src/index-cjs.js
CHANGED
|
@@ -21,6 +21,7 @@ import checkTypes from './rules/checkTypes.js';
|
|
|
21
21
|
import checkValues from './rules/checkValues.js';
|
|
22
22
|
import convertToJsdocComments from './rules/convertToJsdocComments.js';
|
|
23
23
|
import emptyTags from './rules/emptyTags.js';
|
|
24
|
+
import escapeInlineTags from './rules/escapeInlineTags.js';
|
|
24
25
|
import implementsOnClasses from './rules/implementsOnClasses.js';
|
|
25
26
|
import importsAsDependencies from './rules/importsAsDependencies.js';
|
|
26
27
|
import informativeDocs from './rules/informativeDocs.js';
|
|
@@ -101,6 +102,7 @@ index.rules = {
|
|
|
101
102
|
'check-values': checkValues,
|
|
102
103
|
'convert-to-jsdoc-comments': convertToJsdocComments,
|
|
103
104
|
'empty-tags': emptyTags,
|
|
105
|
+
'escape-inline-tags': escapeInlineTags,
|
|
104
106
|
'implements-on-classes': implementsOnClasses,
|
|
105
107
|
'imports-as-dependencies': importsAsDependencies,
|
|
106
108
|
'informative-docs': informativeDocs,
|
|
@@ -285,6 +287,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
|
|
|
285
287
|
'jsdoc/check-values': warnOrError,
|
|
286
288
|
'jsdoc/convert-to-jsdoc-comments': 'off',
|
|
287
289
|
'jsdoc/empty-tags': warnOrError,
|
|
290
|
+
'jsdoc/escape-inline-tags': warnOrError,
|
|
288
291
|
'jsdoc/implements-on-classes': warnOrError,
|
|
289
292
|
'jsdoc/imports-as-dependencies': 'off',
|
|
290
293
|
'jsdoc/informative-docs': 'off',
|
|
@@ -451,6 +454,7 @@ const logicalRules = [
|
|
|
451
454
|
'jsdoc/check-types',
|
|
452
455
|
'jsdoc/check-values',
|
|
453
456
|
'jsdoc/empty-tags',
|
|
457
|
+
'jsdoc/escape-inline-tags',
|
|
454
458
|
'jsdoc/implements-on-classes',
|
|
455
459
|
'jsdoc/require-returns-check',
|
|
456
460
|
'jsdoc/require-yields-check',
|
package/src/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import checkTypes from './rules/checkTypes.js';
|
|
|
27
27
|
import checkValues from './rules/checkValues.js';
|
|
28
28
|
import convertToJsdocComments from './rules/convertToJsdocComments.js';
|
|
29
29
|
import emptyTags from './rules/emptyTags.js';
|
|
30
|
+
import escapeInlineTags from './rules/escapeInlineTags.js';
|
|
30
31
|
import implementsOnClasses from './rules/implementsOnClasses.js';
|
|
31
32
|
import importsAsDependencies from './rules/importsAsDependencies.js';
|
|
32
33
|
import informativeDocs from './rules/informativeDocs.js';
|
|
@@ -107,6 +108,7 @@ index.rules = {
|
|
|
107
108
|
'check-values': checkValues,
|
|
108
109
|
'convert-to-jsdoc-comments': convertToJsdocComments,
|
|
109
110
|
'empty-tags': emptyTags,
|
|
111
|
+
'escape-inline-tags': escapeInlineTags,
|
|
110
112
|
'implements-on-classes': implementsOnClasses,
|
|
111
113
|
'imports-as-dependencies': importsAsDependencies,
|
|
112
114
|
'informative-docs': informativeDocs,
|
|
@@ -291,6 +293,7 @@ const createRecommendedRuleset = (warnOrError, flatName) => {
|
|
|
291
293
|
'jsdoc/check-values': warnOrError,
|
|
292
294
|
'jsdoc/convert-to-jsdoc-comments': 'off',
|
|
293
295
|
'jsdoc/empty-tags': warnOrError,
|
|
296
|
+
'jsdoc/escape-inline-tags': warnOrError,
|
|
294
297
|
'jsdoc/implements-on-classes': warnOrError,
|
|
295
298
|
'jsdoc/imports-as-dependencies': 'off',
|
|
296
299
|
'jsdoc/informative-docs': 'off',
|
|
@@ -457,6 +460,7 @@ const logicalRules = [
|
|
|
457
460
|
'jsdoc/check-types',
|
|
458
461
|
'jsdoc/check-values',
|
|
459
462
|
'jsdoc/empty-tags',
|
|
463
|
+
'jsdoc/escape-inline-tags',
|
|
460
464
|
'jsdoc/implements-on-classes',
|
|
461
465
|
'jsdoc/require-returns-check',
|
|
462
466
|
'jsdoc/require-yields-check',
|
package/src/jsdocUtils.js
CHANGED
|
@@ -962,7 +962,7 @@ const mayBeUndefinedTypeTag = (tag, mode) => {
|
|
|
962
962
|
// We do not traverse deeply as it could be, e.g., `Promise<void>`
|
|
963
963
|
parsedTypes &&
|
|
964
964
|
parsedTypes.type === 'JsdocTypeUnion' &&
|
|
965
|
-
parsedTypes.elements.
|
|
965
|
+
parsedTypes.elements.some((elem) => {
|
|
966
966
|
return elem.type === 'JsdocTypeUndefined' ||
|
|
967
967
|
elem.type === 'JsdocTypeName' && elem.value === 'void';
|
|
968
968
|
})) {
|
|
@@ -1845,6 +1845,21 @@ const getRegexFromString = (regexString, requiredFlags) => {
|
|
|
1845
1845
|
return new RegExp(regex, flags);
|
|
1846
1846
|
};
|
|
1847
1847
|
|
|
1848
|
+
const strictNativeTypes = [
|
|
1849
|
+
'undefined',
|
|
1850
|
+
'null',
|
|
1851
|
+
'boolean',
|
|
1852
|
+
'number',
|
|
1853
|
+
'bigint',
|
|
1854
|
+
'string',
|
|
1855
|
+
'symbol',
|
|
1856
|
+
'object',
|
|
1857
|
+
'Array',
|
|
1858
|
+
'Function',
|
|
1859
|
+
'Date',
|
|
1860
|
+
'RegExp',
|
|
1861
|
+
];
|
|
1862
|
+
|
|
1848
1863
|
export {
|
|
1849
1864
|
comparePaths,
|
|
1850
1865
|
dropPathSegmentQuotes,
|
|
@@ -1885,6 +1900,7 @@ export {
|
|
|
1885
1900
|
parseClosureTemplateTag,
|
|
1886
1901
|
pathDoesNotBeginWith,
|
|
1887
1902
|
setTagStructure,
|
|
1903
|
+
strictNativeTypes,
|
|
1888
1904
|
tagMightHaveEitherTypeOrNamePosition,
|
|
1889
1905
|
tagMightHaveNamepath,
|
|
1890
1906
|
tagMightHaveNamePosition,
|
|
@@ -338,8 +338,7 @@ ensure that at least one space is present after the asterisk delimiter.`,
|
|
|
338
338
|
customSpacings: {
|
|
339
339
|
additionalProperties: false,
|
|
340
340
|
description: `An object with any of the following spacing keys set to an integer.
|
|
341
|
-
If a spacing is not defined, it defaults to one
|
|
342
|
-
`,
|
|
341
|
+
If a spacing is not defined, it defaults to one.`,
|
|
343
342
|
properties: {
|
|
344
343
|
postDelimiter: {
|
|
345
344
|
description: 'Affects spacing after the asterisk (e.g., `* @param`)',
|