eslint-plugin-jsdoc 62.9.0 → 63.0.1

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.
Files changed (65) hide show
  1. package/dist/cjs/iterateJsdoc.d.ts +1 -1
  2. package/dist/exportParser.cjs +1 -1
  3. package/dist/exportParser.cjs.map +1 -1
  4. package/dist/iterateJsdoc.cjs +3 -2
  5. package/dist/iterateJsdoc.cjs.map +1 -1
  6. package/dist/iterateJsdoc.d.ts +1 -1
  7. package/dist/rules/emptyTags.cjs +14 -1
  8. package/dist/rules/emptyTags.cjs.map +1 -1
  9. package/dist/rules/implementsOnClasses.cjs +1 -1
  10. package/dist/rules/implementsOnClasses.cjs.map +1 -1
  11. package/dist/rules/matchDescription.cjs +1 -1
  12. package/dist/rules/matchDescription.cjs.map +1 -1
  13. package/dist/rules/matchName.cjs +1 -1
  14. package/dist/rules/matchName.cjs.map +1 -1
  15. package/dist/rules/noDefaults.cjs +1 -1
  16. package/dist/rules/noDefaults.cjs.map +1 -1
  17. package/dist/rules/noMissingSyntax.cjs +1 -1
  18. package/dist/rules/noMissingSyntax.cjs.map +1 -1
  19. package/dist/rules/noRestrictedSyntax.cjs +1 -1
  20. package/dist/rules/noRestrictedSyntax.cjs.map +1 -1
  21. package/dist/rules/noTypes.cjs +1 -1
  22. package/dist/rules/noTypes.cjs.map +1 -1
  23. package/dist/rules/requireDescription.cjs +1 -1
  24. package/dist/rules/requireDescription.cjs.map +1 -1
  25. package/dist/rules/requireExample.cjs +1 -1
  26. package/dist/rules/requireExample.cjs.map +1 -1
  27. package/dist/rules/requireJsdoc.cjs +1 -1
  28. package/dist/rules/requireJsdoc.cjs.map +1 -1
  29. package/dist/rules/requireParam.cjs +1 -1
  30. package/dist/rules/requireParam.cjs.map +1 -1
  31. package/dist/rules/requireParamDescription.cjs +1 -1
  32. package/dist/rules/requireParamDescription.cjs.map +1 -1
  33. package/dist/rules/requireParamName.cjs +1 -1
  34. package/dist/rules/requireParamName.cjs.map +1 -1
  35. package/dist/rules/requireParamType.cjs +1 -1
  36. package/dist/rules/requireParamType.cjs.map +1 -1
  37. package/dist/rules/requireReturnsDescription.cjs +1 -1
  38. package/dist/rules/requireReturnsDescription.cjs.map +1 -1
  39. package/dist/rules/requireReturnsType.cjs +1 -1
  40. package/dist/rules/requireReturnsType.cjs.map +1 -1
  41. package/dist/rules/requireThrows.cjs +1 -1
  42. package/dist/rules/requireThrows.cjs.map +1 -1
  43. package/dist/rules.d.ts +16 -16
  44. package/package.json +27 -39
  45. package/src/exportParser.js +1 -1
  46. package/src/iterateJsdoc.js +5 -2
  47. package/src/rules/emptyTags.js +14 -0
  48. package/src/rules/implementsOnClasses.js +1 -1
  49. package/src/rules/matchDescription.js +1 -1
  50. package/src/rules/matchName.js +1 -1
  51. package/src/rules/noDefaults.js +1 -1
  52. package/src/rules/noMissingSyntax.js +1 -1
  53. package/src/rules/noRestrictedSyntax.js +1 -1
  54. package/src/rules/noTypes.js +1 -1
  55. package/src/rules/requireDescription.js +1 -1
  56. package/src/rules/requireExample.js +1 -1
  57. package/src/rules/requireJsdoc.js +1 -1
  58. package/src/rules/requireParam.js +1 -1
  59. package/src/rules/requireParamDescription.js +1 -1
  60. package/src/rules/requireParamName.js +1 -1
  61. package/src/rules/requireParamType.js +1 -1
  62. package/src/rules/requireReturnsDescription.js +1 -1
  63. package/src/rules/requireReturnsType.js +1 -1
  64. package/src/rules/requireThrows.js +1 -1
  65. package/src/rules.d.ts +16 -16
@@ -1 +1 @@
1
- {"version":3,"file":"requireReturnsDescription.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","report","utils","forEachPreferredTag","jsdocTag","targetTagName","type","trim","includes","description","contextDefaults","meta","docs","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context","module"],"sources":["../../src/rules/requireReturnsDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('returns', (jsdocTag, targetTagName) => {\n const type = jsdocTag.type && jsdocTag.type.trim();\n\n if ([\n 'Promise<undefined>', 'Promise<void>', 'undefined', 'void',\n ].includes(type)) {\n return;\n }\n\n if (!jsdocTag.description.trim()) {\n report(`Missing JSDoc @${targetTagName} description.`, null, jsdocTag);\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that the `@returns` tag has a `description` value (not including `void`/`undefined` type returns).',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.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 (or an object with\noptional \\`context\\` and \\`comment\\` properties) where you wish the 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\nSee the [\"AST and Selectors\"](../#advanced-ast-and-selectors)\nsection of our Advanced docs for more on the expected format.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC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AC;AAAAgB,MAAA,CAAAvB,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"requireReturnsDescription.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","report","utils","forEachPreferredTag","jsdocTag","targetTagName","type","trim","includes","description","contextDefaults","meta","docs","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context","module"],"sources":["../../src/rules/requireReturnsDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('returns', (jsdocTag, targetTagName) => {\n const type = jsdocTag.type && jsdocTag.type.trim();\n\n if ([\n 'Promise<undefined>', 'Promise<void>', 'undefined', 'void',\n ].includes(type)) {\n return;\n }\n\n if (!jsdocTag.description.trim()) {\n report(`Missing JSDoc @${targetTagName} description.`, null, jsdocTag);\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that the `@returns` tag has a `description` value (not including `void`/`undefined` type returns).',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.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 (or an object with\noptional \\`context\\` and \\`comment\\` properties) where you wish the 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\nSee the [\"AST and Selectors\"](../advanced.md#ast-and-selectors)\nsection of our Advanced docs for more on the expected format.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,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,MAAM;EACNC;AACF,CAAC,KAAK;EACJA,KAAK,CAACC,mBAAmB,CAAC,SAAS,EAAE,CAACC,QAAQ,EAAEC,aAAa,KAAK;IAChE,MAAMC,IAAI,GAAGF,QAAQ,CAACE,IAAI,IAAIF,QAAQ,CAACE,IAAI,CAACC,IAAI,CAAC,CAAC;IAElD,IAAI,CACF,oBAAoB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,CAC3D,CAACC,QAAQ,CAACF,IAAI,CAAC,EAAE;MAChB;IACF;IAEA,IAAI,CAACF,QAAQ,CAACK,WAAW,CAACF,IAAI,CAAC,CAAC,EAAE;MAChCN,MAAM,CAAC,kBAAkBI,aAAa,eAAe,EAAE,IAAI,EAAED,QAAQ,CAAC;IACxE;EACF,CAAC,CAAC;AACJ,CAAC,EAAE;EACDM,eAAe,EAAE,IAAI;EACrBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJH,WAAW,EAAE,6GAA6G;MAC1HI,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVC,QAAQ,EAAE;UACRR,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;UAClDS,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACEb,IAAI,EAAE;YACR,CAAC,EACD;cACES,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACVI,OAAO,EAAE;kBACPd,IAAI,EAAE;gBACR,CAAC;gBACDe,OAAO,EAAE;kBACPf,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAgB,MAAA,CAAAvB,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
@@ -38,7 +38,7 @@ for finding function blocks not attached to a function declaration or
38
38
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
39
39
  \`@method\`) (including those associated with an \`@interface\`).
40
40
 
41
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
41
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
42
42
  section of our Advanced docs for more on the expected format.`,
43
43
  items: {
44
44
  anyOf: [{
@@ -1 +1 @@
1
- {"version":3,"file":"requireReturnsType.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","report","utils","forEachPreferredTag","jsdocTag","targetTagName","type","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context","module"],"sources":["../../src/rules/requireReturnsType.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('returns', (jsdocTag, targetTagName) => {\n if (!jsdocTag.type) {\n report(`Missing JSDoc @${targetTagName} type.`, null, jsdocTag);\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that `@returns` tag has type value (in curly brackets).',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.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 (or an object with\noptional \\`context\\` and \\`comment\\` properties) where you wish the 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\nSee the [\"AST and Selectors\"](../#advanced-ast-and-selectors)\nsection of our Advanced docs for more on the expected format.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,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,MAAM;EACNC;AACF,CAAC,KAAK;EACJA,KAAK,CAACC,mBAAmB,CAAC,SAAS,EAAE,CAACC,QAAQ,EAAEC,aAAa,KAAK;IAChE,IAAI,CAACD,QAAQ,CAACE,IAAI,EAAE;MAClBL,MAAM,CAAC,kBAAkBI,aAAa,QAAQ,EAAE,IAAI,EAAED,QAAQ,CAAC;IACjE;EACF,CAAC,CAAC;AACJ,CAAC,EAAE;EACDG,eAAe,EAAE,IAAI;EACrBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,kEAAkE;MAC/EC,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVC,QAAQ,EAAE;UACRL,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;UAClDM,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACEX,IAAI,EAAE;YACR,CAAC,EACD;cACEO,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACVI,OAAO,EAAE;kBACPZ,IAAI,EAAE;gBACR,CAAC;gBACDa,OAAO,EAAE;kBACPb,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAc,MAAA,CAAArB,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
1
+ {"version":3,"file":"requireReturnsType.cjs","names":["_iterateJsdoc","_interopRequireDefault","require","e","__esModule","default","_default","exports","iterateJsdoc","report","utils","forEachPreferredTag","jsdocTag","targetTagName","type","contextDefaults","meta","docs","description","url","schema","additionalProperties","properties","contexts","items","anyOf","comment","context","module"],"sources":["../../src/rules/requireReturnsType.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\nexport default iterateJsdoc(({\n report,\n utils,\n}) => {\n utils.forEachPreferredTag('returns', (jsdocTag, targetTagName) => {\n if (!jsdocTag.type) {\n report(`Missing JSDoc @${targetTagName} type.`, null, jsdocTag);\n }\n });\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that `@returns` tag has type value (in curly brackets).',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.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 (or an object with\noptional \\`context\\` and \\`comment\\` properties) where you wish the 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\nSee the [\"AST and Selectors\"](../advanced.md#ast-and-selectors)\nsection of our Advanced docs for more on the expected format.`,\n items: {\n anyOf: [\n {\n type: 'string',\n },\n {\n additionalProperties: false,\n properties: {\n comment: {\n type: 'string',\n },\n context: {\n type: 'string',\n },\n },\n type: 'object',\n },\n ],\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAE,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,MAAM;EACNC;AACF,CAAC,KAAK;EACJA,KAAK,CAACC,mBAAmB,CAAC,SAAS,EAAE,CAACC,QAAQ,EAAEC,aAAa,KAAK;IAChE,IAAI,CAACD,QAAQ,CAACE,IAAI,EAAE;MAClBL,MAAM,CAAC,kBAAkBI,aAAa,QAAQ,EAAE,IAAI,EAAED,QAAQ,CAAC;IACjE;EACF,CAAC,CAAC;AACJ,CAAC,EAAE;EACDG,eAAe,EAAE,IAAI;EACrBC,IAAI,EAAE;IACJC,IAAI,EAAE;MACJC,WAAW,EAAE,kEAAkE;MAC/EC,GAAG,EAAE;IACP,CAAC;IACDC,MAAM,EAAE,CACN;MACEC,oBAAoB,EAAE,KAAK;MAC3BC,UAAU,EAAE;QACVC,QAAQ,EAAE;UACRL,WAAW,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;UAClDM,KAAK,EAAE;YACLC,KAAK,EAAE,CACL;cACEX,IAAI,EAAE;YACR,CAAC,EACD;cACEO,oBAAoB,EAAE,KAAK;cAC3BC,UAAU,EAAE;gBACVI,OAAO,EAAE;kBACPZ,IAAI,EAAE;gBACR,CAAC;gBACDa,OAAO,EAAE;kBACPb,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR;MACF,CAAC;MACDA,IAAI,EAAE;IACR,CAAC,CACF;IACDA,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAAc,MAAA,CAAArB,OAAA,GAAAA,OAAA,CAAAF,OAAA","ignoreList":[]}
@@ -21,7 +21,7 @@ const canSkip = utils => {
21
21
  // so it is not necessary to document that they throw an error.
22
22
  'abstract', 'virtual',
23
23
  // The designated type can itself document `@throws`
24
- 'type']) || utils.avoidDocs();
24
+ 'type']) || utils.avoidDocs(false);
25
25
  };
26
26
  var _default = exports.default = (0, _iterateJsdoc.default)(({
27
27
  report,
@@ -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;AACrB,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,KAA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E;kBACPd,IAAI,EAAE;gBACR,CAAC;gBACDe,OAAO,EAAE;kBACPf,IAAI,EAAE;gBACR;cACF,CAAC;cACDA,IAAI,EAAE;YACR,CAAC;UAEL,CAAC;UACDA,IAAI,EAAE;QACR,CAAC;QACDgB,UAAU,EAAE;UACVV,WAAW,EAAE;AACzB;AACA;AACA;AACA,uBAAuB;UACXM,KAAK,EAAE;YACLZ,IAAI,EAAE;UACR,CAAC;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":[]}
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,IAAI;EACR,MAAMK,gBAAgB,GAAG,OAAOD,GAAG,KAAK,WAAW,IAAIA,GAAG,KAAK,IAAI;EAEnE,MAAME,YAAY,GAAGA,CAAA,KAAM;IACzB,IAAI,CAACD,gBAAgB,EAAE;MACrB,IAAID,GAAG,CAACG,IAAI,CAACC,IAA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CHANGED
@@ -575,7 +575,7 @@ export interface Rules {
575
575
  * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
576
576
  * `@method`) (including those associated with an `@interface`).
577
577
  *
578
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
578
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
579
579
  * section of our Advanced docs for more on the expected format.
580
580
  */
581
581
  contexts?: (
@@ -705,7 +705,7 @@ export interface Rules {
705
705
  * `FunctionExpression`). Set to `"any"` if you want the rule to apply to any
706
706
  * JSDoc block throughout your files.
707
707
  *
708
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
708
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
709
709
  * section of our Advanced docs for more on the expected format.
710
710
  */
711
711
  contexts?: (
@@ -900,7 +900,7 @@ export interface Rules {
900
900
  /**
901
901
  * AST to confine the allowing or disallowing to JSDoc blocks
902
902
  * associated with a particular context. See the
903
- * ["AST and Selectors"](../#advanced-ast-and-selectors)
903
+ * ["AST and Selectors"](../advanced.md#ast-and-selectors)
904
904
  * section of our Advanced docs for more on the expected format.
905
905
  */
906
906
  context?: string;
@@ -1087,7 +1087,7 @@ export interface Rules {
1087
1087
  * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
1088
1088
  * `@method`) (including those associated with an `@interface`).
1089
1089
  *
1090
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1090
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
1091
1091
  * section of our Advanced docs for more on the expected format.
1092
1092
  */
1093
1093
  contexts?: (
@@ -1133,7 +1133,7 @@ export interface Rules {
1133
1133
  * function declaration or expression, i.e., `@callback` or `@function` (or its
1134
1134
  * aliases `@func` or `@method`) (including those associated with an `@interface`).
1135
1135
  *
1136
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1136
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
1137
1137
  * section of our Advanced docs for more on the expected format.
1138
1138
  */
1139
1139
  contexts?: (
@@ -1215,7 +1215,7 @@ export interface Rules {
1215
1215
  * function declaration or expression, i.e., `@callback` or `@function` (or its
1216
1216
  * aliases `@func` or `@method`) (including those associated with an `@interface`).
1217
1217
  *
1218
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1218
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
1219
1219
  * section of our Advanced docs for more on the expected format.
1220
1220
  */
1221
1221
  contexts: (
@@ -1248,7 +1248,7 @@ export interface Rules {
1248
1248
  * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
1249
1249
  * `@method`) (including those associated with an `@interface`).
1250
1250
  *
1251
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1251
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
1252
1252
  * section of our Advanced docs for more on the expected format.
1253
1253
  */
1254
1254
  contexts?: (
@@ -1396,7 +1396,7 @@ export interface Rules {
1396
1396
  * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
1397
1397
  * `@method`) (including those associated with an `@interface`).
1398
1398
  *
1399
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1399
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
1400
1400
  * section of our Advanced docs for more on the expected format.
1401
1401
  */
1402
1402
  contexts?: (
@@ -1495,7 +1495,7 @@ export interface Rules {
1495
1495
  * `FunctionExpression`). Set to `"any"` if you want the rule to apply to any
1496
1496
  * JSDoc block throughout your files.
1497
1497
  *
1498
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1498
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
1499
1499
  * section of our Advanced docs for more on the expected format.
1500
1500
  */
1501
1501
  contexts?: (
@@ -1681,7 +1681,7 @@ export interface Rules {
1681
1681
  * Note that you may need to disable `require` items (e.g., `MethodDefinition`)
1682
1682
  * if you are specifying a more precise form in `contexts` (e.g., `MethodDefinition:not([accessibility="private"] > FunctionExpression`).
1683
1683
  *
1684
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1684
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
1685
1685
  * section of our Advanced docs for more on the expected format.
1686
1686
  */
1687
1687
  contexts?: (
@@ -1938,7 +1938,7 @@ export interface Rules {
1938
1938
  * `TSMethodSignature` in TypeScript or restricting the contexts
1939
1939
  * which are checked.
1940
1940
  *
1941
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1941
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
1942
1942
  * section of our Advanced docs for more on the expected format.
1943
1943
  */
1944
1944
  contexts?: (
@@ -2090,7 +2090,7 @@ export interface Rules {
2090
2090
  * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2091
2091
  * `@method`) (including those associated with an `@interface`).
2092
2092
  *
2093
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2093
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
2094
2094
  * section of our Advanced docs for more on the expected format.
2095
2095
  */
2096
2096
  contexts?: (
@@ -2134,7 +2134,7 @@ export interface Rules {
2134
2134
  * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2135
2135
  * `@method`) (including those associated with an `@interface`).
2136
2136
  *
2137
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2137
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
2138
2138
  * section of our Advanced docs for more on the expected format.
2139
2139
  */
2140
2140
  contexts?: (
@@ -2165,7 +2165,7 @@ export interface Rules {
2165
2165
  * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2166
2166
  * `@method`) (including those associated with an `@interface`).
2167
2167
  *
2168
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2168
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
2169
2169
  * section of our Advanced docs for more on the expected format.
2170
2170
  */
2171
2171
  contexts?: (
@@ -2394,7 +2394,7 @@ export interface Rules {
2394
2394
  * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2395
2395
  * `@method`) (including those associated with an `@interface`).
2396
2396
  *
2397
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2397
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
2398
2398
  * section of our Advanced docs for more on the expected format.
2399
2399
  */
2400
2400
  contexts?: (
@@ -2425,7 +2425,7 @@ export interface Rules {
2425
2425
  * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2426
2426
  * `@method`) (including those associated with an `@interface`).
2427
2427
  *
2428
- * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2428
+ * See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
2429
2429
  * section of our Advanced docs for more on the expected format.
2430
2430
  */
2431
2431
  contexts?: (
package/package.json CHANGED
@@ -5,78 +5,78 @@
5
5
  "url": "http://gajus.com"
6
6
  },
7
7
  "dependencies": {
8
- "@es-joy/jsdoccomment": "~0.86.0",
8
+ "@es-joy/jsdoccomment": "~0.87.0",
9
9
  "@es-joy/resolve.exports": "1.2.0",
10
10
  "are-docs-informative": "^0.0.2",
11
- "comment-parser": "1.4.6",
11
+ "comment-parser": "1.4.7",
12
12
  "debug": "^4.4.3",
13
13
  "escape-string-regexp": "^4.0.0",
14
14
  "espree": "^11.2.0",
15
15
  "esquery": "^1.7.0",
16
16
  "html-entities": "^2.6.0",
17
- "object-deep-merge": "^2.0.0",
17
+ "object-deep-merge": "^2.0.1",
18
18
  "parse-imports-exports": "^0.2.4",
19
- "semver": "^7.7.4",
19
+ "semver": "^7.8.1",
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": "^7.28.6",
27
- "@babel/core": "8.0.0-rc.1",
28
- "@babel/eslint-parser": "8.0.0-rc.1",
29
- "@babel/plugin-transform-flow-strip-types": "8.0.0-rc.1",
30
- "@babel/preset-env": "8.0.0-rc.1",
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.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.6",
37
+ "@semantic-release/github": "^12.0.8",
38
38
  "@semantic-release/npm": "^13.1.5",
39
39
  "@types/chai": "^5.2.3",
40
40
  "@types/debug": "^4.1.13",
41
41
  "@types/esquery": "^1.5.4",
42
- "@types/estree": "^1.0.8",
42
+ "@types/estree": "^1.0.9",
43
43
  "@types/json-schema": "^7.0.15",
44
44
  "@types/mocha": "^10.0.10",
45
- "@types/node": "^25.5.0",
45
+ "@types/node": "^25.9.1",
46
46
  "@types/semver": "^7.7.1",
47
- "@types/spdx-expression-parse": "^3.0.5",
48
- "@typescript-eslint/types": "8.58.0",
47
+ "@types/spdx-expression-parse": "^4.0.0",
48
+ "@typescript-eslint/types": "8.59.4",
49
49
  "babel-plugin-add-module-exports": "^1.0.4",
50
- "babel-plugin-istanbul": "^7.0.1",
50
+ "babel-plugin-istanbul": "^8.0.0",
51
51
  "babel-plugin-transform-import-meta": "^2.3.3",
52
52
  "c8": "^11.0.0",
53
53
  "camelcase": "^9.0.0",
54
54
  "chai": "^6.2.2",
55
55
  "decamelize": "^6.0.1",
56
- "eslint": "10.1.0",
56
+ "eslint": "10.4.0",
57
57
  "eslint-config-canonical": "^47.4.2",
58
58
  "gitdown": "^4.1.1",
59
59
  "glob": "^13.0.6",
60
- "globals": "^17.4.0",
60
+ "globals": "^17.6.0",
61
61
  "husky": "^9.1.7",
62
62
  "jsdoc-type-pratt-parser": "^7.2.0",
63
63
  "json-schema": "^0.4.0",
64
64
  "json-schema-to-typescript": "^15.0.4",
65
- "lint-staged": "^16.4.0",
66
- "mocha": "^11.7.5",
65
+ "lint-staged": "^17.0.5",
66
+ "mocha": "^11.7.6",
67
67
  "open-editor": "^6.0.0",
68
- "playwright": "^1.59.0",
68
+ "playwright": "^1.60.0",
69
69
  "replace": "^1.2.2",
70
70
  "rimraf": "^6.1.3",
71
- "rollup": "^4.60.1",
71
+ "rollup": "^4.60.4",
72
72
  "semantic-release": "^25.0.3",
73
- "sinon": "^21.0.3",
73
+ "sinon": "^22.0.0",
74
74
  "ts-api-utils": "^2.5.0",
75
75
  "typescript": "5.9.3",
76
- "typescript-eslint": "8.58.0"
76
+ "typescript-eslint": "8.59.4"
77
77
  },
78
78
  "engines": {
79
- "node": "^20.19.0 || ^22.13.0 || >=24"
79
+ "node": "^22.13.0 || >=24"
80
80
  },
81
81
  "keywords": [
82
82
  "eslint",
@@ -158,18 +158,6 @@
158
158
  "run-if-changed": {
159
159
  "pnpm-lock.yaml": "pnpm run install-offline"
160
160
  },
161
- "pnpm": {
162
- "overrides": {
163
- "@types/eslint": "0.0.0-interferes-with-eslint-now",
164
- "eslint-scope": "9.1.0"
165
- },
166
- "ignoredBuiltDependencies": [
167
- "core-js",
168
- "core-js-pure",
169
- "re2",
170
- "unrs-resolver"
171
- ]
172
- },
173
161
  "scripts": {
174
162
  "ruleTypes": "node ./src/bin/generateRuleTypes.js",
175
163
  "tsc": "tsc",
@@ -182,7 +170,7 @@
182
170
  "create-docs": "pnpm run create-options && node ./src/bin/generateDocs.js && pnpm ruleTypes",
183
171
  "create-rule": "node ./src/bin/generateRule.js",
184
172
  "create-options": "node ./src/bin/generateOptions.js",
185
- "install-offline": "pnpm install --prefer-offline",
173
+ "install-offline": "CI=1 pnpm install --prefer-offline --no-frozen-lockfile",
186
174
  "lint": "eslint",
187
175
  "lint-fix": "eslint --fix",
188
176
  "prepare": "husky",
@@ -191,5 +179,5 @@
191
179
  "test-cov": "TIMING=1 c8 --reporter text pnpm run test-no-cov",
192
180
  "test-index": "pnpm run test-no-cov test/rules/index.js"
193
181
  },
194
- "version": "62.9.0"
182
+ "version": "63.0.1"
195
183
  }
@@ -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').PrivateIdentifier} */
285
+ /** @type {import('estree').Identifier} */
286
286
  (
287
287
  /** @type {import('estree').Property} */ (prop).key
288
288
  ).name
@@ -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,
@@ -55,6 +55,14 @@ export default iterateJsdoc(({
55
55
  // Allow for JSDoc-block final asterisks
56
56
  key !== emptyTags.length - 1 || !(/^\s*\*+$/v).test(content)
57
57
  )) {
58
+ const {
59
+ tokens: {
60
+ delimiter,
61
+ end,
62
+ postName,
63
+ start,
64
+ },
65
+ } = tag.source[0];
58
66
  const fix = () => {
59
67
  // By time of call in fixer, `tag` will have `line` added
60
68
  utils.setTag(
@@ -63,6 +71,12 @@ export default iterateJsdoc(({
63
71
  * line: import('../iterateJsdoc.js').Integer
64
72
  * }}
65
73
  */ (tag),
74
+ {
75
+ delimiter,
76
+ end,
77
+ postName: end ? postName : '',
78
+ start,
79
+ },
66
80
  );
67
81
  };
68
82
 
@@ -46,7 +46,7 @@ for finding function blocks not attached to a function declaration or
46
46
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
47
47
  \`@method\`) (including those associated with an \`@interface\`).
48
48
 
49
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
49
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
50
50
  section of our Advanced docs for more on the expected format.`,
51
51
  items: {
52
52
  anyOf: [
@@ -183,7 +183,7 @@ Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclarati
183
183
  \`FunctionExpression\`). Set to \`"any"\` if you want the rule to apply to any
184
184
  JSDoc block throughout your files.
185
185
 
186
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
186
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
187
187
  section of our Advanced docs for more on the expected format.`,
188
188
  items: {
189
189
  anyOf: [
@@ -135,7 +135,7 @@ Accepts a string regular expression (optionally wrapped between two
135
135
  context: {
136
136
  description: `AST to confine the allowing or disallowing to JSDoc blocks
137
137
  associated with a particular context. See the
138
- ["AST and Selectors"](../#advanced-ast-and-selectors)
138
+ ["AST and Selectors"](../advanced.md#ast-and-selectors)
139
139
  section of our Advanced docs for more on the expected format.`,
140
140
  type: 'string',
141
141
  },
@@ -64,7 +64,7 @@ for finding function blocks not attached to a function declaration or
64
64
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
65
65
  \`@method\`) (including those associated with an \`@interface\`).
66
66
 
67
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
67
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
68
68
  section of our Advanced docs for more on the expected format.`,
69
69
  items: {
70
70
  anyOf: [
@@ -177,7 +177,7 @@ your files (as is necessary for finding function blocks not attached to a
177
177
  function declaration or expression, i.e., \`@callback\` or \`@function\` (or its
178
178
  aliases \`@func\` or \`@method\`) (including those associated with an \`@interface\`).
179
179
 
180
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
180
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
181
181
  section of our Advanced docs for more on the expected format.`,
182
182
  items: {
183
183
  anyOf: [
@@ -35,7 +35,7 @@ your files (as is necessary for finding function blocks not attached to a
35
35
  function declaration or expression, i.e., \`@callback\` or \`@function\` (or its
36
36
  aliases \`@func\` or \`@method\`) (including those associated with an \`@interface\`).
37
37
 
38
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
38
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
39
39
  section of our Advanced docs for more on the expected format.`,
40
40
  items: {
41
41
  anyOf: [
@@ -76,7 +76,7 @@ for finding function blocks not attached to a function declaration or
76
76
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
77
77
  \`@method\`) (including those associated with an \`@interface\`).
78
78
 
79
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
79
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
80
80
  section of our Advanced docs for more on the expected format.`,
81
81
  items: {
82
82
  anyOf: [
@@ -138,7 +138,7 @@ for finding function blocks not attached to a function declaration or
138
138
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
139
139
  \`@method\`) (including those associated with an \`@interface\`).
140
140
 
141
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
141
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
142
142
  section of our Advanced docs for more on the expected format.`,
143
143
  items: {
144
144
  anyOf: [
@@ -88,7 +88,7 @@ Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclarati
88
88
  \`FunctionExpression\`). Set to \`"any"\` if you want the rule to apply to any
89
89
  JSDoc block throughout your files.
90
90
 
91
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
91
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
92
92
  section of our Advanced docs for more on the expected format.`,
93
93
  items: {
94
94
  anyOf: [
@@ -102,7 +102,7 @@ for it to require documentation.
102
102
  Note that you may need to disable \`require\` items (e.g., \`MethodDefinition\`)
103
103
  if you are specifying a more precise form in \`contexts\` (e.g., \`MethodDefinition:not([accessibility="private"] > FunctionExpression\`).
104
104
 
105
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
105
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
106
106
  section of our Advanced docs for more on the expected format.`,
107
107
  items: {
108
108
  anyOf: [
@@ -684,7 +684,7 @@ Overrides the default contexts (\`ArrowFunctionExpression\`, \`FunctionDeclarati
684
684
  \`TSMethodSignature\` in TypeScript or restricting the contexts
685
685
  which are checked.
686
686
 
687
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
687
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
688
688
  section of our Advanced docs for more on the expected format.`,
689
689
  items: {
690
690
  anyOf: [
@@ -65,7 +65,7 @@ for finding function blocks not attached to a function declaration or
65
65
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
66
66
  \`@method\`) (including those associated with an \`@interface\`).
67
67
 
68
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
68
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
69
69
  section of our Advanced docs for more on the expected format.`,
70
70
  items: {
71
71
  anyOf: [
@@ -37,7 +37,7 @@ for finding function blocks not attached to a function declaration or
37
37
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
38
38
  \`@method\`) (including those associated with an \`@interface\`).
39
39
 
40
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
40
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
41
41
  section of our Advanced docs for more on the expected format.`,
42
42
  items: {
43
43
  anyOf: [
@@ -65,7 +65,7 @@ for finding function blocks not attached to a function declaration or
65
65
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
66
66
  \`@method\`) (including those associated with an \`@interface\`).
67
67
 
68
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
68
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
69
69
  section of our Advanced docs for more on the expected format.`,
70
70
  items: {
71
71
  anyOf: [
@@ -41,7 +41,7 @@ for finding function blocks not attached to a function declaration or
41
41
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
42
42
  \`@method\`) (including those associated with an \`@interface\`).
43
43
 
44
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
44
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
45
45
  section of our Advanced docs for more on the expected format.`,
46
46
  items: {
47
47
  anyOf: [
@@ -33,7 +33,7 @@ for finding function blocks not attached to a function declaration or
33
33
  expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
34
34
  \`@method\`) (including those associated with an \`@interface\`).
35
35
 
36
- See the ["AST and Selectors"](../#advanced-ast-and-selectors)
36
+ See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
37
37
  section of our Advanced docs for more on the expected format.`,
38
38
  items: {
39
39
  anyOf: [
@@ -19,7 +19,7 @@ const canSkip = (utils) => {
19
19
  // The designated type can itself document `@throws`
20
20
  'type',
21
21
  ]) ||
22
- utils.avoidDocs();
22
+ utils.avoidDocs(false);
23
23
  };
24
24
 
25
25
  export default iterateJsdoc(({