@depup/eslint-plugin-jsdoc 63.3.2-depup.1 → 64.0.0-depup.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.
Files changed (272) hide show
  1. package/README.md +3 -11
  2. package/changes.json +3 -16
  3. package/dist/index.d.ts +7 -4
  4. package/package.json +29 -67
  5. package/src/index.js +7 -8
  6. package/dist/WarnSettings.cjs +0 -38
  7. package/dist/WarnSettings.cjs.map +0 -1
  8. package/dist/alignTransform.cjs +0 -402
  9. package/dist/alignTransform.cjs.map +0 -1
  10. package/dist/buildForbidRuleDefinition.cjs +0 -101
  11. package/dist/buildForbidRuleDefinition.cjs.map +0 -1
  12. package/dist/buildRejectOrPreferRuleDefinition.cjs +0 -352
  13. package/dist/buildRejectOrPreferRuleDefinition.cjs.map +0 -1
  14. package/dist/cjs/WarnSettings.d.ts +0 -16
  15. package/dist/cjs/alignTransform.d.ts +0 -33
  16. package/dist/cjs/buildForbidRuleDefinition.d.ts +0 -14
  17. package/dist/cjs/buildRejectOrPreferRuleDefinition.d.ts +0 -8
  18. package/dist/cjs/defaultTagOrder.d.ts +0 -4
  19. package/dist/cjs/exportParser.d.ts +0 -40
  20. package/dist/cjs/getDefaultTagStructureForMode.d.ts +0 -10
  21. package/dist/cjs/getJsdocProcessorPlugin.d.cts +0 -5
  22. package/dist/cjs/getJsdocProcessorPlugin.d.ts +0 -66
  23. package/dist/cjs/index-cjs.d.ts +0 -23
  24. package/dist/cjs/index.cjs.d.cts +0 -2
  25. package/dist/cjs/iterateJsdoc.d.cts +0 -7
  26. package/dist/cjs/iterateJsdoc.d.ts +0 -495
  27. package/dist/cjs/jsdocUtils.d.ts +0 -500
  28. package/dist/cjs/rules/checkAccess.d.ts +0 -2
  29. package/dist/cjs/rules/checkAlignment.d.ts +0 -2
  30. package/dist/cjs/rules/checkExamples.d.ts +0 -3
  31. package/dist/cjs/rules/checkIndentation.d.ts +0 -2
  32. package/dist/cjs/rules/checkLineAlignment.d.ts +0 -9
  33. package/dist/cjs/rules/checkParamNames.d.ts +0 -2
  34. package/dist/cjs/rules/checkPropertyNames.d.ts +0 -2
  35. package/dist/cjs/rules/checkSyntax.d.ts +0 -2
  36. package/dist/cjs/rules/checkTagNames.d.ts +0 -2
  37. package/dist/cjs/rules/checkTemplateNames.d.ts +0 -2
  38. package/dist/cjs/rules/checkTypes.d.ts +0 -7
  39. package/dist/cjs/rules/checkValues.d.ts +0 -2
  40. package/dist/cjs/rules/convertToJsdocComments.d.ts +0 -266
  41. package/dist/cjs/rules/emptyTags.d.ts +0 -2
  42. package/dist/cjs/rules/escapeInlineTags.d.ts +0 -2
  43. package/dist/cjs/rules/implementsOnClasses.d.ts +0 -2
  44. package/dist/cjs/rules/importsAsDependencies.d.ts +0 -2
  45. package/dist/cjs/rules/informativeDocs.d.ts +0 -2
  46. package/dist/cjs/rules/linesBeforeBlock.d.ts +0 -2
  47. package/dist/cjs/rules/matchDescription.d.ts +0 -2
  48. package/dist/cjs/rules/matchName.d.ts +0 -2
  49. package/dist/cjs/rules/multilineBlocks.d.ts +0 -2
  50. package/dist/cjs/rules/noBadBlocks.d.ts +0 -2
  51. package/dist/cjs/rules/noBlankBlockDescriptions.d.ts +0 -2
  52. package/dist/cjs/rules/noBlankBlocks.d.ts +0 -2
  53. package/dist/cjs/rules/noDefaults.d.ts +0 -2
  54. package/dist/cjs/rules/noMissingSyntax.d.ts +0 -9
  55. package/dist/cjs/rules/noMultiAsterisks.d.ts +0 -2
  56. package/dist/cjs/rules/noRestrictedSyntax.d.ts +0 -2
  57. package/dist/cjs/rules/noTypes.d.ts +0 -2
  58. package/dist/cjs/rules/noUndefinedTypes.d.ts +0 -2
  59. package/dist/cjs/rules/normalizeSeeLinks.d.ts +0 -2
  60. package/dist/cjs/rules/preferImportTag.d.ts +0 -2
  61. package/dist/cjs/rules/requireAsteriskPrefix.d.ts +0 -2
  62. package/dist/cjs/rules/requireDescription.d.ts +0 -2
  63. package/dist/cjs/rules/requireDescriptionCompleteSentence.d.ts +0 -2
  64. package/dist/cjs/rules/requireExample.d.ts +0 -2
  65. package/dist/cjs/rules/requireFileOverview.d.ts +0 -2
  66. package/dist/cjs/rules/requireHyphenBeforeParamDescription.d.ts +0 -2
  67. package/dist/cjs/rules/requireJsdoc.d.ts +0 -24
  68. package/dist/cjs/rules/requireParam.d.ts +0 -3
  69. package/dist/cjs/rules/requireParamDescription.d.ts +0 -2
  70. package/dist/cjs/rules/requireParamName.d.ts +0 -2
  71. package/dist/cjs/rules/requireParamType.d.ts +0 -2
  72. package/dist/cjs/rules/requireProperty.d.ts +0 -2
  73. package/dist/cjs/rules/requirePropertyDescription.d.ts +0 -2
  74. package/dist/cjs/rules/requirePropertyName.d.ts +0 -2
  75. package/dist/cjs/rules/requirePropertyType.d.ts +0 -2
  76. package/dist/cjs/rules/requireRejects.d.ts +0 -2
  77. package/dist/cjs/rules/requireReturns.d.ts +0 -2
  78. package/dist/cjs/rules/requireReturnsCheck.d.ts +0 -2
  79. package/dist/cjs/rules/requireReturnsDescription.d.ts +0 -2
  80. package/dist/cjs/rules/requireReturnsType.d.ts +0 -2
  81. package/dist/cjs/rules/requireTags.d.ts +0 -2
  82. package/dist/cjs/rules/requireTemplate.d.ts +0 -2
  83. package/dist/cjs/rules/requireThrows.d.ts +0 -2
  84. package/dist/cjs/rules/requireYields.d.ts +0 -2
  85. package/dist/cjs/rules/requireYieldsCheck.d.ts +0 -2
  86. package/dist/cjs/rules/sortTags.d.ts +0 -2
  87. package/dist/cjs/rules/tagLines.d.ts +0 -2
  88. package/dist/cjs/rules/textEscaping.d.ts +0 -2
  89. package/dist/cjs/rules/tsMethodSignatureStyle.d.ts +0 -2
  90. package/dist/cjs/rules/tsNoEmptyObjectType.d.ts +0 -2
  91. package/dist/cjs/rules/tsNoUnnecessaryTemplateExpression.d.ts +0 -2
  92. package/dist/cjs/rules/tsPreferFunctionType.d.ts +0 -2
  93. package/dist/cjs/rules/typeFormatting.d.ts +0 -2
  94. package/dist/cjs/rules/validTypes.d.ts +0 -2
  95. package/dist/cjs/tagNames.d.ts +0 -15
  96. package/dist/cjs/utils/hasReturnValue.d.ts +0 -19
  97. package/dist/defaultTagOrder.cjs +0 -46
  98. package/dist/defaultTagOrder.cjs.map +0 -1
  99. package/dist/exportParser.cjs +0 -732
  100. package/dist/exportParser.cjs.map +0 -1
  101. package/dist/generateDocs.cjs +0 -342
  102. package/dist/generateDocs.cjs.map +0 -1
  103. package/dist/generateOptions.cjs +0 -62
  104. package/dist/generateOptions.cjs.map +0 -1
  105. package/dist/generateRule.cjs +0 -248
  106. package/dist/generateRule.cjs.map +0 -1
  107. package/dist/generateRuleTypes.cjs +0 -24
  108. package/dist/generateRuleTypes.cjs.map +0 -1
  109. package/dist/getDefaultTagStructureForMode.cjs +0 -289
  110. package/dist/getDefaultTagStructureForMode.cjs.map +0 -1
  111. package/dist/getJsdocProcessorPlugin.cjs +0 -587
  112. package/dist/getJsdocProcessorPlugin.cjs.map +0 -1
  113. package/dist/getJsdocProcessorPlugin.cts +0 -5
  114. package/dist/index-cjs.cjs +0 -598
  115. package/dist/index-cjs.cjs.map +0 -1
  116. package/dist/index-cjs.d.ts +0 -24
  117. package/dist/index-esm.cjs +0 -162
  118. package/dist/index-esm.cjs.map +0 -1
  119. package/dist/index-esm.d.ts +0 -72
  120. package/dist/index.cjs +0 -746
  121. package/dist/index.cjs.cts +0 -3
  122. package/dist/index.cjs.map +0 -1
  123. package/dist/iterateJsdoc.cjs +0 -2150
  124. package/dist/iterateJsdoc.cjs.map +0 -1
  125. package/dist/iterateJsdoc.cts +0 -7
  126. package/dist/jsdocUtils.cjs +0 -1786
  127. package/dist/jsdocUtils.cjs.map +0 -1
  128. package/dist/rules/checkAccess.cjs +0 -40
  129. package/dist/rules/checkAccess.cjs.map +0 -1
  130. package/dist/rules/checkAlignment.cjs +0 -78
  131. package/dist/rules/checkAlignment.cjs.map +0 -1
  132. package/dist/rules/checkExamples.cjs +0 -521
  133. package/dist/rules/checkExamples.cjs.map +0 -1
  134. package/dist/rules/checkIndentation.cjs +0 -170
  135. package/dist/rules/checkIndentation.cjs.map +0 -1
  136. package/dist/rules/checkLineAlignment.cjs +0 -398
  137. package/dist/rules/checkLineAlignment.cjs.map +0 -1
  138. package/dist/rules/checkParamNames.cjs +0 -407
  139. package/dist/rules/checkParamNames.cjs.map +0 -1
  140. package/dist/rules/checkPropertyNames.cjs +0 -135
  141. package/dist/rules/checkPropertyNames.cjs.map +0 -1
  142. package/dist/rules/checkSyntax.cjs +0 -38
  143. package/dist/rules/checkSyntax.cjs.map +0 -1
  144. package/dist/rules/checkTagNames.cjs +0 -312
  145. package/dist/rules/checkTagNames.cjs.map +0 -1
  146. package/dist/rules/checkTemplateNames.cjs +0 -192
  147. package/dist/rules/checkTemplateNames.cjs.map +0 -1
  148. package/dist/rules/checkTypes.cjs +0 -111
  149. package/dist/rules/checkTypes.cjs.map +0 -1
  150. package/dist/rules/checkValues.cjs +0 -166
  151. package/dist/rules/checkValues.cjs.map +0 -1
  152. package/dist/rules/convertToJsdocComments.cjs +0 -356
  153. package/dist/rules/convertToJsdocComments.cjs.map +0 -1
  154. package/dist/rules/emptyTags.cjs +0 -98
  155. package/dist/rules/emptyTags.cjs.map +0 -1
  156. package/dist/rules/escapeInlineTags.cjs +0 -234
  157. package/dist/rules/escapeInlineTags.cjs.map +0 -1
  158. package/dist/rules/implementsOnClasses.cjs +0 -74
  159. package/dist/rules/implementsOnClasses.cjs.map +0 -1
  160. package/dist/rules/importsAsDependencies.cjs +0 -104
  161. package/dist/rules/importsAsDependencies.cjs.map +0 -1
  162. package/dist/rules/informativeDocs.cjs +0 -187
  163. package/dist/rules/informativeDocs.cjs.map +0 -1
  164. package/dist/rules/linesBeforeBlock.cjs +0 -120
  165. package/dist/rules/linesBeforeBlock.cjs.map +0 -1
  166. package/dist/rules/matchDescription.cjs +0 -356
  167. package/dist/rules/matchDescription.cjs.map +0 -1
  168. package/dist/rules/matchName.cjs +0 -160
  169. package/dist/rules/matchName.cjs.map +0 -1
  170. package/dist/rules/multilineBlocks.cjs +0 -431
  171. package/dist/rules/multilineBlocks.cjs.map +0 -1
  172. package/dist/rules/noBadBlocks.cjs +0 -100
  173. package/dist/rules/noBadBlocks.cjs.map +0 -1
  174. package/dist/rules/noBlankBlockDescriptions.cjs +0 -63
  175. package/dist/rules/noBlankBlockDescriptions.cjs.map +0 -1
  176. package/dist/rules/noBlankBlocks.cjs +0 -54
  177. package/dist/rules/noBlankBlocks.cjs.map +0 -1
  178. package/dist/rules/noDefaults.cjs +0 -102
  179. package/dist/rules/noDefaults.cjs.map +0 -1
  180. package/dist/rules/noMissingSyntax.cjs +0 -196
  181. package/dist/rules/noMissingSyntax.cjs.map +0 -1
  182. package/dist/rules/noMultiAsterisks.cjs +0 -126
  183. package/dist/rules/noMultiAsterisks.cjs.map +0 -1
  184. package/dist/rules/noRestrictedSyntax.cjs +0 -68
  185. package/dist/rules/noRestrictedSyntax.cjs.map +0 -1
  186. package/dist/rules/noTypes.cjs +0 -101
  187. package/dist/rules/noTypes.cjs.map +0 -1
  188. package/dist/rules/noUndefinedTypes.cjs +0 -616
  189. package/dist/rules/noUndefinedTypes.cjs.map +0 -1
  190. package/dist/rules/normalizeSeeLinks.cjs +0 -271
  191. package/dist/rules/normalizeSeeLinks.cjs.map +0 -1
  192. package/dist/rules/preferImportTag.cjs +0 -362
  193. package/dist/rules/preferImportTag.cjs.map +0 -1
  194. package/dist/rules/requireAsteriskPrefix.cjs +0 -190
  195. package/dist/rules/requireAsteriskPrefix.cjs.map +0 -1
  196. package/dist/rules/requireDescription.cjs +0 -164
  197. package/dist/rules/requireDescription.cjs.map +0 -1
  198. package/dist/rules/requireDescriptionCompleteSentence.cjs +0 -321
  199. package/dist/rules/requireDescriptionCompleteSentence.cjs.map +0 -1
  200. package/dist/rules/requireExample.cjs +0 -136
  201. package/dist/rules/requireExample.cjs.map +0 -1
  202. package/dist/rules/requireFileOverview.cjs +0 -194
  203. package/dist/rules/requireFileOverview.cjs.map +0 -1
  204. package/dist/rules/requireHyphenBeforeParamDescription.cjs +0 -166
  205. package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +0 -1
  206. package/dist/rules/requireJsdoc.cjs +0 -721
  207. package/dist/rules/requireJsdoc.cjs.map +0 -1
  208. package/dist/rules/requireParam.cjs +0 -772
  209. package/dist/rules/requireParam.cjs.map +0 -1
  210. package/dist/rules/requireParamDescription.cjs +0 -105
  211. package/dist/rules/requireParamDescription.cjs.map +0 -1
  212. package/dist/rules/requireParamName.cjs +0 -68
  213. package/dist/rules/requireParamName.cjs.map +0 -1
  214. package/dist/rules/requireParamType.cjs +0 -104
  215. package/dist/rules/requireParamType.cjs.map +0 -1
  216. package/dist/rules/requireProperty.cjs +0 -63
  217. package/dist/rules/requireProperty.cjs.map +0 -1
  218. package/dist/rules/requirePropertyDescription.cjs +0 -29
  219. package/dist/rules/requirePropertyDescription.cjs.map +0 -1
  220. package/dist/rules/requirePropertyName.cjs +0 -29
  221. package/dist/rules/requirePropertyName.cjs.map +0 -1
  222. package/dist/rules/requirePropertyType.cjs +0 -29
  223. package/dist/rules/requirePropertyType.cjs.map +0 -1
  224. package/dist/rules/requireRejects.cjs +0 -226
  225. package/dist/rules/requireRejects.cjs.map +0 -1
  226. package/dist/rules/requireReturns.cjs +0 -262
  227. package/dist/rules/requireReturns.cjs.map +0 -1
  228. package/dist/rules/requireReturnsCheck.cjs +0 -225
  229. package/dist/rules/requireReturnsCheck.cjs.map +0 -1
  230. package/dist/rules/requireReturnsDescription.cjs +0 -72
  231. package/dist/rules/requireReturnsDescription.cjs.map +0 -1
  232. package/dist/rules/requireReturnsType.cjs +0 -68
  233. package/dist/rules/requireReturnsType.cjs.map +0 -1
  234. package/dist/rules/requireTags.cjs +0 -74
  235. package/dist/rules/requireTags.cjs.map +0 -1
  236. package/dist/rules/requireTemplate.cjs +0 -220
  237. package/dist/rules/requireTemplate.cjs.map +0 -1
  238. package/dist/rules/requireThrows.cjs +0 -118
  239. package/dist/rules/requireThrows.cjs.map +0 -1
  240. package/dist/rules/requireYields.cjs +0 -224
  241. package/dist/rules/requireYields.cjs.map +0 -1
  242. package/dist/rules/requireYieldsCheck.cjs +0 -179
  243. package/dist/rules/requireYieldsCheck.cjs.map +0 -1
  244. package/dist/rules/sortTags.cjs +0 -656
  245. package/dist/rules/sortTags.cjs.map +0 -1
  246. package/dist/rules/tagLines.cjs +0 -374
  247. package/dist/rules/tagLines.cjs.map +0 -1
  248. package/dist/rules/textEscaping.cjs +0 -141
  249. package/dist/rules/textEscaping.cjs.map +0 -1
  250. package/dist/rules/tsMethodSignatureStyle.cjs +0 -240
  251. package/dist/rules/tsMethodSignatureStyle.cjs.map +0 -1
  252. package/dist/rules/tsNoEmptyObjectType.cjs +0 -62
  253. package/dist/rules/tsNoEmptyObjectType.cjs.map +0 -1
  254. package/dist/rules/tsNoUnnecessaryTemplateExpression.cjs +0 -104
  255. package/dist/rules/tsNoUnnecessaryTemplateExpression.cjs.map +0 -1
  256. package/dist/rules/tsPreferFunctionType.cjs +0 -110
  257. package/dist/rules/tsPreferFunctionType.cjs.map +0 -1
  258. package/dist/rules/typeFormatting.cjs +0 -607
  259. package/dist/rules/typeFormatting.cjs.map +0 -1
  260. package/dist/rules/validTypes.cjs +0 -324
  261. package/dist/rules/validTypes.cjs.map +0 -1
  262. package/dist/tagNames.cjs +0 -244
  263. package/dist/tagNames.cjs.map +0 -1
  264. package/dist/to-valid-identifier.cjs +0 -263
  265. package/dist/utils/hasReturnValue.cjs +0 -495
  266. package/dist/utils/hasReturnValue.cjs.map +0 -1
  267. package/rollup.config.js +0 -16
  268. package/src/getJsdocProcessorPlugin.cts +0 -5
  269. package/src/index-cjs.js +0 -758
  270. package/src/index-esm.js +0 -196
  271. package/src/index.cjs.cts +0 -3
  272. package/src/iterateJsdoc.cts +0 -7
@@ -1,164 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.cjs"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
- /**
10
- * @param {string} description
11
- * @returns {import('../iterateJsdoc.js').Integer}
12
- */
13
- const checkDescription = description => {
14
- return description.trim().split('\n').filter(Boolean).length;
15
- };
16
- var _default = exports.default = (0, _iterateJsdoc.default)(({
17
- context,
18
- jsdoc,
19
- report,
20
- utils
21
- }) => {
22
- if (utils.avoidDocs()) {
23
- return;
24
- }
25
- const {
26
- descriptionStyle = 'body'
27
- } = context.options[0] || {};
28
- let targetTagName = utils.getPreferredTagName({
29
- // We skip reporting except when `@description` is essential to the rule,
30
- // so user can block the tag and still meaningfully use this rule
31
- // even if the tag is present (and `check-tag-names` is the one to
32
- // normally report the fact that it is blocked but present)
33
- skipReportingBlockedTag: descriptionStyle !== 'tag',
34
- tagName: 'description'
35
- });
36
- if (!targetTagName) {
37
- return;
38
- }
39
- const isBlocked = typeof targetTagName === 'object' && 'blocked' in targetTagName && targetTagName.blocked;
40
- if (isBlocked) {
41
- targetTagName = /** @type {{blocked: true; tagName: string;}} */targetTagName.tagName;
42
- }
43
- if (descriptionStyle !== 'tag') {
44
- const {
45
- description
46
- } = utils.getDescription();
47
- if (checkDescription(description || '')) {
48
- return;
49
- }
50
- if (descriptionStyle === 'body') {
51
- const descTags = utils.getPresentTags(['desc', 'description']);
52
- if (descTags.length) {
53
- const [{
54
- tag: tagName
55
- }] = descTags;
56
- report(`Remove the @${tagName} tag to leave a plain block description or add additional description text above the @${tagName} line.`);
57
- } else {
58
- report('Missing JSDoc block description.');
59
- }
60
- return;
61
- }
62
- }
63
- const functionExamples = isBlocked ? [] : jsdoc.tags.filter(({
64
- tag
65
- }) => {
66
- return tag === targetTagName;
67
- });
68
- if (!functionExamples.length) {
69
- report(descriptionStyle === 'any' ? `Missing JSDoc block description or @${targetTagName} declaration.` : `Missing JSDoc @${targetTagName} declaration.`);
70
- return;
71
- }
72
- for (const example of functionExamples) {
73
- if (!checkDescription(`${example.name} ${utils.getTagDescription(example)}`)) {
74
- report(`Missing JSDoc @${targetTagName} description.`, null, example);
75
- }
76
- }
77
- }, {
78
- contextDefaults: true,
79
- meta: {
80
- docs: {
81
- description: 'Requires that all functions (and potentially other contexts) have a description.',
82
- url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description.md#repos-sticky-header'
83
- },
84
- schema: [{
85
- additionalProperties: false,
86
- properties: {
87
- checkConstructors: {
88
- default: true,
89
- description: `A value indicating whether \`constructor\`s should be
90
- checked. Defaults to \`true\`.`,
91
- type: 'boolean'
92
- },
93
- checkGetters: {
94
- default: true,
95
- description: `A value indicating whether getters should be checked.
96
- Defaults to \`true\`.`,
97
- type: 'boolean'
98
- },
99
- checkSetters: {
100
- default: true,
101
- description: `A value indicating whether setters should be checked.
102
- Defaults to \`true\`.`,
103
- type: 'boolean'
104
- },
105
- contexts: {
106
- description: `Set to an array of strings representing the AST context
107
- where you wish the rule to be applied (e.g., \`ClassDeclaration\` for ES6
108
- classes).
109
-
110
- \`context\` defaults to \`any\` and \`comment\` defaults to no specific comment context.
111
-
112
- Overrides the default contexts (\`ArrowFunctionExpression\`,
113
- \`FunctionDeclaration\`, \`FunctionExpression\`). Set to \`"any"\` if you want
114
- the rule to apply to any JSDoc block throughout your files (as is necessary
115
- for finding function blocks not attached to a function declaration or
116
- expression, i.e., \`@callback\` or \`@function\` (or its aliases \`@func\` or
117
- \`@method\`) (including those associated with an \`@interface\`).
118
-
119
- See the ["AST and Selectors"](../advanced.md#ast-and-selectors)
120
- section of our Advanced docs for more on the expected format.`,
121
- items: {
122
- anyOf: [{
123
- type: 'string'
124
- }, {
125
- additionalProperties: false,
126
- properties: {
127
- comment: {
128
- type: 'string'
129
- },
130
- context: {
131
- type: 'string'
132
- }
133
- },
134
- type: 'object'
135
- }]
136
- },
137
- type: 'array'
138
- },
139
- descriptionStyle: {
140
- description: `Whether to accept implicit descriptions (\`"body"\`) or
141
- \`@description\` tags (\`"tag"\`) as satisfying the rule. Set to \`"any"\` to
142
- accept either style. Defaults to \`"body"\`.`,
143
- enum: ['body', 'tag', 'any'],
144
- type: 'string'
145
- },
146
- exemptedBy: {
147
- description: `Array of tags (e.g., \`['type']\`) whose presence on the
148
- document block avoids the need for a \`@description\`. Defaults to an
149
- array with \`inheritdoc\`. If you set this array, it will overwrite the
150
- default, so be sure to add back \`inheritdoc\` if you wish its presence
151
- to cause exemption of the rule.`,
152
- items: {
153
- type: 'string'
154
- },
155
- type: 'array'
156
- }
157
- },
158
- type: 'object'
159
- }],
160
- type: 'suggestion'
161
- }
162
- });
163
- module.exports = exports.default;
164
- //# sourceMappingURL=requireDescription.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"requireDescription.cjs","names":["iterateJsdoc"],"sources":["../../src/rules/requireDescription.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\n\n/**\n * @param {string} description\n * @returns {import('../iterateJsdoc.js').Integer}\n */\nconst checkDescription = (description) => {\n return description\n .trim()\n .split('\\n')\n .filter(Boolean)\n .length;\n};\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n report,\n utils,\n}) => {\n if (utils.avoidDocs()) {\n return;\n }\n\n const {\n descriptionStyle = 'body',\n } = context.options[0] || {};\n\n let targetTagName = utils.getPreferredTagName({\n // We skip reporting except when `@description` is essential to the rule,\n // so user can block the tag and still meaningfully use this rule\n // even if the tag is present (and `check-tag-names` is the one to\n // normally report the fact that it is blocked but present)\n skipReportingBlockedTag: descriptionStyle !== 'tag',\n tagName: 'description',\n });\n if (!targetTagName) {\n return;\n }\n\n const isBlocked = typeof targetTagName === 'object' && 'blocked' in targetTagName && targetTagName.blocked;\n if (isBlocked) {\n targetTagName = /** @type {{blocked: true; tagName: string;}} */ (\n targetTagName\n ).tagName;\n }\n\n if (descriptionStyle !== 'tag') {\n const {\n description,\n } = utils.getDescription();\n if (checkDescription(description || '')) {\n return;\n }\n\n if (descriptionStyle === 'body') {\n const descTags = utils.getPresentTags([\n 'desc', 'description',\n ]);\n if (descTags.length) {\n const [\n {\n tag: tagName,\n },\n ] = descTags;\n report(`Remove the @${tagName} tag to leave a plain block description or add additional description text above the @${tagName} line.`);\n } else {\n report('Missing JSDoc block description.');\n }\n\n return;\n }\n }\n\n const functionExamples = isBlocked ?\n [] :\n jsdoc.tags.filter(({\n tag,\n }) => {\n return tag === targetTagName;\n });\n\n if (!functionExamples.length) {\n report(\n descriptionStyle === 'any' ?\n `Missing JSDoc block description or @${targetTagName} declaration.` :\n `Missing JSDoc @${targetTagName} declaration.`,\n );\n\n return;\n }\n\n for (const example of functionExamples) {\n if (!checkDescription(`${example.name} ${utils.getTagDescription(example)}`)) {\n report(`Missing JSDoc @${targetTagName} description.`, null, example);\n }\n }\n}, {\n contextDefaults: true,\n meta: {\n docs: {\n description: 'Requires that all functions (and potentially other contexts) have a description.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description.md#repos-sticky-header',\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n checkConstructors: {\n default: true,\n description: `A value indicating whether \\`constructor\\`s should be\nchecked. Defaults to \\`true\\`.`,\n type: 'boolean',\n },\n checkGetters: {\n default: true,\n description: `A value indicating whether getters should be checked.\nDefaults to \\`true\\`.`,\n type: 'boolean',\n },\n checkSetters: {\n default: true,\n description: `A value indicating whether setters should be checked.\nDefaults to \\`true\\`.`,\n type: 'boolean',\n },\n contexts: {\n description: `Set to an array of strings representing the AST context\nwhere you wish the rule to be applied (e.g., \\`ClassDeclaration\\` for ES6\nclasses).\n\n\\`context\\` defaults to \\`any\\` and \\`comment\\` defaults to no specific comment context.\n\nOverrides the default contexts (\\`ArrowFunctionExpression\\`,\n\\`FunctionDeclaration\\`, \\`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 descriptionStyle: {\n description: `Whether to accept implicit descriptions (\\`\"body\"\\`) or\n\\`@description\\` tags (\\`\"tag\"\\`) as satisfying the rule. Set to \\`\"any\"\\` to\naccept either style. Defaults to \\`\"body\"\\`.`,\n enum: [\n 'body', 'tag', 'any',\n ],\n type: 'string',\n },\n exemptedBy: {\n description: `Array of tags (e.g., \\`['type']\\`) whose presence on the\ndocument block avoids the need for a \\`@description\\`. Defaults to an\narray with \\`inheritdoc\\`. If you set this array, it will overwrite the\ndefault, so be sure to add back \\`inheritdoc\\` if you wish its presence\nto cause exemption 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;AAA8C;AAE9C;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAI,WAAW,IAAK;EACxC,OAAO,WAAW,CACf,IAAI,CAAC,CAAC,CACN,KAAK,CAAC,IAAI,CAAC,CACX,MAAM,CAAC,OAAO,CAAC,CACf,MAAM;AACX,CAAC;AAAC,iCAEa,IAAAA,qBAAY,EAAC,CAAC;EAC3B,OAAO;EACP,KAAK;EACL,MAAM;EACN;AACF,CAAC,KAAK;EACJ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE;IACrB;EACF;EAEA,MAAM;IACJ,gBAAgB,GAAG;EACrB,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;EAE5B,IAAI,aAAa,GAAG,KAAK,CAAC,mBAAmB,CAAC;IAC5C;IACA;IACA;I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ACA;AACA,gCAAgC;UACpB,KAAK,EAAE;YACL,IAAI,EAAE;UACR,CAAC;UACD,IAAI,EAAE;QACR;MACF,CAAC;MACD,IAAI,EAAE;IACR,CAAC,CACF;IACD,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAA","ignoreList":[]}
@@ -1,321 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.cjs"));
8
- var _escapeStringRegexp = _interopRequireDefault(require("escape-string-regexp"));
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- const otherDescriptiveTags = new Set(['classdesc', 'deprecated', 'exception', 'file', 'fileoverview', 'overview',
11
- // 'copyright' and 'see' might be good addition, but as the former may be
12
- // sensitive text, and the latter may have just a link, they are not
13
- // included by default
14
- 'summary', 'throws', 'todo', 'yield', 'yields']);
15
-
16
- /**
17
- * @param {string} text
18
- * @returns {string[]}
19
- */
20
- const extractParagraphs = text => {
21
- return text.split(/(?<![;:])\n\n+/v);
22
- };
23
-
24
- /**
25
- * @param {string} text
26
- * @param {string|RegExp} abbreviationsRegex
27
- * @returns {string[]}
28
- */
29
- const extractSentences = (text, abbreviationsRegex) => {
30
- const txt = text
31
- // Remove all {} tags.
32
- .replaceAll(/(?<!^)\{[\s\S]*?\}\s*/gv, '')
33
-
34
- // Remove custom abbreviations
35
- .replace(abbreviationsRegex, '');
36
- const sentenceEndGrouping = /([.?!])(?:\s+|$)/gv;
37
- const puncts = [...txt.matchAll(sentenceEndGrouping)].map(sentEnd => {
38
- return sentEnd[0];
39
- });
40
- return txt.split(/[.?!](?:\s+|$)/v)
41
-
42
- // Re-add the dot.
43
- .map((sentence, idx) => {
44
- return !puncts[idx] && /^\s*$/v.test(sentence) ? sentence : `${sentence}${puncts[idx] || ''}`;
45
- });
46
- };
47
-
48
- /**
49
- * @param {string} text
50
- * @returns {boolean}
51
- */
52
- const isNewLinePrecededByAPeriod = text => {
53
- /** @type {boolean} */
54
- let lastLineEndsSentence;
55
- const lines = text.split('\n');
56
- return !lines.some(line => {
57
- if (lastLineEndsSentence === false && /^[A-Z][a-z]/v.test(line)) {
58
- return true;
59
- }
60
- lastLineEndsSentence = /[.:?!\|]$/v.test(line);
61
- return false;
62
- });
63
- };
64
-
65
- /**
66
- * @param {string} str
67
- * @returns {boolean}
68
- */
69
- const isCapitalized = str => {
70
- return str[0] === str[0].toUpperCase();
71
- };
72
-
73
- /**
74
- * @param {string} str
75
- * @returns {boolean}
76
- */
77
- const isTable = str => {
78
- return str.charAt(0) === '|';
79
- };
80
-
81
- /**
82
- * @param {string} str
83
- * @returns {string}
84
- */
85
- const capitalize = str => {
86
- return str.charAt(0).toUpperCase() + str.slice(1);
87
- };
88
-
89
- /**
90
- * @param {string} description
91
- * @param {import('../iterateJsdoc.js').Report} reportOrig
92
- * @param {import('eslint').Rule.Node} jsdocNode
93
- * @param {string|RegExp} abbreviationsRegex
94
- * @param {import('eslint').SourceCode} sourceCode
95
- * @param {import('comment-parser').Spec|{
96
- * line: import('../iterateJsdoc.js').Integer
97
- * }} tag
98
- * @param {boolean} newlineBeforeCapsAssumesBadSentenceEnd
99
- * @returns {boolean}
100
- */
101
- const validateDescription = (description, reportOrig, jsdocNode, abbreviationsRegex, sourceCode, tag, newlineBeforeCapsAssumesBadSentenceEnd) => {
102
- if (!description || /^\n+$/v.test(description)) {
103
- return false;
104
- }
105
- const descriptionNoHeadings = description.replaceAll(/^\s*#[^\n]*(\n|$)/gmv, '');
106
- const paragraphs = extractParagraphs(descriptionNoHeadings).filter(Boolean);
107
- return paragraphs.some((paragraph, parIdx) => {
108
- const sentences = extractSentences(paragraph, abbreviationsRegex);
109
- const fix = /** @type {import('eslint').Rule.ReportFixer} */fixer => {
110
- let text = sourceCode.getText(jsdocNode);
111
- if (!/[.:?!]$/v.test(paragraph)) {
112
- const line = paragraph.split('\n').findLast(Boolean);
113
- text = text.replace(new RegExp(`${(0, _escapeStringRegexp.default)(/** @type {string} */
114
- line)}$`, 'mv'), `${line}.`);
115
- }
116
- for (const sentence of sentences.filter(sentence_ => {
117
- return !/^\s*$/v.test(sentence_) && !isCapitalized(sentence_) && !isTable(sentence_);
118
- })) {
119
- const beginning = sentence.split('\n')[0];
120
- if ('tag' in tag && tag.tag) {
121
- const reg = new RegExp(`(@${(0, _escapeStringRegexp.default)(tag.tag)}.*)${(0, _escapeStringRegexp.default)(beginning)}`, 'v');
122
- text = text.replace(reg, (_$0, $1) => {
123
- return $1 + capitalize(beginning);
124
- });
125
- } else {
126
- text = text.replace(new RegExp('((?:[.?!]|\\*|\\})\\s*)' + (0, _escapeStringRegexp.default)(beginning), 'v'), '$1' + capitalize(beginning));
127
- }
128
- }
129
- return fixer.replaceText(jsdocNode, text);
130
- };
131
-
132
- /**
133
- * @param {string} msg
134
- * @param {import('eslint').Rule.ReportFixer | null | undefined} fixer
135
- * @param {{
136
- * line?: number | undefined;
137
- * column?: number | undefined;
138
- * } | (import('comment-parser').Spec & {
139
- * line?: number | undefined;
140
- * column?: number | undefined;
141
- * })} tagObj
142
- * @returns {void}
143
- */
144
- const report = (msg, fixer, tagObj) => {
145
- if ('line' in tagObj) {
146
- /**
147
- * @type {{
148
- * line: number;
149
- * }}
150
- */
151
- tagObj.line += parIdx * 2;
152
- } else {
153
- /** @type {import('comment-parser').Spec} */tagObj.source[0].number += parIdx * 2;
154
- }
155
-
156
- // Avoid errors if old column doesn't exist here
157
- tagObj.column = 0;
158
- reportOrig(msg, fixer, tagObj);
159
- };
160
- if (sentences.some(sentence => {
161
- return /^[.?!]$/v.test(sentence);
162
- })) {
163
- report('Sentences must be more than punctuation.', null, tag);
164
- }
165
- if (sentences.some(sentence => {
166
- return !/^\s*$/v.test(sentence) && !isCapitalized(sentence) && !isTable(sentence);
167
- })) {
168
- report('Sentences should start with an uppercase character.', fix, tag);
169
- }
170
- const paragraphNoAbbreviations = paragraph.replace(abbreviationsRegex, '');
171
- if (!/(?:[.?!\|]|```)\s*$/v.test(paragraphNoAbbreviations)) {
172
- report('Sentences must end with a period.', fix, tag);
173
- return true;
174
- }
175
- if (newlineBeforeCapsAssumesBadSentenceEnd && !isNewLinePrecededByAPeriod(paragraphNoAbbreviations)) {
176
- report('A line of text is started with an uppercase character, but the preceding line does not end the sentence.', null, tag);
177
- return true;
178
- }
179
- return false;
180
- });
181
- };
182
- var _default = exports.default = (0, _iterateJsdoc.default)(({
183
- context,
184
- jsdoc,
185
- jsdocNode,
186
- report,
187
- sourceCode,
188
- utils
189
- }) => {
190
- const /** @type {{abbreviations: string[], newlineBeforeCapsAssumesBadSentenceEnd: boolean}} */{
191
- abbreviations = [],
192
- newlineBeforeCapsAssumesBadSentenceEnd = false
193
- } = context.options[0] || {};
194
-
195
- // `@inheritDoc` can be used as inline tag with TSDoc/typedoc: https://typedoc.org/documents/Tags.__inheritDoc_.html
196
- if (utils.getInlineTags().some(({
197
- tag
198
- }) => {
199
- return [
200
- // Typdoc
201
- 'include', 'includeCode',
202
- // TSDoc
203
- 'inheritDoc', 'inheritdoc', 'label'].includes(tag);
204
- })) {
205
- return;
206
- }
207
- const abbreviationsRegex = abbreviations.length ? new RegExp('\\b' + abbreviations.map(abbreviation => {
208
- return (0, _escapeStringRegexp.default)(abbreviation.replaceAll(/\.$/gv, '') + '.');
209
- }).join('|') + '(?:$|\\s)', 'gv') : '';
210
- let {
211
- description
212
- } = utils.getDescription();
213
- const indices = [...description.matchAll(/```[\s\S]*```/gv)].map(match => {
214
- const {
215
- index
216
- } = match;
217
- const [{
218
- length
219
- }] = match;
220
- return {
221
- index,
222
- length
223
- };
224
- }).toReversed();
225
- for (const {
226
- index,
227
- length
228
- } of indices) {
229
- description = description.slice(0, index) + description.slice(/** @type {import('../iterateJsdoc.js').Integer} */index + length);
230
- }
231
- if (validateDescription(description, report, jsdocNode, abbreviationsRegex, sourceCode, {
232
- line: jsdoc.source[0].number + 1
233
- }, newlineBeforeCapsAssumesBadSentenceEnd)) {
234
- return;
235
- }
236
- utils.forEachPreferredTag('description', matchingJsdocTag => {
237
- const desc = `${matchingJsdocTag.name} ${utils.getTagDescription(matchingJsdocTag)}`.trim();
238
- validateDescription(desc, report, jsdocNode, abbreviationsRegex, sourceCode, matchingJsdocTag, newlineBeforeCapsAssumesBadSentenceEnd);
239
- }, true);
240
- const {
241
- tagsWithNames
242
- } = utils.getTagsByType(jsdoc.tags);
243
- const tagsWithoutNames = utils.filterTags(({
244
- tag: tagName
245
- }) => {
246
- return otherDescriptiveTags.has(tagName) || utils.hasOptionTag(tagName) && !tagsWithNames.some(({
247
- tag
248
- }) => {
249
- // If user accidentally adds tags with names (or like `returns`
250
- // get parsed as having names), do not add to this list
251
- return tag === tagName;
252
- });
253
- });
254
- tagsWithNames.some(tag => {
255
- const desc = /** @type {string} */utils.getTagDescription(tag).replace(/^- /v, '').trimEnd();
256
- return validateDescription(desc, report, jsdocNode, abbreviationsRegex, sourceCode, tag, newlineBeforeCapsAssumesBadSentenceEnd);
257
- });
258
- tagsWithoutNames.some(tag => {
259
- const desc = `${tag.name} ${utils.getTagDescription(tag)}`.trim();
260
- return validateDescription(desc, report, jsdocNode, abbreviationsRegex, sourceCode, tag, newlineBeforeCapsAssumesBadSentenceEnd);
261
- });
262
- }, {
263
- iterateAllJsdocs: true,
264
- meta: {
265
- docs: {
266
- description: 'Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences.',
267
- url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description-complete-sentence.md#repos-sticky-header'
268
- },
269
- fixable: 'code',
270
- schema: [{
271
- additionalProperties: false,
272
- properties: {
273
- abbreviations: {
274
- description: `You can provide an \`abbreviations\` options array to avoid such strings of text
275
- being treated as sentence endings when followed by dots. The \`.\` is not
276
- necessary at the end of the array items.`,
277
- items: {
278
- type: 'string'
279
- },
280
- type: 'array'
281
- },
282
- newlineBeforeCapsAssumesBadSentenceEnd: {
283
- description: `When \`false\` (the new default), we will not assume capital letters after
284
- newlines are an incorrect way to end the sentence (they may be proper
285
- nouns, for example).`,
286
- type: 'boolean'
287
- },
288
- tags: {
289
- description: `If you want additional tags to be checked for their descriptions, you may
290
- add them within this option.
291
-
292
- \`\`\`js
293
- {
294
- 'jsdoc/require-description-complete-sentence': ['error', {
295
- tags: ['see', 'copyright']
296
- }]
297
- }
298
- \`\`\`
299
-
300
- The tags \`@param\`/\`@arg\`/\`@argument\` and \`@property\`/\`@prop\` will be properly
301
- parsed to ensure that the checked "description" text includes only the text
302
- after the name.
303
-
304
- All other tags will treat the text following the tag name, a space, and
305
- an optional curly-bracketed type expression (and another space) as part of
306
- its "description" (e.g., for \`@returns {someType} some description\`, the
307
- description is \`some description\` while for \`@some-tag xyz\`, the description
308
- is \`xyz\`).`,
309
- items: {
310
- type: 'string'
311
- },
312
- type: 'array'
313
- }
314
- },
315
- type: 'object'
316
- }],
317
- type: 'suggestion'
318
- }
319
- });
320
- module.exports = exports.default;
321
- //# sourceMappingURL=requireDescriptionCompleteSentence.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"requireDescriptionCompleteSentence.cjs","names":["escapeStringRegexp","iterateJsdoc"],"sources":["../../src/rules/requireDescriptionCompleteSentence.js"],"sourcesContent":["import iterateJsdoc from '../iterateJsdoc.js';\nimport escapeStringRegexp from 'escape-string-regexp';\n\nconst otherDescriptiveTags = new Set([\n 'classdesc', 'deprecated', 'exception', 'file', 'fileoverview', 'overview',\n // 'copyright' and 'see' might be good addition, but as the former may be\n // sensitive text, and the latter may have just a link, they are not\n // included by default\n 'summary', 'throws', 'todo', 'yield', 'yields',\n]);\n\n/**\n * @param {string} text\n * @returns {string[]}\n */\nconst extractParagraphs = (text) => {\n return text.split(/(?<![;:])\\n\\n+/v);\n};\n\n/**\n * @param {string} text\n * @param {string|RegExp} abbreviationsRegex\n * @returns {string[]}\n */\nconst extractSentences = (text, abbreviationsRegex) => {\n const txt = text\n // Remove all {} tags.\n .replaceAll(/(?<!^)\\{[\\s\\S]*?\\}\\s*/gv, '')\n\n // Remove custom abbreviations\n .replace(abbreviationsRegex, '');\n\n const sentenceEndGrouping = /([.?!])(?:\\s+|$)/gv;\n\n const puncts = [\n ...txt.matchAll(sentenceEndGrouping),\n ].map((sentEnd) => {\n return sentEnd[0];\n });\n\n return txt\n .split(/[.?!](?:\\s+|$)/v)\n\n // Re-add the dot.\n .map((sentence, idx) => {\n return !puncts[idx] && /^\\s*$/v.test(sentence) ? sentence : `${sentence}${puncts[idx] || ''}`;\n });\n};\n\n/**\n * @param {string} text\n * @returns {boolean}\n */\nconst isNewLinePrecededByAPeriod = (text) => {\n /** @type {boolean} */\n let lastLineEndsSentence;\n\n const lines = text.split('\\n');\n\n return !lines.some((line) => {\n if (lastLineEndsSentence === false && /^[A-Z][a-z]/v.test(line)) {\n return true;\n }\n\n lastLineEndsSentence = /[.:?!\\|]$/v.test(line);\n\n return false;\n });\n};\n\n/**\n * @param {string} str\n * @returns {boolean}\n */\nconst isCapitalized = (str) => {\n return str[0] === str[0].toUpperCase();\n};\n\n/**\n * @param {string} str\n * @returns {boolean}\n */\nconst isTable = (str) => {\n return str.charAt(0) === '|';\n};\n\n/**\n * @param {string} str\n * @returns {string}\n */\nconst capitalize = (str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n};\n\n/**\n * @param {string} description\n * @param {import('../iterateJsdoc.js').Report} reportOrig\n * @param {import('eslint').Rule.Node} jsdocNode\n * @param {string|RegExp} abbreviationsRegex\n * @param {import('eslint').SourceCode} sourceCode\n * @param {import('comment-parser').Spec|{\n * line: import('../iterateJsdoc.js').Integer\n * }} tag\n * @param {boolean} newlineBeforeCapsAssumesBadSentenceEnd\n * @returns {boolean}\n */\nconst validateDescription = (\n description, reportOrig, jsdocNode, abbreviationsRegex,\n sourceCode, tag, newlineBeforeCapsAssumesBadSentenceEnd,\n) => {\n if (!description || (/^\\n+$/v).test(description)) {\n return false;\n }\n\n const descriptionNoHeadings = description.replaceAll(/^\\s*#[^\\n]*(\\n|$)/gmv, '');\n\n const paragraphs = extractParagraphs(descriptionNoHeadings).filter(Boolean);\n\n return paragraphs.some((paragraph, parIdx) => {\n const sentences = extractSentences(paragraph, abbreviationsRegex);\n\n const fix = /** @type {import('eslint').Rule.ReportFixer} */ (fixer) => {\n let text = sourceCode.getText(jsdocNode);\n\n if (!/[.:?!]$/v.test(paragraph)) {\n const line = paragraph.split('\\n').findLast(Boolean);\n text = text.replace(new RegExp(`${escapeStringRegexp(\n /** @type {string} */\n (line),\n )}$`, 'mv'), `${line}.`);\n }\n\n for (const sentence of sentences.filter((sentence_) => {\n return !(/^\\s*$/v).test(sentence_) && !isCapitalized(sentence_) &&\n !isTable(sentence_);\n })) {\n const beginning = sentence.split('\\n')[0];\n\n if ('tag' in tag && tag.tag) {\n const reg = new RegExp(`(@${escapeStringRegexp(tag.tag)}.*)${escapeStringRegexp(beginning)}`, 'v');\n\n text = text.replace(reg, (_$0, $1) => {\n return $1 + capitalize(beginning);\n });\n } else {\n text = text.replace(new RegExp('((?:[.?!]|\\\\*|\\\\})\\\\s*)' + escapeStringRegexp(beginning), 'v'), '$1' + capitalize(beginning));\n }\n }\n\n return fixer.replaceText(jsdocNode, text);\n };\n\n /**\n * @param {string} msg\n * @param {import('eslint').Rule.ReportFixer | null | undefined} fixer\n * @param {{\n * line?: number | undefined;\n * column?: number | undefined;\n * } | (import('comment-parser').Spec & {\n * line?: number | undefined;\n * column?: number | undefined;\n * })} tagObj\n * @returns {void}\n */\n const report = (msg, fixer, tagObj) => {\n if ('line' in tagObj) {\n /**\n * @type {{\n * line: number;\n * }}\n */ (tagObj).line += parIdx * 2;\n } else {\n /** @type {import('comment-parser').Spec} */ (\n tagObj\n ).source[0].number += parIdx * 2;\n }\n\n // Avoid errors if old column doesn't exist here\n tagObj.column = 0;\n reportOrig(msg, fixer, tagObj);\n };\n\n if (sentences.some((sentence) => {\n return (/^[.?!]$/v).test(sentence);\n })) {\n report('Sentences must be more than punctuation.', null, tag);\n }\n\n if (sentences.some((sentence) => {\n return !(/^\\s*$/v).test(sentence) && !isCapitalized(sentence) && !isTable(sentence);\n })) {\n report('Sentences should start with an uppercase character.', fix, tag);\n }\n\n const paragraphNoAbbreviations = paragraph.replace(abbreviationsRegex, '');\n\n if (!/(?:[.?!\\|]|```)\\s*$/v.test(paragraphNoAbbreviations)) {\n report('Sentences must end with a period.', fix, tag);\n return true;\n }\n\n if (newlineBeforeCapsAssumesBadSentenceEnd && !isNewLinePrecededByAPeriod(paragraphNoAbbreviations)) {\n report('A line of text is started with an uppercase character, but the preceding line does not end the sentence.', null, tag);\n\n return true;\n }\n\n return false;\n });\n};\n\nexport default iterateJsdoc(({\n context,\n jsdoc,\n jsdocNode,\n report,\n sourceCode,\n utils,\n}) => {\n const /** @type {{abbreviations: string[], newlineBeforeCapsAssumesBadSentenceEnd: boolean}} */ {\n abbreviations = [],\n newlineBeforeCapsAssumesBadSentenceEnd = false,\n } = context.options[0] || {};\n\n // `@inheritDoc` can be used as inline tag with TSDoc/typedoc: https://typedoc.org/documents/Tags.__inheritDoc_.html\n if (utils.getInlineTags().some(({\n tag,\n }) => {\n return [\n // Typdoc\n 'include', 'includeCode',\n // TSDoc\n 'inheritDoc', 'inheritdoc',\n 'label',\n ].includes(tag);\n })) {\n return;\n }\n\n const abbreviationsRegex = abbreviations.length ?\n new RegExp('\\\\b' + abbreviations.map((abbreviation) => {\n return escapeStringRegexp(abbreviation.replaceAll(/\\.$/gv, '') + '.');\n }).join('|') + '(?:$|\\\\s)', 'gv') :\n '';\n\n let {\n description,\n } = utils.getDescription();\n\n const indices = [\n ...description.matchAll(/```[\\s\\S]*```/gv),\n ].map((match) => {\n const {\n index,\n } = match;\n const [\n {\n length,\n },\n ] = match;\n return {\n index,\n length,\n };\n }).toReversed();\n\n for (const {\n index,\n length,\n } of indices) {\n description = description.slice(0, index) +\n description.slice(/** @type {import('../iterateJsdoc.js').Integer} */ (\n index\n ) + length);\n }\n\n if (validateDescription(description, report, jsdocNode, abbreviationsRegex, sourceCode, {\n line: jsdoc.source[0].number + 1,\n }, newlineBeforeCapsAssumesBadSentenceEnd)) {\n return;\n }\n\n utils.forEachPreferredTag('description', (matchingJsdocTag) => {\n const desc = `${matchingJsdocTag.name} ${utils.getTagDescription(matchingJsdocTag)}`.trim();\n validateDescription(desc, report, jsdocNode, abbreviationsRegex, sourceCode, matchingJsdocTag, newlineBeforeCapsAssumesBadSentenceEnd);\n }, true);\n\n const {\n tagsWithNames,\n } = utils.getTagsByType(jsdoc.tags);\n const tagsWithoutNames = utils.filterTags(({\n tag: tagName,\n }) => {\n return otherDescriptiveTags.has(tagName) ||\n utils.hasOptionTag(tagName) && !tagsWithNames.some(({\n tag,\n }) => {\n // If user accidentally adds tags with names (or like `returns`\n // get parsed as having names), do not add to this list\n return tag === tagName;\n });\n });\n\n tagsWithNames.some((tag) => {\n const desc = /** @type {string} */ (\n utils.getTagDescription(tag)\n ).replace(/^- /v, '').trimEnd();\n\n return validateDescription(desc, report, jsdocNode, abbreviationsRegex, sourceCode, tag, newlineBeforeCapsAssumesBadSentenceEnd);\n });\n\n tagsWithoutNames.some((tag) => {\n const desc = `${tag.name} ${utils.getTagDescription(tag)}`.trim();\n\n return validateDescription(desc, report, jsdocNode, abbreviationsRegex, sourceCode, tag, newlineBeforeCapsAssumesBadSentenceEnd);\n });\n}, {\n iterateAllJsdocs: true,\n meta: {\n docs: {\n description: 'Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences.',\n url: 'https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description-complete-sentence.md#repos-sticky-header',\n },\n fixable: 'code',\n schema: [\n {\n additionalProperties: false,\n properties: {\n abbreviations: {\n description: `You can provide an \\`abbreviations\\` options array to avoid such strings of text\nbeing treated as sentence endings when followed by dots. The \\`.\\` is not\nnecessary at the end of the array items.`,\n items: {\n type: 'string',\n },\n type: 'array',\n },\n newlineBeforeCapsAssumesBadSentenceEnd: {\n description: `When \\`false\\` (the new default), we will not assume capital letters after\nnewlines are an incorrect way to end the sentence (they may be proper\nnouns, for example).`,\n type: 'boolean',\n },\n tags: {\n description: `If you want additional tags to be checked for their descriptions, you may\nadd them within this option.\n\n\\`\\`\\`js\n{\n 'jsdoc/require-description-complete-sentence': ['error', {\n tags: ['see', 'copyright']\n }]\n}\n\\`\\`\\`\n\nThe tags \\`@param\\`/\\`@arg\\`/\\`@argument\\` and \\`@property\\`/\\`@prop\\` will be properly\nparsed to ensure that the checked \"description\" text includes only the text\nafter the name.\n\nAll other tags will treat the text following the tag name, a space, and\nan optional curly-bracketed type expression (and another space) as part of\nits \"description\" (e.g., for \\`@returns {someType} some description\\`, the\ndescription is \\`some description\\` while for \\`@some-tag xyz\\`, the description\nis \\`xyz\\`).`,\n items: {\n type: 'string',\n },\n type: 'array',\n },\n },\n type: 'object',\n },\n ],\n type: 'suggestion',\n },\n});\n"],"mappings":";;;;;;AAAA;AACA;AAAsD;AAEtD,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CACnC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU;AAC1E;AACA;AACA;AACA,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAC/C,CAAC;;AAEF;AACA;AACA;AACA;AACA,MAAM,iBAAiB,GAAI,IAAI,IAAK;EAClC,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;AACtC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,kBAAkB,KAAK;EACrD,MAAM,GAAG,GAAG;EACV;EAAA,CACC,UAAU,CAAC,yBAAyB,EAAE,EAAE;;EAEzC;EAAA,CACC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;EAElC,MAAM,mBAAmB,GAAG,oBAAoB;EAEhD,MAAM,MAAM,GAAG,CACb,GAAG,GAAG,CAAC,QAAQ,CAAC,m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