@depup/eslint-plugin-jsdoc 62.8.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 (430) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +33 -0
  3. package/changes.json +18 -0
  4. package/dist/WarnSettings.cjs +38 -0
  5. package/dist/WarnSettings.cjs.map +1 -0
  6. package/dist/WarnSettings.d.ts +17 -0
  7. package/dist/alignTransform.cjs +402 -0
  8. package/dist/alignTransform.cjs.map +1 -0
  9. package/dist/alignTransform.d.ts +34 -0
  10. package/dist/buildForbidRuleDefinition.cjs +101 -0
  11. package/dist/buildForbidRuleDefinition.cjs.map +1 -0
  12. package/dist/buildForbidRuleDefinition.d.ts +15 -0
  13. package/dist/buildRejectOrPreferRuleDefinition.cjs +352 -0
  14. package/dist/buildRejectOrPreferRuleDefinition.cjs.map +1 -0
  15. package/dist/buildRejectOrPreferRuleDefinition.d.ts +9 -0
  16. package/dist/cjs/WarnSettings.d.ts +16 -0
  17. package/dist/cjs/alignTransform.d.ts +33 -0
  18. package/dist/cjs/buildForbidRuleDefinition.d.ts +14 -0
  19. package/dist/cjs/buildRejectOrPreferRuleDefinition.d.ts +8 -0
  20. package/dist/cjs/defaultTagOrder.d.ts +4 -0
  21. package/dist/cjs/exportParser.d.ts +40 -0
  22. package/dist/cjs/getDefaultTagStructureForMode.d.ts +10 -0
  23. package/dist/cjs/getJsdocProcessorPlugin.d.cts +5 -0
  24. package/dist/cjs/getJsdocProcessorPlugin.d.ts +66 -0
  25. package/dist/cjs/index-cjs.d.ts +23 -0
  26. package/dist/cjs/index.cjs.d.cts +2 -0
  27. package/dist/cjs/iterateJsdoc.d.cts +7 -0
  28. package/dist/cjs/iterateJsdoc.d.ts +495 -0
  29. package/dist/cjs/jsdocUtils.d.ts +493 -0
  30. package/dist/cjs/rules/checkAccess.d.ts +2 -0
  31. package/dist/cjs/rules/checkAlignment.d.ts +2 -0
  32. package/dist/cjs/rules/checkExamples.d.ts +3 -0
  33. package/dist/cjs/rules/checkIndentation.d.ts +2 -0
  34. package/dist/cjs/rules/checkLineAlignment.d.ts +9 -0
  35. package/dist/cjs/rules/checkParamNames.d.ts +2 -0
  36. package/dist/cjs/rules/checkPropertyNames.d.ts +2 -0
  37. package/dist/cjs/rules/checkSyntax.d.ts +2 -0
  38. package/dist/cjs/rules/checkTagNames.d.ts +2 -0
  39. package/dist/cjs/rules/checkTemplateNames.d.ts +2 -0
  40. package/dist/cjs/rules/checkTypes.d.ts +7 -0
  41. package/dist/cjs/rules/checkValues.d.ts +2 -0
  42. package/dist/cjs/rules/convertToJsdocComments.d.ts +266 -0
  43. package/dist/cjs/rules/emptyTags.d.ts +2 -0
  44. package/dist/cjs/rules/escapeInlineTags.d.ts +2 -0
  45. package/dist/cjs/rules/implementsOnClasses.d.ts +2 -0
  46. package/dist/cjs/rules/importsAsDependencies.d.ts +2 -0
  47. package/dist/cjs/rules/informativeDocs.d.ts +2 -0
  48. package/dist/cjs/rules/linesBeforeBlock.d.ts +2 -0
  49. package/dist/cjs/rules/matchDescription.d.ts +2 -0
  50. package/dist/cjs/rules/matchName.d.ts +2 -0
  51. package/dist/cjs/rules/multilineBlocks.d.ts +2 -0
  52. package/dist/cjs/rules/noBadBlocks.d.ts +2 -0
  53. package/dist/cjs/rules/noBlankBlockDescriptions.d.ts +2 -0
  54. package/dist/cjs/rules/noBlankBlocks.d.ts +2 -0
  55. package/dist/cjs/rules/noDefaults.d.ts +2 -0
  56. package/dist/cjs/rules/noMissingSyntax.d.ts +9 -0
  57. package/dist/cjs/rules/noMultiAsterisks.d.ts +2 -0
  58. package/dist/cjs/rules/noRestrictedSyntax.d.ts +2 -0
  59. package/dist/cjs/rules/noTypes.d.ts +2 -0
  60. package/dist/cjs/rules/noUndefinedTypes.d.ts +2 -0
  61. package/dist/cjs/rules/preferImportTag.d.ts +2 -0
  62. package/dist/cjs/rules/requireAsteriskPrefix.d.ts +2 -0
  63. package/dist/cjs/rules/requireDescription.d.ts +2 -0
  64. package/dist/cjs/rules/requireDescriptionCompleteSentence.d.ts +2 -0
  65. package/dist/cjs/rules/requireExample.d.ts +2 -0
  66. package/dist/cjs/rules/requireFileOverview.d.ts +2 -0
  67. package/dist/cjs/rules/requireHyphenBeforeParamDescription.d.ts +2 -0
  68. package/dist/cjs/rules/requireJsdoc.d.ts +24 -0
  69. package/dist/cjs/rules/requireParam.d.ts +3 -0
  70. package/dist/cjs/rules/requireParamDescription.d.ts +2 -0
  71. package/dist/cjs/rules/requireParamName.d.ts +2 -0
  72. package/dist/cjs/rules/requireParamType.d.ts +2 -0
  73. package/dist/cjs/rules/requireProperty.d.ts +2 -0
  74. package/dist/cjs/rules/requirePropertyDescription.d.ts +2 -0
  75. package/dist/cjs/rules/requirePropertyName.d.ts +2 -0
  76. package/dist/cjs/rules/requirePropertyType.d.ts +2 -0
  77. package/dist/cjs/rules/requireRejects.d.ts +2 -0
  78. package/dist/cjs/rules/requireReturns.d.ts +2 -0
  79. package/dist/cjs/rules/requireReturnsCheck.d.ts +2 -0
  80. package/dist/cjs/rules/requireReturnsDescription.d.ts +2 -0
  81. package/dist/cjs/rules/requireReturnsType.d.ts +2 -0
  82. package/dist/cjs/rules/requireTags.d.ts +2 -0
  83. package/dist/cjs/rules/requireTemplate.d.ts +2 -0
  84. package/dist/cjs/rules/requireThrows.d.ts +2 -0
  85. package/dist/cjs/rules/requireYields.d.ts +2 -0
  86. package/dist/cjs/rules/requireYieldsCheck.d.ts +2 -0
  87. package/dist/cjs/rules/sortTags.d.ts +2 -0
  88. package/dist/cjs/rules/tagLines.d.ts +2 -0
  89. package/dist/cjs/rules/textEscaping.d.ts +2 -0
  90. package/dist/cjs/rules/tsMethodSignatureStyle.d.ts +2 -0
  91. package/dist/cjs/rules/tsNoEmptyObjectType.d.ts +2 -0
  92. package/dist/cjs/rules/tsNoUnnecessaryTemplateExpression.d.ts +2 -0
  93. package/dist/cjs/rules/tsPreferFunctionType.d.ts +2 -0
  94. package/dist/cjs/rules/typeFormatting.d.ts +2 -0
  95. package/dist/cjs/rules/validTypes.d.ts +2 -0
  96. package/dist/cjs/tagNames.d.ts +15 -0
  97. package/dist/cjs/utils/hasReturnValue.d.ts +19 -0
  98. package/dist/defaultTagOrder.cjs +46 -0
  99. package/dist/defaultTagOrder.cjs.map +1 -0
  100. package/dist/defaultTagOrder.d.ts +5 -0
  101. package/dist/exportParser.cjs +732 -0
  102. package/dist/exportParser.cjs.map +1 -0
  103. package/dist/exportParser.d.ts +41 -0
  104. package/dist/generateDocs.cjs +342 -0
  105. package/dist/generateDocs.cjs.map +1 -0
  106. package/dist/generateOptions.cjs +62 -0
  107. package/dist/generateOptions.cjs.map +1 -0
  108. package/dist/generateRule.cjs +248 -0
  109. package/dist/generateRule.cjs.map +1 -0
  110. package/dist/generateRuleTypes.cjs +24 -0
  111. package/dist/generateRuleTypes.cjs.map +1 -0
  112. package/dist/getDefaultTagStructureForMode.cjs +289 -0
  113. package/dist/getDefaultTagStructureForMode.cjs.map +1 -0
  114. package/dist/getDefaultTagStructureForMode.d.ts +11 -0
  115. package/dist/getJsdocProcessorPlugin.cjs +587 -0
  116. package/dist/getJsdocProcessorPlugin.cjs.map +1 -0
  117. package/dist/getJsdocProcessorPlugin.cts +5 -0
  118. package/dist/getJsdocProcessorPlugin.d.ts +67 -0
  119. package/dist/index-cjs.cjs +595 -0
  120. package/dist/index-cjs.cjs.map +1 -0
  121. package/dist/index-cjs.d.ts +24 -0
  122. package/dist/index-esm.cjs +162 -0
  123. package/dist/index-esm.cjs.map +1 -0
  124. package/dist/index-esm.d.ts +72 -0
  125. package/dist/index.cjs +743 -0
  126. package/dist/index.cjs.cts +3 -0
  127. package/dist/index.cjs.map +1 -0
  128. package/dist/index.d.ts +93 -0
  129. package/dist/iterateJsdoc.cjs +2150 -0
  130. package/dist/iterateJsdoc.cjs.map +1 -0
  131. package/dist/iterateJsdoc.cts +7 -0
  132. package/dist/iterateJsdoc.d.ts +496 -0
  133. package/dist/jsdocUtils.cjs +1725 -0
  134. package/dist/jsdocUtils.cjs.map +1 -0
  135. package/dist/jsdocUtils.d.ts +494 -0
  136. package/dist/rules/checkAccess.cjs +40 -0
  137. package/dist/rules/checkAccess.cjs.map +1 -0
  138. package/dist/rules/checkAccess.d.ts +3 -0
  139. package/dist/rules/checkAlignment.cjs +78 -0
  140. package/dist/rules/checkAlignment.cjs.map +1 -0
  141. package/dist/rules/checkAlignment.d.ts +3 -0
  142. package/dist/rules/checkExamples.cjs +521 -0
  143. package/dist/rules/checkExamples.cjs.map +1 -0
  144. package/dist/rules/checkExamples.d.ts +4 -0
  145. package/dist/rules/checkIndentation.cjs +170 -0
  146. package/dist/rules/checkIndentation.cjs.map +1 -0
  147. package/dist/rules/checkIndentation.d.ts +3 -0
  148. package/dist/rules/checkLineAlignment.cjs +398 -0
  149. package/dist/rules/checkLineAlignment.cjs.map +1 -0
  150. package/dist/rules/checkLineAlignment.d.ts +10 -0
  151. package/dist/rules/checkParamNames.cjs +407 -0
  152. package/dist/rules/checkParamNames.cjs.map +1 -0
  153. package/dist/rules/checkParamNames.d.ts +3 -0
  154. package/dist/rules/checkPropertyNames.cjs +135 -0
  155. package/dist/rules/checkPropertyNames.cjs.map +1 -0
  156. package/dist/rules/checkPropertyNames.d.ts +3 -0
  157. package/dist/rules/checkSyntax.cjs +38 -0
  158. package/dist/rules/checkSyntax.cjs.map +1 -0
  159. package/dist/rules/checkSyntax.d.ts +3 -0
  160. package/dist/rules/checkTagNames.cjs +312 -0
  161. package/dist/rules/checkTagNames.cjs.map +1 -0
  162. package/dist/rules/checkTagNames.d.ts +3 -0
  163. package/dist/rules/checkTemplateNames.cjs +185 -0
  164. package/dist/rules/checkTemplateNames.cjs.map +1 -0
  165. package/dist/rules/checkTemplateNames.d.ts +3 -0
  166. package/dist/rules/checkTypes.cjs +111 -0
  167. package/dist/rules/checkTypes.cjs.map +1 -0
  168. package/dist/rules/checkTypes.d.ts +8 -0
  169. package/dist/rules/checkValues.cjs +166 -0
  170. package/dist/rules/checkValues.cjs.map +1 -0
  171. package/dist/rules/checkValues.d.ts +3 -0
  172. package/dist/rules/convertToJsdocComments.cjs +356 -0
  173. package/dist/rules/convertToJsdocComments.cjs.map +1 -0
  174. package/dist/rules/convertToJsdocComments.d.ts +267 -0
  175. package/dist/rules/emptyTags.cjs +85 -0
  176. package/dist/rules/emptyTags.cjs.map +1 -0
  177. package/dist/rules/emptyTags.d.ts +3 -0
  178. package/dist/rules/escapeInlineTags.cjs +149 -0
  179. package/dist/rules/escapeInlineTags.cjs.map +1 -0
  180. package/dist/rules/escapeInlineTags.d.ts +3 -0
  181. package/dist/rules/implementsOnClasses.cjs +74 -0
  182. package/dist/rules/implementsOnClasses.cjs.map +1 -0
  183. package/dist/rules/implementsOnClasses.d.ts +3 -0
  184. package/dist/rules/importsAsDependencies.cjs +104 -0
  185. package/dist/rules/importsAsDependencies.cjs.map +1 -0
  186. package/dist/rules/importsAsDependencies.d.ts +3 -0
  187. package/dist/rules/informativeDocs.cjs +187 -0
  188. package/dist/rules/informativeDocs.cjs.map +1 -0
  189. package/dist/rules/informativeDocs.d.ts +3 -0
  190. package/dist/rules/linesBeforeBlock.cjs +120 -0
  191. package/dist/rules/linesBeforeBlock.cjs.map +1 -0
  192. package/dist/rules/linesBeforeBlock.d.ts +3 -0
  193. package/dist/rules/matchDescription.cjs +356 -0
  194. package/dist/rules/matchDescription.cjs.map +1 -0
  195. package/dist/rules/matchDescription.d.ts +3 -0
  196. package/dist/rules/matchName.cjs +160 -0
  197. package/dist/rules/matchName.cjs.map +1 -0
  198. package/dist/rules/matchName.d.ts +3 -0
  199. package/dist/rules/multilineBlocks.cjs +431 -0
  200. package/dist/rules/multilineBlocks.cjs.map +1 -0
  201. package/dist/rules/multilineBlocks.d.ts +3 -0
  202. package/dist/rules/noBadBlocks.cjs +100 -0
  203. package/dist/rules/noBadBlocks.cjs.map +1 -0
  204. package/dist/rules/noBadBlocks.d.ts +3 -0
  205. package/dist/rules/noBlankBlockDescriptions.cjs +63 -0
  206. package/dist/rules/noBlankBlockDescriptions.cjs.map +1 -0
  207. package/dist/rules/noBlankBlockDescriptions.d.ts +3 -0
  208. package/dist/rules/noBlankBlocks.cjs +54 -0
  209. package/dist/rules/noBlankBlocks.cjs.map +1 -0
  210. package/dist/rules/noBlankBlocks.d.ts +3 -0
  211. package/dist/rules/noDefaults.cjs +102 -0
  212. package/dist/rules/noDefaults.cjs.map +1 -0
  213. package/dist/rules/noDefaults.d.ts +3 -0
  214. package/dist/rules/noMissingSyntax.cjs +196 -0
  215. package/dist/rules/noMissingSyntax.cjs.map +1 -0
  216. package/dist/rules/noMissingSyntax.d.ts +10 -0
  217. package/dist/rules/noMultiAsterisks.cjs +126 -0
  218. package/dist/rules/noMultiAsterisks.cjs.map +1 -0
  219. package/dist/rules/noMultiAsterisks.d.ts +3 -0
  220. package/dist/rules/noRestrictedSyntax.cjs +68 -0
  221. package/dist/rules/noRestrictedSyntax.cjs.map +1 -0
  222. package/dist/rules/noRestrictedSyntax.d.ts +3 -0
  223. package/dist/rules/noTypes.cjs +101 -0
  224. package/dist/rules/noTypes.cjs.map +1 -0
  225. package/dist/rules/noTypes.d.ts +3 -0
  226. package/dist/rules/noUndefinedTypes.cjs +588 -0
  227. package/dist/rules/noUndefinedTypes.cjs.map +1 -0
  228. package/dist/rules/noUndefinedTypes.d.ts +3 -0
  229. package/dist/rules/preferImportTag.cjs +362 -0
  230. package/dist/rules/preferImportTag.cjs.map +1 -0
  231. package/dist/rules/preferImportTag.d.ts +3 -0
  232. package/dist/rules/requireAsteriskPrefix.cjs +190 -0
  233. package/dist/rules/requireAsteriskPrefix.cjs.map +1 -0
  234. package/dist/rules/requireAsteriskPrefix.d.ts +3 -0
  235. package/dist/rules/requireDescription.cjs +164 -0
  236. package/dist/rules/requireDescription.cjs.map +1 -0
  237. package/dist/rules/requireDescription.d.ts +3 -0
  238. package/dist/rules/requireDescriptionCompleteSentence.cjs +321 -0
  239. package/dist/rules/requireDescriptionCompleteSentence.cjs.map +1 -0
  240. package/dist/rules/requireDescriptionCompleteSentence.d.ts +3 -0
  241. package/dist/rules/requireExample.cjs +133 -0
  242. package/dist/rules/requireExample.cjs.map +1 -0
  243. package/dist/rules/requireExample.d.ts +3 -0
  244. package/dist/rules/requireFileOverview.cjs +194 -0
  245. package/dist/rules/requireFileOverview.cjs.map +1 -0
  246. package/dist/rules/requireFileOverview.d.ts +3 -0
  247. package/dist/rules/requireHyphenBeforeParamDescription.cjs +166 -0
  248. package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +1 -0
  249. package/dist/rules/requireHyphenBeforeParamDescription.d.ts +3 -0
  250. package/dist/rules/requireJsdoc.cjs +722 -0
  251. package/dist/rules/requireJsdoc.cjs.map +1 -0
  252. package/dist/rules/requireJsdoc.d.ts +25 -0
  253. package/dist/rules/requireParam.cjs +772 -0
  254. package/dist/rules/requireParam.cjs.map +1 -0
  255. package/dist/rules/requireParam.d.ts +4 -0
  256. package/dist/rules/requireParamDescription.cjs +105 -0
  257. package/dist/rules/requireParamDescription.cjs.map +1 -0
  258. package/dist/rules/requireParamDescription.d.ts +3 -0
  259. package/dist/rules/requireParamName.cjs +68 -0
  260. package/dist/rules/requireParamName.cjs.map +1 -0
  261. package/dist/rules/requireParamName.d.ts +3 -0
  262. package/dist/rules/requireParamType.cjs +104 -0
  263. package/dist/rules/requireParamType.cjs.map +1 -0
  264. package/dist/rules/requireParamType.d.ts +3 -0
  265. package/dist/rules/requireProperty.cjs +63 -0
  266. package/dist/rules/requireProperty.cjs.map +1 -0
  267. package/dist/rules/requireProperty.d.ts +3 -0
  268. package/dist/rules/requirePropertyDescription.cjs +29 -0
  269. package/dist/rules/requirePropertyDescription.cjs.map +1 -0
  270. package/dist/rules/requirePropertyDescription.d.ts +3 -0
  271. package/dist/rules/requirePropertyName.cjs +29 -0
  272. package/dist/rules/requirePropertyName.cjs.map +1 -0
  273. package/dist/rules/requirePropertyName.d.ts +3 -0
  274. package/dist/rules/requirePropertyType.cjs +29 -0
  275. package/dist/rules/requirePropertyType.cjs.map +1 -0
  276. package/dist/rules/requirePropertyType.d.ts +3 -0
  277. package/dist/rules/requireRejects.cjs +226 -0
  278. package/dist/rules/requireRejects.cjs.map +1 -0
  279. package/dist/rules/requireRejects.d.ts +3 -0
  280. package/dist/rules/requireReturns.cjs +262 -0
  281. package/dist/rules/requireReturns.cjs.map +1 -0
  282. package/dist/rules/requireReturns.d.ts +3 -0
  283. package/dist/rules/requireReturnsCheck.cjs +140 -0
  284. package/dist/rules/requireReturnsCheck.cjs.map +1 -0
  285. package/dist/rules/requireReturnsCheck.d.ts +3 -0
  286. package/dist/rules/requireReturnsDescription.cjs +72 -0
  287. package/dist/rules/requireReturnsDescription.cjs.map +1 -0
  288. package/dist/rules/requireReturnsDescription.d.ts +3 -0
  289. package/dist/rules/requireReturnsType.cjs +68 -0
  290. package/dist/rules/requireReturnsType.cjs.map +1 -0
  291. package/dist/rules/requireReturnsType.d.ts +3 -0
  292. package/dist/rules/requireTags.cjs +74 -0
  293. package/dist/rules/requireTags.cjs.map +1 -0
  294. package/dist/rules/requireTags.d.ts +3 -0
  295. package/dist/rules/requireTemplate.cjs +220 -0
  296. package/dist/rules/requireTemplate.cjs.map +1 -0
  297. package/dist/rules/requireTemplate.d.ts +3 -0
  298. package/dist/rules/requireThrows.cjs +118 -0
  299. package/dist/rules/requireThrows.cjs.map +1 -0
  300. package/dist/rules/requireThrows.d.ts +3 -0
  301. package/dist/rules/requireYields.cjs +224 -0
  302. package/dist/rules/requireYields.cjs.map +1 -0
  303. package/dist/rules/requireYields.d.ts +3 -0
  304. package/dist/rules/requireYieldsCheck.cjs +179 -0
  305. package/dist/rules/requireYieldsCheck.cjs.map +1 -0
  306. package/dist/rules/requireYieldsCheck.d.ts +3 -0
  307. package/dist/rules/sortTags.cjs +656 -0
  308. package/dist/rules/sortTags.cjs.map +1 -0
  309. package/dist/rules/sortTags.d.ts +3 -0
  310. package/dist/rules/tagLines.cjs +374 -0
  311. package/dist/rules/tagLines.cjs.map +1 -0
  312. package/dist/rules/tagLines.d.ts +3 -0
  313. package/dist/rules/textEscaping.cjs +141 -0
  314. package/dist/rules/textEscaping.cjs.map +1 -0
  315. package/dist/rules/textEscaping.d.ts +3 -0
  316. package/dist/rules/tsMethodSignatureStyle.cjs +240 -0
  317. package/dist/rules/tsMethodSignatureStyle.cjs.map +1 -0
  318. package/dist/rules/tsMethodSignatureStyle.d.ts +3 -0
  319. package/dist/rules/tsNoEmptyObjectType.cjs +62 -0
  320. package/dist/rules/tsNoEmptyObjectType.cjs.map +1 -0
  321. package/dist/rules/tsNoEmptyObjectType.d.ts +3 -0
  322. package/dist/rules/tsNoUnnecessaryTemplateExpression.cjs +104 -0
  323. package/dist/rules/tsNoUnnecessaryTemplateExpression.cjs.map +1 -0
  324. package/dist/rules/tsNoUnnecessaryTemplateExpression.d.ts +3 -0
  325. package/dist/rules/tsPreferFunctionType.cjs +110 -0
  326. package/dist/rules/tsPreferFunctionType.cjs.map +1 -0
  327. package/dist/rules/tsPreferFunctionType.d.ts +3 -0
  328. package/dist/rules/typeFormatting.cjs +607 -0
  329. package/dist/rules/typeFormatting.cjs.map +1 -0
  330. package/dist/rules/typeFormatting.d.ts +3 -0
  331. package/dist/rules/validTypes.cjs +328 -0
  332. package/dist/rules/validTypes.cjs.map +1 -0
  333. package/dist/rules/validTypes.d.ts +3 -0
  334. package/dist/rules.d.ts +3203 -0
  335. package/dist/tagNames.cjs +244 -0
  336. package/dist/tagNames.cjs.map +1 -0
  337. package/dist/tagNames.d.ts +16 -0
  338. package/dist/to-valid-identifier.cjs +263 -0
  339. package/dist/utils/hasReturnValue.cjs +495 -0
  340. package/dist/utils/hasReturnValue.cjs.map +1 -0
  341. package/dist/utils/hasReturnValue.d.ts +20 -0
  342. package/package.json +220 -0
  343. package/rollup.config.js +16 -0
  344. package/src/WarnSettings.js +34 -0
  345. package/src/alignTransform.js +444 -0
  346. package/src/buildForbidRuleDefinition.js +106 -0
  347. package/src/buildRejectOrPreferRuleDefinition.js +481 -0
  348. package/src/defaultTagOrder.js +169 -0
  349. package/src/exportParser.js +973 -0
  350. package/src/getDefaultTagStructureForMode.js +968 -0
  351. package/src/getJsdocProcessorPlugin.cts +5 -0
  352. package/src/getJsdocProcessorPlugin.js +692 -0
  353. package/src/index-cjs.js +755 -0
  354. package/src/index-esm.js +196 -0
  355. package/src/index.cjs.cts +3 -0
  356. package/src/index.js +940 -0
  357. package/src/iterateJsdoc.cts +7 -0
  358. package/src/iterateJsdoc.js +2612 -0
  359. package/src/jsdocUtils.js +2158 -0
  360. package/src/rules/checkAccess.js +45 -0
  361. package/src/rules/checkAlignment.js +82 -0
  362. package/src/rules/checkExamples.js +613 -0
  363. package/src/rules/checkIndentation.js +176 -0
  364. package/src/rules/checkLineAlignment.js +453 -0
  365. package/src/rules/checkParamNames.js +541 -0
  366. package/src/rules/checkPropertyNames.js +174 -0
  367. package/src/rules/checkSyntax.js +30 -0
  368. package/src/rules/checkTagNames.js +414 -0
  369. package/src/rules/checkTemplateNames.js +208 -0
  370. package/src/rules/checkTypes.js +130 -0
  371. package/src/rules/checkValues.js +264 -0
  372. package/src/rules/convertToJsdocComments.js +444 -0
  373. package/src/rules/emptyTags.js +106 -0
  374. package/src/rules/escapeInlineTags.js +189 -0
  375. package/src/rules/implementsOnClasses.js +78 -0
  376. package/src/rules/importsAsDependencies.js +132 -0
  377. package/src/rules/informativeDocs.js +228 -0
  378. package/src/rules/linesBeforeBlock.js +144 -0
  379. package/src/rules/matchDescription.js +413 -0
  380. package/src/rules/matchName.js +179 -0
  381. package/src/rules/multilineBlocks.js +562 -0
  382. package/src/rules/noBadBlocks.js +127 -0
  383. package/src/rules/noBlankBlockDescriptions.js +69 -0
  384. package/src/rules/noBlankBlocks.js +55 -0
  385. package/src/rules/noDefaults.js +104 -0
  386. package/src/rules/noMissingSyntax.js +215 -0
  387. package/src/rules/noMultiAsterisks.js +162 -0
  388. package/src/rules/noRestrictedSyntax.js +72 -0
  389. package/src/rules/noTypes.js +108 -0
  390. package/src/rules/noUndefinedTypes.js +797 -0
  391. package/src/rules/preferImportTag.js +521 -0
  392. package/src/rules/requireAsteriskPrefix.js +217 -0
  393. package/src/rules/requireDescription.js +190 -0
  394. package/src/rules/requireDescriptionCompleteSentence.js +376 -0
  395. package/src/rules/requireExample.js +143 -0
  396. package/src/rules/requireFileOverview.js +213 -0
  397. package/src/rules/requireHyphenBeforeParamDescription.js +210 -0
  398. package/src/rules/requireJsdoc.js +897 -0
  399. package/src/rules/requireParam.js +848 -0
  400. package/src/rules/requireParamDescription.js +110 -0
  401. package/src/rules/requireParamName.js +69 -0
  402. package/src/rules/requireParamType.js +109 -0
  403. package/src/rules/requireProperty.js +66 -0
  404. package/src/rules/requirePropertyDescription.js +25 -0
  405. package/src/rules/requirePropertyName.js +25 -0
  406. package/src/rules/requirePropertyType.js +25 -0
  407. package/src/rules/requireRejects.js +246 -0
  408. package/src/rules/requireReturns.js +291 -0
  409. package/src/rules/requireReturnsCheck.js +180 -0
  410. package/src/rules/requireReturnsDescription.js +73 -0
  411. package/src/rules/requireReturnsType.js +65 -0
  412. package/src/rules/requireTags.js +85 -0
  413. package/src/rules/requireTemplate.js +246 -0
  414. package/src/rules/requireThrows.js +128 -0
  415. package/src/rules/requireYields.js +265 -0
  416. package/src/rules/requireYieldsCheck.js +226 -0
  417. package/src/rules/sortTags.js +766 -0
  418. package/src/rules/tagLines.js +486 -0
  419. package/src/rules/textEscaping.js +158 -0
  420. package/src/rules/tsMethodSignatureStyle.js +300 -0
  421. package/src/rules/tsNoEmptyObjectType.js +61 -0
  422. package/src/rules/tsNoUnnecessaryTemplateExpression.js +130 -0
  423. package/src/rules/tsPreferFunctionType.js +127 -0
  424. package/src/rules/typeFormatting.js +690 -0
  425. package/src/rules/validTypes.js +466 -0
  426. package/src/rules.d.ts +3203 -0
  427. package/src/tagNames.js +301 -0
  428. package/src/utils/hasReturnValue.js +572 -0
  429. package/typings/babel__eslint-parser.d.ts +1 -0
  430. package/typings/gitdown.d.ts +16 -0
@@ -0,0 +1,3203 @@
1
+ export interface Rules {
2
+ /** Checks that `@access` tags have a valid value. */
3
+ "jsdoc/check-access": [];
4
+
5
+ /** Reports invalid alignment of JSDoc block asterisks. */
6
+ "jsdoc/check-alignment":
7
+ | []
8
+ | [
9
+ {
10
+ /**
11
+ * Set to 0 if you wish to avoid the normal requirement for an inner indentation of
12
+ * one space. Defaults to 1 (one space of normal inner indentation).
13
+ */
14
+ innerIndent?: number;
15
+ }
16
+ ];
17
+
18
+ /** @deprecated - Use `getJsdocProcessorPlugin` processor; ensures that (JavaScript) samples within `@example` tags adhere to ESLint rules. */
19
+ "jsdoc/check-examples":
20
+ | []
21
+ | [
22
+ {
23
+ allowInlineConfig?: boolean;
24
+ baseConfig?: {
25
+ [k: string]: unknown;
26
+ };
27
+ captionRequired?: boolean;
28
+ checkDefaults?: boolean;
29
+ checkEslintrc?: boolean;
30
+ checkParams?: boolean;
31
+ checkProperties?: boolean;
32
+ configFile?: string;
33
+ exampleCodeRegex?: string;
34
+ matchingFileName?: string;
35
+ matchingFileNameDefaults?: string;
36
+ matchingFileNameParams?: string;
37
+ matchingFileNameProperties?: string;
38
+ noDefaultExampleRules?: boolean;
39
+ paddedIndent?: number;
40
+ rejectExampleCodeRegex?: string;
41
+ reportUnusedDisableDirectives?: boolean;
42
+ }
43
+ ];
44
+
45
+ /** Reports invalid padding inside JSDoc blocks. */
46
+ "jsdoc/check-indentation":
47
+ | []
48
+ | [
49
+ {
50
+ /**
51
+ * Allows indentation of nested sections on subsequent lines (like bullet lists)
52
+ */
53
+ allowIndentedSections?: boolean;
54
+ /**
55
+ * Array of tags (e.g., `['example', 'description']`) whose content will be
56
+ * "hidden" from the `check-indentation` rule. Defaults to `['example']`.
57
+ *
58
+ * By default, the whole JSDoc block will be checked for invalid padding.
59
+ * That would include `@example` blocks too, which can get in the way
60
+ * of adding full, readable examples of code without ending up with multiple
61
+ * linting issues.
62
+ *
63
+ * When disabled (by passing `excludeTags: []` option), the following code *will*
64
+ * report a padding issue:
65
+ *
66
+ * ```js
67
+ * /**
68
+ * * @example
69
+ * * anArray.filter((a) => {
70
+ * * return a.b;
71
+ * * });
72
+ * * /
73
+ * ```
74
+ */
75
+ excludeTags?: string[];
76
+ }
77
+ ];
78
+
79
+ /** Reports invalid alignment of JSDoc block lines. */
80
+ "jsdoc/check-line-alignment":
81
+ | []
82
+ | ["always" | "never" | "any"]
83
+ | [
84
+ "always" | "never" | "any",
85
+ {
86
+ /**
87
+ * An object with any of the following spacing keys set to an integer.
88
+ * If a spacing is not defined, it defaults to one.
89
+ */
90
+ customSpacings?: {
91
+ /**
92
+ * Affects spacing after the asterisk (e.g., `* @param`)
93
+ */
94
+ postDelimiter?: number;
95
+ /**
96
+ * Affects spacing after any hyphens in the description (e.g., `* @param {someType} name - A description`)
97
+ */
98
+ postHyphen?: number;
99
+ /**
100
+ * Affects spacing after the name (e.g., `* @param {someType} name `)
101
+ */
102
+ postName?: number;
103
+ /**
104
+ * Affects spacing after the tag (e.g., `* @param `)
105
+ */
106
+ postTag?: number;
107
+ /**
108
+ * Affects spacing after the type (e.g., `* @param {someType} `)
109
+ */
110
+ postType?: number;
111
+ };
112
+ /**
113
+ * Disables `wrapIndent`; existing wrap indentation is preserved without changes.
114
+ */
115
+ disableWrapIndent?: boolean;
116
+ /**
117
+ * A boolean to determine whether to preserve the post-delimiter spacing of the
118
+ * main description. If `false` or unset, will be set to a single space.
119
+ */
120
+ preserveMainDescriptionPostDelimiter?: boolean;
121
+ /**
122
+ * Use this to change the tags which are sought for alignment changes. Defaults to an array of
123
+ * `['param', 'arg', 'argument', 'property', 'prop', 'returns', 'return', 'template']`.
124
+ */
125
+ tags?: string[];
126
+ /**
127
+ * The indent that will be applied for tag text after the first line.
128
+ * Default to the empty string (no indent).
129
+ */
130
+ wrapIndent?: string;
131
+ }
132
+ ];
133
+
134
+ /** Checks for dupe `@param` names, that nested param names have roots, and that parameter names in function declarations match JSDoc param names. */
135
+ "jsdoc/check-param-names":
136
+ | []
137
+ | [
138
+ {
139
+ /**
140
+ * If set to `true`, this option will allow extra `@param` definitions (e.g.,
141
+ * representing future expected or virtual params) to be present without needing
142
+ * their presence within the function signature. Other inconsistencies between
143
+ * `@param`'s and present function parameters will still be reported.
144
+ */
145
+ allowExtraTrailingParamDocs?: boolean;
146
+ /**
147
+ * Whether to check destructured properties. Defaults to `true`.
148
+ */
149
+ checkDestructured?: boolean;
150
+ /**
151
+ * If set to `true`, will require that rest properties are documented and
152
+ * that any extraneous properties (which may have been within the rest property)
153
+ * are documented. Defaults to `false`.
154
+ */
155
+ checkRestProperty?: boolean;
156
+ /**
157
+ * Defines a regular expression pattern to indicate which types should be
158
+ * checked for destructured content (and that those not matched should not
159
+ * be checked).
160
+ *
161
+ * When one specifies a type, unless it is of a generic type, like `object`
162
+ * or `array`, it may be considered unnecessary to have that object's
163
+ * destructured components required, especially where generated docs will
164
+ * link back to the specified type. For example:
165
+ *
166
+ * ```js
167
+ * /**
168
+ * * @param {SVGRect} bbox - a SVGRect
169
+ * * /
170
+ * export const bboxToObj = function ({x, y, width, height}) {
171
+ * return {x, y, width, height};
172
+ * };
173
+ * ```
174
+ *
175
+ * By default `checkTypesPattern` is set to
176
+ * `/^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$/v`,
177
+ * meaning that destructuring will be required only if the type of the `@param`
178
+ * (the text between curly brackets) is a match for "Object" or "Array" (with or
179
+ * without initial caps), "PlainObject", or "GenericObject", "GenericArray" (or
180
+ * if no type is present). So in the above example, the lack of a match will
181
+ * mean that no complaint will be given about the undocumented destructured
182
+ * parameters.
183
+ *
184
+ * Note that the `/` delimiters are optional, but necessary to add flags.
185
+ *
186
+ * Defaults to using (only) the `v` flag, so to add your own flags, encapsulate
187
+ * your expression as a string, but like a literal, e.g., `/^object$/vi`.
188
+ *
189
+ * You could set this regular expression to a more expansive list, or you
190
+ * could restrict it such that even types matching those strings would not
191
+ * need destructuring.
192
+ */
193
+ checkTypesPattern?: string;
194
+ /**
195
+ * Whether to check for extra destructured properties. Defaults to `false`. Change
196
+ * to `true` if you want to be able to document properties which are not actually
197
+ * destructured. Keep as `false` if you expect properties to be documented in
198
+ * their own types. Note that extra properties will always be reported if another
199
+ * item at the same level is destructured as destructuring will prevent other
200
+ * access and this option is only intended to permit documenting extra properties
201
+ * that are available and actually used in the function.
202
+ */
203
+ disableExtraPropertyReporting?: boolean;
204
+ /**
205
+ * Whether to avoid checks for missing `@param` definitions. Defaults to `false`. Change to `true` if you want to be able to omit properties.
206
+ */
207
+ disableMissingParamChecks?: boolean;
208
+ /**
209
+ * Set to `true` to auto-remove `@param` duplicates (based on identical
210
+ * names).
211
+ *
212
+ * Note that this option will remove duplicates of the same name even if
213
+ * the definitions do not match in other ways (e.g., the second param will
214
+ * be removed even if it has a different type or description).
215
+ */
216
+ enableFixer?: boolean;
217
+ /**
218
+ * Set to `true` if you wish to avoid reporting of child property documentation
219
+ * where instead of destructuring, a whole plain object is supplied as default
220
+ * value but you wish its keys to be considered as signalling that the properties
221
+ * are present and can therefore be documented. Defaults to `false`.
222
+ */
223
+ useDefaultObjectProperties?: boolean;
224
+ }
225
+ ];
226
+
227
+ /** Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots. */
228
+ "jsdoc/check-property-names":
229
+ | []
230
+ | [
231
+ {
232
+ /**
233
+ * Set to `true` to auto-remove `@property` duplicates (based on
234
+ * identical names).
235
+ *
236
+ * Note that this option will remove duplicates of the same name even if
237
+ * the definitions do not match in other ways (e.g., the second property will
238
+ * be removed even if it has a different type or description).
239
+ */
240
+ enableFixer?: boolean;
241
+ }
242
+ ];
243
+
244
+ /** Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode). */
245
+ "jsdoc/check-syntax": [];
246
+
247
+ /** Reports invalid block tag names. */
248
+ "jsdoc/check-tag-names":
249
+ | []
250
+ | [
251
+ {
252
+ /**
253
+ * Use an array of `definedTags` strings to configure additional, allowed tags.
254
+ * The format is as follows:
255
+ *
256
+ * ```json
257
+ * {
258
+ * "definedTags": ["note", "record"]
259
+ * }
260
+ * ```
261
+ */
262
+ definedTags?: string[];
263
+ /**
264
+ * Set to `false` to disable auto-removal of types that are redundant with the [`typed` option](#typed).
265
+ */
266
+ enableFixer?: boolean;
267
+ /**
268
+ * List of tags to allow inline.
269
+ *
270
+ * Defaults to array of `'link', 'linkcode', 'linkplain', 'tutorial', 'inheritDoc', 'label', 'include', and 'includeCode'`
271
+ */
272
+ inlineTags?: string[];
273
+ /**
274
+ * If this is set to `true`, all of the following tags used to control JSX output are allowed:
275
+ *
276
+ * ```
277
+ * jsx
278
+ * jsxFrag
279
+ * jsxImportSource
280
+ * jsxRuntime
281
+ * ```
282
+ *
283
+ * For more information, see the [babel documentation](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx).
284
+ */
285
+ jsxTags?: boolean;
286
+ /**
287
+ * If this is set to `true`, additionally checks for tag names that are redundant when using a type checker such as TypeScript.
288
+ *
289
+ * These tags are always unnecessary when using TypeScript or similar:
290
+ *
291
+ * ```
292
+ * augments
293
+ * callback
294
+ * class
295
+ * enum
296
+ * implements
297
+ * private
298
+ * property
299
+ * protected
300
+ * public
301
+ * readonly
302
+ * this
303
+ * type
304
+ * typedef
305
+ * ```
306
+ *
307
+ * These tags are unnecessary except when inside a TypeScript `declare` context:
308
+ *
309
+ * ```
310
+ * abstract
311
+ * access
312
+ * class
313
+ * constant
314
+ * constructs
315
+ * default
316
+ * enum
317
+ * export
318
+ * exports
319
+ * function
320
+ * global
321
+ * inherits
322
+ * instance
323
+ * interface
324
+ * member
325
+ * memberof
326
+ * memberOf
327
+ * method
328
+ * mixes
329
+ * mixin
330
+ * module
331
+ * name
332
+ * namespace
333
+ * override
334
+ * property
335
+ * requires
336
+ * static
337
+ * this
338
+ * ```
339
+ */
340
+ typed?: boolean;
341
+ }
342
+ ];
343
+
344
+ /** Checks that any `@template` names are actually used in the connected `@typedef` or type alias. */
345
+ "jsdoc/check-template-names": [];
346
+
347
+ /** Reports types deemed invalid (customizable and with defaults, for preventing and/or recommending replacements). */
348
+ "jsdoc/check-types":
349
+ | []
350
+ | [
351
+ {
352
+ /**
353
+ * Avoids reporting when a bad type is found on a specified tag.
354
+ */
355
+ exemptTagContexts?: {
356
+ /**
357
+ * Set a key `tag` to the tag to exempt
358
+ */
359
+ tag?: string;
360
+ /**
361
+ * Set to `true` to indicate that any types on that tag will be allowed,
362
+ * or to an array of strings which will only allow specific bad types.
363
+ * If an array of strings is given, these must match the type exactly,
364
+ * e.g., if you only allow `"object"`, it will not allow
365
+ * `"object<string, string>"`. Note that this is different from the
366
+ * behavior of `settings.jsdoc.preferredTypes`. This option is useful
367
+ * for normally restricting generic types like `object` with
368
+ * `preferredTypes`, but allowing `typedef` to indicate that its base
369
+ * type is `object`.
370
+ */
371
+ types?: boolean | string[];
372
+ }[];
373
+ /**
374
+ * Insists that only the supplied option type
375
+ * map is to be used, and that the default preferences (such as "string"
376
+ * over "String") will not be enforced. The option's default is `false`.
377
+ */
378
+ noDefaults?: boolean;
379
+ /**
380
+ * @deprecated Use the `preferredTypes[preferredType]` setting of the same name instead.
381
+ * If this option is `true`, will currently override `unifyParentAndChildTypeChecks` on the `preferredTypes` setting.
382
+ */
383
+ unifyParentAndChildTypeChecks?: boolean;
384
+ }
385
+ ];
386
+
387
+ /** This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`. */
388
+ "jsdoc/check-values":
389
+ | []
390
+ | [
391
+ {
392
+ /**
393
+ * An array of allowable author values. If absent, only non-whitespace will
394
+ * be checked for.
395
+ */
396
+ allowedAuthors?: string[];
397
+ /**
398
+ * An array of allowable license values or `true` to allow any license text.
399
+ * If present as an array, will be used in place of [SPDX identifiers](https://spdx.org/licenses/).
400
+ */
401
+ allowedLicenses?: string[] | boolean;
402
+ /**
403
+ * A string to be converted into a `RegExp` (with `v` flag) and whose first
404
+ * parenthetical grouping, if present, will match the portion of the license
405
+ * description to check (if no grouping is present, then the whole portion
406
+ * matched will be used). Defaults to `/([^\n\r]*)/gv`, i.e., the SPDX expression
407
+ * is expected before any line breaks.
408
+ *
409
+ * Note that the `/` delimiters are optional, but necessary to add flags.
410
+ *
411
+ * Defaults to using the `v` flag, so to add your own flags, encapsulate
412
+ * your expression as a string, but like a literal, e.g., `/^mit$/vi`.
413
+ */
414
+ licensePattern?: string;
415
+ /**
416
+ * Whether to enable validation that `@variation` must be a number. Defaults to
417
+ * `false`.
418
+ */
419
+ numericOnlyVariation?: boolean;
420
+ }
421
+ ];
422
+
423
+ /** Converts non-JSDoc comments preceding or following nodes into JSDoc ones */
424
+ "jsdoc/convert-to-jsdoc-comments":
425
+ | []
426
+ | [
427
+ {
428
+ /**
429
+ * An array of prefixes to allow at the beginning of a comment.
430
+ *
431
+ * Defaults to `['@ts-', 'istanbul ', 'c8 ', 'v8 ', 'eslint', 'prettier-']`.
432
+ *
433
+ * Supplying your own value overrides the defaults.
434
+ */
435
+ allowedPrefixes?: string[];
436
+ /**
437
+ * The contexts array which will be checked for preceding content.
438
+ *
439
+ * Can either be strings or an object with a `context` string and an optional, default `false` `inlineCommentBlock` boolean.
440
+ *
441
+ * Defaults to `ArrowFunctionExpression`, `FunctionDeclaration`,
442
+ * `FunctionExpression`, `TSDeclareFunction`.
443
+ */
444
+ contexts?: (
445
+ | string
446
+ | {
447
+ context?: string;
448
+ inlineCommentBlock?: boolean;
449
+ }
450
+ )[];
451
+ /**
452
+ * The contexts array which will be checked for content on the same line after.
453
+ *
454
+ * Can either be strings or an object with a `context` string and an optional, default `false` `inlineCommentBlock` boolean.
455
+ *
456
+ * Defaults to an empty array.
457
+ */
458
+ contextsAfter?: (
459
+ | string
460
+ | {
461
+ context?: string;
462
+ inlineCommentBlock?: boolean;
463
+ }
464
+ )[];
465
+ /**
466
+ * The contexts array which will be checked for content before and on the same
467
+ * line after.
468
+ *
469
+ * Can either be strings or an object with a `context` string and an optional, default `false` `inlineCommentBlock` boolean.
470
+ *
471
+ * Defaults to `VariableDeclarator`, `TSPropertySignature`, `PropertyDefinition`.
472
+ */
473
+ contextsBeforeAndAfter?: (
474
+ | string
475
+ | {
476
+ context?: string;
477
+ inlineCommentBlock?: boolean;
478
+ }
479
+ )[];
480
+ /**
481
+ * Set to `false` to disable fixing.
482
+ */
483
+ enableFixer?: boolean;
484
+ /**
485
+ * What policy to enforce on the conversion of non-JSDoc comments without
486
+ * line breaks. (Non-JSDoc (mulitline) comments with line breaks will always
487
+ * be converted to `multi` style JSDoc comments.)
488
+ *
489
+ * - `multi` - Convert to multi-line style
490
+ * ```js
491
+ * /**
492
+ * * Some text
493
+ * * /
494
+ * ```
495
+ * - `single` - Convert to single-line style
496
+ * ```js
497
+ * /** Some text * /
498
+ * ```
499
+ *
500
+ * Defaults to `multi`.
501
+ */
502
+ enforceJsdocLineStyle?: "multi" | "single";
503
+ /**
504
+ * What style of comments to which to apply JSDoc conversion.
505
+ *
506
+ * - `block` - Applies to block-style comments (`/* ... * /`)
507
+ * - `line` - Applies to line-style comments (`// ...`)
508
+ * - `both` - Applies to both block and line-style comments
509
+ *
510
+ * Defaults to `both`.
511
+ */
512
+ lineOrBlockStyle?: "block" | "line" | "both";
513
+ }
514
+ ];
515
+
516
+ /** Checks tags that are expected to be empty (e.g., `@abstract` or `@async`), reporting if they have content */
517
+ "jsdoc/empty-tags":
518
+ | []
519
+ | [
520
+ {
521
+ /**
522
+ * If you want additional tags to be checked for their descriptions, you may
523
+ * add them within this option.
524
+ *
525
+ * ```js
526
+ * {
527
+ * 'jsdoc/empty-tags': ['error', {tags: ['event']}]
528
+ * }
529
+ * ```
530
+ */
531
+ tags?: string[];
532
+ }
533
+ ];
534
+
535
+ /** Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode). */
536
+ "jsdoc/escape-inline-tags":
537
+ | []
538
+ | [
539
+ {
540
+ /**
541
+ * A listing of tags you wish to allow unescaped. Defaults to an empty array.
542
+ */
543
+ allowedInlineTags?: string[];
544
+ /**
545
+ * Whether to enable the fixer. Defaults to `false`.
546
+ */
547
+ enableFixer?: boolean;
548
+ /**
549
+ * How to escape the inline tag.
550
+ *
551
+ * May be "backticks" to enclose tags in backticks (treating as code segments), or
552
+ * "backslash" to escape tags with a backslash, i.e., `\@`
553
+ *
554
+ * Defaults to "backslash".
555
+ */
556
+ fixType?: "backticks" | "backslash";
557
+ }
558
+ ];
559
+
560
+ /** Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors). */
561
+ "jsdoc/implements-on-classes":
562
+ | []
563
+ | [
564
+ {
565
+ /**
566
+ * Set this to an array of strings representing the AST context (or an object with
567
+ * `context` and `comment` properties) where you wish the rule to be applied.
568
+ *
569
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
570
+ *
571
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
572
+ * `FunctionExpression`). Set to `"any"` if you want
573
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
574
+ * for finding function blocks not attached to a function declaration or
575
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
576
+ * `@method`) (including those associated with an `@interface`).
577
+ *
578
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
579
+ * section of our Advanced docs for more on the expected format.
580
+ */
581
+ contexts?: (
582
+ | string
583
+ | {
584
+ comment?: string;
585
+ context?: string;
586
+ }
587
+ )[];
588
+ }
589
+ ];
590
+
591
+ /** Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies` */
592
+ "jsdoc/imports-as-dependencies": [];
593
+
594
+ /** This rule reports doc comments that only restate their attached name. */
595
+ "jsdoc/informative-docs":
596
+ | []
597
+ | [
598
+ {
599
+ /**
600
+ * The `aliases` option allows indicating words as synonyms (aliases) of each other.
601
+ *
602
+ * For example, with `{ aliases: { emoji: ["smiley", "winkey"] } }`, the following comment would be considered uninformative:
603
+ *
604
+ * ```js
605
+ * /** A smiley/winkey. * /
606
+ * let emoji;
607
+ * ```
608
+ *
609
+ * The default `aliases` option is:
610
+ *
611
+ * ```json
612
+ * {
613
+ * "a": ["an", "our"]
614
+ * }
615
+ * ```
616
+ */
617
+ aliases?: {
618
+ /**
619
+ * This interface was referenced by `undefined`'s JSON-Schema definition
620
+ * via the `patternProperty` ".*".
621
+ */
622
+ [k: string]: string[];
623
+ };
624
+ /**
625
+ * Tags that should not be checked for valid contents.
626
+ *
627
+ * For example, with `{ excludedTags: ["category"] }`, the following comment would not be considered uninformative:
628
+ *
629
+ * ```js
630
+ * /** @category Types * /
631
+ * function computeTypes(node) {
632
+ * // ...
633
+ * }
634
+ * ```
635
+ *
636
+ * No tags are excluded by default.
637
+ */
638
+ excludedTags?: string[];
639
+ /**
640
+ * Words that are ignored when searching for one that adds meaning.
641
+ *
642
+ * For example, with `{ uselessWords: ["our"] }`, the following comment would be considered uninformative:
643
+ *
644
+ * ```js
645
+ * /** Our text. * /
646
+ * let text;
647
+ * ```
648
+ *
649
+ * The default `uselessWords` option is:
650
+ *
651
+ * ```json
652
+ * ["a", "an", "i", "in", "of", "s", "the"]
653
+ * ```
654
+ */
655
+ uselessWords?: string[];
656
+ }
657
+ ];
658
+
659
+ /** Enforces minimum number of newlines before JSDoc comment blocks */
660
+ "jsdoc/lines-before-block":
661
+ | []
662
+ | [
663
+ {
664
+ /**
665
+ * Whether to additionally check the start of blocks, such as classes or functions.
666
+ * Defaults to `false`.
667
+ */
668
+ checkBlockStarts?: boolean;
669
+ /**
670
+ * An array of tags whose presence in the JSDoc block will prevent the
671
+ * application of the rule. Defaults to `['type']` (i.e., if `@type` is present,
672
+ * lines before the block will not be added).
673
+ */
674
+ excludedTags?: string[];
675
+ /**
676
+ * This option excludes cases where the JSDoc block occurs on the same line as a
677
+ * preceding code or comment. Defaults to `true`.
678
+ */
679
+ ignoreSameLine?: boolean;
680
+ /**
681
+ * This option excludes cases where the JSDoc block is only one line long.
682
+ * Defaults to `true`.
683
+ */
684
+ ignoreSingleLines?: boolean;
685
+ /**
686
+ * The minimum number of lines to require. Defaults to 1.
687
+ */
688
+ lines?: number;
689
+ }
690
+ ];
691
+
692
+ /** Enforces a regular expression pattern on descriptions. */
693
+ "jsdoc/match-description":
694
+ | []
695
+ | [
696
+ {
697
+ /**
698
+ * Set this to an array of strings representing the AST context (or an object with
699
+ * optional `context` and `comment` properties) where you wish the rule to be applied (e.g.,
700
+ * `ClassDeclaration` for ES6 classes).
701
+ *
702
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
703
+ *
704
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
705
+ * `FunctionExpression`). Set to `"any"` if you want the rule to apply to any
706
+ * JSDoc block throughout your files.
707
+ *
708
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
709
+ * section of our Advanced docs for more on the expected format.
710
+ */
711
+ contexts?: (
712
+ | string
713
+ | {
714
+ comment?: string;
715
+ context?: string;
716
+ }
717
+ )[];
718
+ /**
719
+ * If you wish to override the main block description without changing the
720
+ * default `match-description` (which can cascade to the `tags` with `true`),
721
+ * you may use `mainDescription`:
722
+ *
723
+ * ```js
724
+ * {
725
+ * 'jsdoc/match-description': ['error', {
726
+ * mainDescription: '[A-Z].*\\.',
727
+ * tags: {
728
+ * param: true,
729
+ * returns: true
730
+ * }
731
+ * }]
732
+ * }
733
+ * ```
734
+ *
735
+ * There is no need to add `mainDescription: true`, as by default, the main
736
+ * block description (and only the main block description) is linted, though you
737
+ * may disable checking it by setting it to `false`.
738
+ *
739
+ * You may also provide an object with `message`:
740
+ *
741
+ * ```js
742
+ * {
743
+ * 'jsdoc/match-description': ['error', {
744
+ * mainDescription: {
745
+ * message: 'Capitalize first word of JSDoc block descriptions',
746
+ * match: '[A-Z].*\\.'
747
+ * },
748
+ * tags: {
749
+ * param: true,
750
+ * returns: true
751
+ * }
752
+ * }]
753
+ * }
754
+ * ```
755
+ */
756
+ mainDescription?:
757
+ | string
758
+ | boolean
759
+ | {
760
+ match?: string | boolean;
761
+ message?: string;
762
+ };
763
+ /**
764
+ * You can supply your own expression to override the default, passing a
765
+ * `matchDescription` string on the options object.
766
+ *
767
+ * Defaults to using (only) the `v` flag, so
768
+ * to add your own flags, encapsulate your expression as a string, but like a
769
+ * literal, e.g., `/[A-Z].*\./vi`.
770
+ *
771
+ * ```js
772
+ * {
773
+ * 'jsdoc/match-description': ['error', {matchDescription: '[A-Z].*\\.'}]
774
+ * }
775
+ * ```
776
+ */
777
+ matchDescription?: string;
778
+ /**
779
+ * You may provide a custom default message by using the following format:
780
+ *
781
+ * ```js
782
+ * {
783
+ * 'jsdoc/match-description': ['error', {
784
+ * message: 'The default description should begin with a capital letter.'
785
+ * }]
786
+ * }
787
+ * ```
788
+ *
789
+ * This can be overridden per tag or for the main block description by setting
790
+ * `message` within `tags` or `mainDescription`, respectively.
791
+ */
792
+ message?: string;
793
+ /**
794
+ * If not set to `false`, will enforce that the following tags have at least
795
+ * some content:
796
+ *
797
+ * - `@copyright`
798
+ * - `@example`
799
+ * - `@see`
800
+ * - `@todo`
801
+ *
802
+ * If you supply your own tag description for any of the above tags in `tags`,
803
+ * your description will take precedence.
804
+ */
805
+ nonemptyTags?: boolean;
806
+ /**
807
+ * If you want different regular expressions to apply to tags, you may use
808
+ * the `tags` option object:
809
+ *
810
+ * ```js
811
+ * {
812
+ * 'jsdoc/match-description': ['error', {tags: {
813
+ * param: '\\- [A-Z].*\\.',
814
+ * returns: '[A-Z].*\\.'
815
+ * }}]
816
+ * }
817
+ * ```
818
+ *
819
+ * In place of a string, you can also add `true` to indicate that a particular
820
+ * tag should be linted with the `matchDescription` value (or the default).
821
+ *
822
+ * ```js
823
+ * {
824
+ * 'jsdoc/match-description': ['error', {tags: {
825
+ * param: true,
826
+ * returns: true
827
+ * }}]
828
+ * }
829
+ * ```
830
+ *
831
+ * Alternatively, you may supply an object with a `message` property to indicate
832
+ * the error message for that tag.
833
+ *
834
+ * ```js
835
+ * {
836
+ * 'jsdoc/match-description': ['error', {tags: {
837
+ * param: {message: 'Begin with a hyphen', match: '\\- [A-Z].*\\.'},
838
+ * returns: {message: 'Capitalize for returns (the default)', match: true}
839
+ * }}]
840
+ * }
841
+ * ```
842
+ *
843
+ * The tags `@param`/`@arg`/`@argument` and `@property`/`@prop` will be properly
844
+ * parsed to ensure that the matched "description" text includes only the text
845
+ * after the name.
846
+ *
847
+ * All other tags will treat the text following the tag name, a space, and
848
+ * an optional curly-bracketed type expression (and another space) as part of
849
+ * its "description" (e.g., for `@returns {someType} some description`, the
850
+ * description is `some description` while for `@some-tag xyz`, the description
851
+ * is `xyz`).
852
+ */
853
+ tags?: {
854
+ /**
855
+ * This interface was referenced by `undefined`'s JSON-Schema definition
856
+ * via the `patternProperty` ".*".
857
+ */
858
+ [k: string]:
859
+ | string
860
+ | true
861
+ | {
862
+ match?: string | true;
863
+ message?: string;
864
+ };
865
+ };
866
+ }
867
+ ];
868
+
869
+ /** Reports the name portion of a JSDoc tag if matching or not matching a given regular expression. */
870
+ "jsdoc/match-name":
871
+ | []
872
+ | [
873
+ {
874
+ /**
875
+ * `match` is a required option containing an array of objects which determine
876
+ * the conditions whereby a name is reported as being problematic.
877
+ *
878
+ * These objects can have any combination of the following groups of optional
879
+ * properties, all of which act to confine one another.
880
+ *
881
+ * Note that `comment`, even if targeting a specific tag, is used to match the
882
+ * whole block. So if a `comment` finds its specific tag, it may still apply
883
+ * fixes found by the likes of `disallowName` even when a different tag has the
884
+ * disallowed name. An alternative is to ensure that `comment` finds the specific
885
+ * tag of the desired tag and/or name and no `disallowName` (or `allowName`) is
886
+ * supplied. In such a case, only one error will be reported, but no fixer will
887
+ * be applied, however.
888
+ */
889
+ match: {
890
+ /**
891
+ * Indicates which names are allowed for the given tag (or `*`).
892
+ * Accepts a string regular expression (optionally wrapped between two
893
+ * `/` delimiters followed by optional flags) used to match the name.
894
+ */
895
+ allowName?: string;
896
+ /**
897
+ * As with `context` but AST for the JSDoc block comment and types.
898
+ */
899
+ comment?: string;
900
+ /**
901
+ * AST to confine the allowing or disallowing to JSDoc blocks
902
+ * associated with a particular context. See the
903
+ * ["AST and Selectors"](../#advanced-ast-and-selectors)
904
+ * section of our Advanced docs for more on the expected format.
905
+ */
906
+ context?: string;
907
+ /**
908
+ * As with `allowName` but indicates names that are not allowed.
909
+ */
910
+ disallowName?: string;
911
+ /**
912
+ * An optional custom message to use when there is a match.
913
+ */
914
+ message?: string;
915
+ /**
916
+ * If `disallowName` is supplied and this value is present, it
917
+ * will replace the matched `disallowName` text.
918
+ */
919
+ replacement?: string;
920
+ /**
921
+ * This array should include tag names or `*` to indicate the
922
+ * match will apply for all tags (except as confined by any context
923
+ * properties). If `*` is not used, then these rules will only apply to
924
+ * the specified tags. If `tags` is omitted, then `*` is assumed.
925
+ */
926
+ tags?: string[];
927
+ }[];
928
+ }
929
+ ];
930
+
931
+ /** Controls how and whether JSDoc blocks can be expressed as single or multiple line blocks. */
932
+ "jsdoc/multiline-blocks":
933
+ | []
934
+ | [
935
+ {
936
+ /**
937
+ * If `noMultilineBlocks` is set to `true` with this option and multiple tags are
938
+ * found in a block, an error will not be reported.
939
+ *
940
+ * Since multiple-tagged lines cannot be collapsed into a single line, this option
941
+ * prevents them from being reported. Set to `false` if you really want to report
942
+ * any blocks.
943
+ *
944
+ * This option will also be applied when there is a block description and a single
945
+ * tag (since a description cannot precede a tag on a single line, and also
946
+ * cannot be reliably added after the tag either).
947
+ *
948
+ * Defaults to `true`.
949
+ */
950
+ allowMultipleTags?: boolean;
951
+ /**
952
+ * If `noMultilineBlocks` is set with this numeric option, multiline blocks will
953
+ * be permitted if containing at least the given amount of text.
954
+ *
955
+ * If not set, multiline blocks will not be permitted regardless of length unless
956
+ * a relevant tag is present and `multilineTags` is set.
957
+ *
958
+ * Defaults to not being in effect.
959
+ */
960
+ minimumLengthForMultiline?: number;
961
+ /**
962
+ * If `noMultilineBlocks` is set with this option, multiline blocks may be allowed
963
+ * regardless of length as long as a tag or a tag of a certain type is present.
964
+ *
965
+ * If `*` is included in the array, the presence of a tags will allow for
966
+ * multiline blocks (but not when without any tags unless the amount of text is
967
+ * over an amount specified by `minimumLengthForMultiline`).
968
+ *
969
+ * If the array does not include `*` but lists certain tags, the presence of
970
+ * such a tag will cause multiline blocks to be allowed.
971
+ *
972
+ * You may set this to an empty array to prevent any tag from permitting multiple
973
+ * lines.
974
+ *
975
+ * Defaults to `['*']`.
976
+ */
977
+ multilineTags?: "*" | string[];
978
+ /**
979
+ * For multiline blocks, any non-whitespace text preceding the `* /` on the final
980
+ * line will be reported. (Text preceding a newline is not reported.)
981
+ *
982
+ * `noMultilineBlocks` will have priority over this rule if it applies.
983
+ *
984
+ * Defaults to `true`.
985
+ */
986
+ noFinalLineText?: boolean;
987
+ /**
988
+ * Requires that JSDoc blocks are restricted to single lines only unless impacted
989
+ * by the options `minimumLengthForMultiline`, `multilineTags`, or
990
+ * `allowMultipleTags`.
991
+ *
992
+ * Defaults to `false`.
993
+ */
994
+ noMultilineBlocks?: boolean;
995
+ /**
996
+ * If this is `true`, any single line blocks will be reported, except those which
997
+ * are whitelisted in `singleLineTags`.
998
+ *
999
+ * Defaults to `false`.
1000
+ */
1001
+ noSingleLineBlocks?: boolean;
1002
+ /**
1003
+ * For multiline blocks, any non-whitespace text immediately after the `/**` and
1004
+ * space will be reported. (Text after a newline is not reported.)
1005
+ *
1006
+ * `noMultilineBlocks` will have priority over this rule if it applies.
1007
+ *
1008
+ * Defaults to `true`.
1009
+ */
1010
+ noZeroLineText?: boolean;
1011
+ /**
1012
+ * If this number is set, it indicates a minimum line width for a single line of
1013
+ * JSDoc content spread over a multi-line comment block. If a single line is under
1014
+ * the minimum length, it will be reported so as to enforce single line JSDoc blocks
1015
+ * for such cases. Blocks are not reported which have multi-line descriptions,
1016
+ * multiple tags, a block description and tag, or tags with multi-line types or
1017
+ * descriptions.
1018
+ *
1019
+ * Defaults to `null`.
1020
+ */
1021
+ requireSingleLineUnderCount?: number;
1022
+ /**
1023
+ * An array of tags which can nevertheless be allowed as single line blocks when
1024
+ * `noSingleLineBlocks` is set. You may set this to a empty array to
1025
+ * cause all single line blocks to be reported. If `'*'` is present, then
1026
+ * the presence of a tag will allow single line blocks (but not if a tag is
1027
+ * missing).
1028
+ *
1029
+ * Defaults to `['lends', 'type']`.
1030
+ */
1031
+ singleLineTags?: string[];
1032
+ }
1033
+ ];
1034
+
1035
+ /** This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block. */
1036
+ "jsdoc/no-bad-blocks":
1037
+ | []
1038
+ | [
1039
+ {
1040
+ /**
1041
+ * An array of directives that will not be reported if present at the beginning of
1042
+ * a multi-comment block and at-sign `/* @`.
1043
+ *
1044
+ * Defaults to `['ts-check', 'ts-expect-error', 'ts-ignore', 'ts-nocheck']`
1045
+ * (some directives [used by TypeScript](https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html#ts-check)).
1046
+ */
1047
+ ignore?: string[];
1048
+ /**
1049
+ * A boolean (defaulting to `false`) which if `true` will prevent all
1050
+ * JSDoc-like blocks with more than two initial asterisks even those without
1051
+ * apparent tag content.
1052
+ */
1053
+ preventAllMultiAsteriskBlocks?: boolean;
1054
+ }
1055
+ ];
1056
+
1057
+ /** If tags are present, this rule will prevent empty lines in the block description. If no tags are present, this rule will prevent extra empty lines in the block description. */
1058
+ "jsdoc/no-blank-block-descriptions": [];
1059
+
1060
+ /** Removes empty blocks with nothing but possibly line breaks */
1061
+ "jsdoc/no-blank-blocks":
1062
+ | []
1063
+ | [
1064
+ {
1065
+ /**
1066
+ * Whether or not to auto-remove the blank block. Defaults to `false`.
1067
+ */
1068
+ enableFixer?: boolean;
1069
+ }
1070
+ ];
1071
+
1072
+ /** This rule reports defaults being used on the relevant portion of `@param` or `@default`. */
1073
+ "jsdoc/no-defaults":
1074
+ | []
1075
+ | [
1076
+ {
1077
+ /**
1078
+ * Set this to an array of strings representing the AST context (or an object with
1079
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
1080
+ *
1081
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
1082
+ *
1083
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
1084
+ * `FunctionExpression`). Set to `"any"` if you want
1085
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
1086
+ * for finding function blocks not attached to a function declaration or
1087
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
1088
+ * `@method`) (including those associated with an `@interface`).
1089
+ *
1090
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1091
+ * section of our Advanced docs for more on the expected format.
1092
+ */
1093
+ contexts?: (
1094
+ | string
1095
+ | {
1096
+ comment?: string;
1097
+ context?: string;
1098
+ }
1099
+ )[];
1100
+ /**
1101
+ * Set this to `true` to report the presence of optional parameters. May be
1102
+ * used if the project is insisting on optionality being indicated by
1103
+ * the presence of ES6 default parameters (bearing in mind that such
1104
+ * "defaults" are only applied when the supplied value is missing or
1105
+ * `undefined` but not for `null` or other "falsey" values).
1106
+ */
1107
+ noOptionalParamNames?: boolean;
1108
+ }
1109
+ ];
1110
+
1111
+ /** Reports when certain comment structures are always expected. */
1112
+ "jsdoc/no-missing-syntax":
1113
+ | []
1114
+ | [
1115
+ {
1116
+ /**
1117
+ * Set this to an array of strings representing the AST context (or an object with
1118
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
1119
+ *
1120
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
1121
+ *
1122
+ * Use the `minimum` property (defaults to 1) to indicate how many are required
1123
+ * for the rule to be reported.
1124
+ *
1125
+ * Use the `message` property to indicate the specific error to be shown when an
1126
+ * error is reported for that context being found missing. You may use
1127
+ * `{{context}}` and `{{comment}}` with such messages. Defaults to
1128
+ * `"Syntax is required: {{context}}"`, or with a comment, to
1129
+ * `"Syntax is required: {{context}} with {{comment}}"`.
1130
+ *
1131
+ * Set to `"any"` if you want the rule to apply to any JSDoc block throughout
1132
+ * your files (as is necessary for finding function blocks not attached to a
1133
+ * function declaration or expression, i.e., `@callback` or `@function` (or its
1134
+ * aliases `@func` or `@method`) (including those associated with an `@interface`).
1135
+ *
1136
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1137
+ * section of our Advanced docs for more on the expected format.
1138
+ */
1139
+ contexts?: (
1140
+ | string
1141
+ | {
1142
+ comment?: string;
1143
+ context?: string;
1144
+ message?: string;
1145
+ minimum?: number;
1146
+ }
1147
+ )[];
1148
+ }
1149
+ ];
1150
+
1151
+ /** Prevents use of multiple asterisks at the beginning of lines. */
1152
+ "jsdoc/no-multi-asterisks":
1153
+ | []
1154
+ | [
1155
+ {
1156
+ /**
1157
+ * Set to `true` if you wish to allow asterisks after a space (as with Markdown):
1158
+ *
1159
+ * ```js
1160
+ * /**
1161
+ * * *bold* text
1162
+ * * /
1163
+ * ```
1164
+ *
1165
+ * Defaults to `false`.
1166
+ */
1167
+ allowWhitespace?: boolean;
1168
+ /**
1169
+ * Prevent the likes of this:
1170
+ *
1171
+ * ```js
1172
+ * /**
1173
+ * *
1174
+ * *
1175
+ * ** /
1176
+ * ```
1177
+ *
1178
+ * Defaults to `true`.
1179
+ */
1180
+ preventAtEnd?: boolean;
1181
+ /**
1182
+ * Prevent the likes of this:
1183
+ *
1184
+ * ```js
1185
+ * /**
1186
+ * *
1187
+ * **
1188
+ * * /
1189
+ * ```
1190
+ *
1191
+ * Defaults to `true`.
1192
+ */
1193
+ preventAtMiddleLines?: boolean;
1194
+ }
1195
+ ];
1196
+
1197
+ /** Reports when certain comment structures are present. */
1198
+ "jsdoc/no-restricted-syntax":
1199
+ | []
1200
+ | [
1201
+ {
1202
+ /**
1203
+ * Set this to an array of strings representing the AST context (or an object with
1204
+ * `context` and `comment` properties) where you wish the rule to be applied.
1205
+ *
1206
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
1207
+ *
1208
+ * Use the `message` property to indicate the specific error to be shown when an
1209
+ * error is reported for that context being found. Defaults to
1210
+ * `"Syntax is restricted: {{context}}"`, or with a comment, to
1211
+ * `"Syntax is restricted: {{context}} with {{comment}}"`.
1212
+ *
1213
+ * Set to `"any"` if you want the rule to apply to any JSDoc block throughout
1214
+ * your files (as is necessary for finding function blocks not attached to a
1215
+ * function declaration or expression, i.e., `@callback` or `@function` (or its
1216
+ * aliases `@func` or `@method`) (including those associated with an `@interface`).
1217
+ *
1218
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1219
+ * section of our Advanced docs for more on the expected format.
1220
+ */
1221
+ contexts: (
1222
+ | string
1223
+ | {
1224
+ comment?: string;
1225
+ context?: string;
1226
+ message?: string;
1227
+ }
1228
+ )[];
1229
+ }
1230
+ ];
1231
+
1232
+ /** This rule reports types being used on `@param` or `@returns` (redundant with TypeScript). */
1233
+ "jsdoc/no-types":
1234
+ | []
1235
+ | [
1236
+ {
1237
+ /**
1238
+ * Set this to an array of strings representing the AST context (or an object with
1239
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
1240
+ *
1241
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
1242
+ *
1243
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
1244
+ * `FunctionExpression`, `TSDeclareFunction`, `TSMethodSignature`,
1245
+ * `ClassDeclaration`). Set to `"any"` if you want
1246
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
1247
+ * for finding function blocks not attached to a function declaration or
1248
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
1249
+ * `@method`) (including those associated with an `@interface`).
1250
+ *
1251
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1252
+ * section of our Advanced docs for more on the expected format.
1253
+ */
1254
+ contexts?: (
1255
+ | string
1256
+ | {
1257
+ comment?: string;
1258
+ context?: string;
1259
+ }
1260
+ )[];
1261
+ }
1262
+ ];
1263
+
1264
+ /** Besides some expected built-in types, prohibits any types not specified as globals or within `@typedef`. */
1265
+ "jsdoc/no-undefined-types":
1266
+ | []
1267
+ | [
1268
+ {
1269
+ /**
1270
+ * Whether to check typedefs for use within the file
1271
+ */
1272
+ checkUsedTypedefs?: boolean;
1273
+ /**
1274
+ * This array can be populated to indicate other types which
1275
+ * are automatically considered as defined (in addition to globals, etc.).
1276
+ * Defaults to an empty array.
1277
+ */
1278
+ definedTypes?: string[];
1279
+ /**
1280
+ * Whether to disable reporting of errors. Defaults to
1281
+ * `false`. This may be set to `true` in order to take advantage of only
1282
+ * marking defined variables as used or checking used typedefs.
1283
+ */
1284
+ disableReporting?: boolean;
1285
+ /**
1286
+ * Whether to mark variables as used for the purposes
1287
+ * of the `no-unused-vars` rule when they are not found to be undefined.
1288
+ * Defaults to `true`. May be set to `false` to enforce a practice of not
1289
+ * importing types unless used in code.
1290
+ */
1291
+ markVariablesAsUsed?: boolean;
1292
+ }
1293
+ ];
1294
+
1295
+ /** Prefer `@import` tags to inline `import()` statements. */
1296
+ "jsdoc/prefer-import-tag":
1297
+ | []
1298
+ | [
1299
+ {
1300
+ /**
1301
+ * Whether or not to enable the fixer to add `@import` tags.
1302
+ */
1303
+ enableFixer?: boolean;
1304
+ /**
1305
+ * Whether to allow `import()` statements within `@typedef`
1306
+ */
1307
+ exemptTypedefs?: boolean;
1308
+ /**
1309
+ * What kind of `@import` to generate when no matching `@typedef` or `@import` is found
1310
+ */
1311
+ outputType?: "named-import" | "namespaced-import";
1312
+ }
1313
+ ];
1314
+
1315
+ /** Reports use of `any` or `*` type */
1316
+ "jsdoc/reject-any-type": [];
1317
+
1318
+ /** Reports use of `Function` type */
1319
+ "jsdoc/reject-function-type": [];
1320
+
1321
+ /** Requires that each JSDoc line starts with an `*`. */
1322
+ "jsdoc/require-asterisk-prefix":
1323
+ | []
1324
+ | ["always" | "never" | "any"]
1325
+ | [
1326
+ "always" | "never" | "any",
1327
+ {
1328
+ /**
1329
+ * If you want different values to apply to specific tags, you may use
1330
+ * the `tags` option object. The keys are `always`, `never`, or `any` and
1331
+ * the values are arrays of tag names or the special value `*description`
1332
+ * which applies to the main JSDoc block description.
1333
+ *
1334
+ * ```js
1335
+ * {
1336
+ * 'jsdoc/require-asterisk-prefix': ['error', 'always', {
1337
+ * tags: {
1338
+ * always: ['*description'],
1339
+ * any: ['example', 'license'],
1340
+ * never: ['copyright']
1341
+ * }
1342
+ * }]
1343
+ * }
1344
+ * ```
1345
+ */
1346
+ tags?: {
1347
+ /**
1348
+ * If it is `"always"` then a problem is raised when there is no asterisk
1349
+ * prefix on a given JSDoc line.
1350
+ */
1351
+ always?: string[];
1352
+ /**
1353
+ * No problem is raised regardless of asterisk presence or non-presence.
1354
+ */
1355
+ any?: string[];
1356
+ /**
1357
+ * If it is `"never"` then a problem is raised
1358
+ * when there is an asterisk present.
1359
+ */
1360
+ never?: string[];
1361
+ };
1362
+ }
1363
+ ];
1364
+
1365
+ /** Requires that all functions (and potentially other contexts) have a description. */
1366
+ "jsdoc/require-description":
1367
+ | []
1368
+ | [
1369
+ {
1370
+ /**
1371
+ * A value indicating whether `constructor`s should be
1372
+ * checked. Defaults to `true`.
1373
+ */
1374
+ checkConstructors?: boolean;
1375
+ /**
1376
+ * A value indicating whether getters should be checked.
1377
+ * Defaults to `true`.
1378
+ */
1379
+ checkGetters?: boolean;
1380
+ /**
1381
+ * A value indicating whether setters should be checked.
1382
+ * Defaults to `true`.
1383
+ */
1384
+ checkSetters?: boolean;
1385
+ /**
1386
+ * Set to an array of strings representing the AST context
1387
+ * where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6
1388
+ * classes).
1389
+ *
1390
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
1391
+ *
1392
+ * Overrides the default contexts (`ArrowFunctionExpression`,
1393
+ * `FunctionDeclaration`, `FunctionExpression`). Set to `"any"` if you want
1394
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
1395
+ * for finding function blocks not attached to a function declaration or
1396
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
1397
+ * `@method`) (including those associated with an `@interface`).
1398
+ *
1399
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1400
+ * section of our Advanced docs for more on the expected format.
1401
+ */
1402
+ contexts?: (
1403
+ | string
1404
+ | {
1405
+ comment?: string;
1406
+ context?: string;
1407
+ }
1408
+ )[];
1409
+ /**
1410
+ * Whether to accept implicit descriptions (`"body"`) or
1411
+ * `@description` tags (`"tag"`) as satisfying the rule. Set to `"any"` to
1412
+ * accept either style. Defaults to `"body"`.
1413
+ */
1414
+ descriptionStyle?: "body" | "tag" | "any";
1415
+ /**
1416
+ * Array of tags (e.g., `['type']`) whose presence on the
1417
+ * document block avoids the need for a `@description`. Defaults to an
1418
+ * array with `inheritdoc`. If you set this array, it will overwrite the
1419
+ * default, so be sure to add back `inheritdoc` if you wish its presence
1420
+ * to cause exemption of the rule.
1421
+ */
1422
+ exemptedBy?: string[];
1423
+ }
1424
+ ];
1425
+
1426
+ /** Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences. */
1427
+ "jsdoc/require-description-complete-sentence":
1428
+ | []
1429
+ | [
1430
+ {
1431
+ /**
1432
+ * You can provide an `abbreviations` options array to avoid such strings of text
1433
+ * being treated as sentence endings when followed by dots. The `.` is not
1434
+ * necessary at the end of the array items.
1435
+ */
1436
+ abbreviations?: string[];
1437
+ /**
1438
+ * When `false` (the new default), we will not assume capital letters after
1439
+ * newlines are an incorrect way to end the sentence (they may be proper
1440
+ * nouns, for example).
1441
+ */
1442
+ newlineBeforeCapsAssumesBadSentenceEnd?: boolean;
1443
+ /**
1444
+ * If you want additional tags to be checked for their descriptions, you may
1445
+ * add them within this option.
1446
+ *
1447
+ * ```js
1448
+ * {
1449
+ * 'jsdoc/require-description-complete-sentence': ['error', {
1450
+ * tags: ['see', 'copyright']
1451
+ * }]
1452
+ * }
1453
+ * ```
1454
+ *
1455
+ * The tags `@param`/`@arg`/`@argument` and `@property`/`@prop` will be properly
1456
+ * parsed to ensure that the checked "description" text includes only the text
1457
+ * after the name.
1458
+ *
1459
+ * All other tags will treat the text following the tag name, a space, and
1460
+ * an optional curly-bracketed type expression (and another space) as part of
1461
+ * its "description" (e.g., for `@returns {someType} some description`, the
1462
+ * description is `some description` while for `@some-tag xyz`, the description
1463
+ * is `xyz`).
1464
+ */
1465
+ tags?: string[];
1466
+ }
1467
+ ];
1468
+
1469
+ /** Requires that all functions (and potentially other contexts) have examples. */
1470
+ "jsdoc/require-example":
1471
+ | []
1472
+ | [
1473
+ {
1474
+ /**
1475
+ * A value indicating whether `constructor`s should be checked.
1476
+ * Defaults to `true`.
1477
+ */
1478
+ checkConstructors?: boolean;
1479
+ /**
1480
+ * A value indicating whether getters should be checked. Defaults to `false`.
1481
+ */
1482
+ checkGetters?: boolean;
1483
+ /**
1484
+ * A value indicating whether setters should be checked. Defaults to `false`.
1485
+ */
1486
+ checkSetters?: boolean;
1487
+ /**
1488
+ * Set this to an array of strings representing the AST context (or an object with
1489
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
1490
+ * (e.g., `ClassDeclaration` for ES6 classes).
1491
+ *
1492
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
1493
+ *
1494
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
1495
+ * `FunctionExpression`). Set to `"any"` if you want the rule to apply to any
1496
+ * JSDoc block throughout your files.
1497
+ *
1498
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1499
+ * section of our Advanced docs for more on the expected format.
1500
+ */
1501
+ contexts?: (
1502
+ | string
1503
+ | {
1504
+ comment?: string;
1505
+ context?: string;
1506
+ }
1507
+ )[];
1508
+ /**
1509
+ * A boolean on whether to enable the fixer (which adds an empty `@example` block).
1510
+ * Defaults to `true`.
1511
+ */
1512
+ enableFixer?: boolean;
1513
+ /**
1514
+ * Array of tags (e.g., `['type']`) whose presence on the document
1515
+ * block avoids the need for an `@example`. Defaults to an array with
1516
+ * `inheritdoc`. If you set this array, it will overwrite the default,
1517
+ * so be sure to add back `inheritdoc` if you wish its presence to cause
1518
+ * exemption of the rule.
1519
+ */
1520
+ exemptedBy?: string[];
1521
+ /**
1522
+ * Boolean to indicate that no-argument functions should not be reported for
1523
+ * missing `@example` declarations.
1524
+ */
1525
+ exemptNoArguments?: boolean;
1526
+ }
1527
+ ];
1528
+
1529
+ /** Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file. */
1530
+ "jsdoc/require-file-overview":
1531
+ | []
1532
+ | [
1533
+ {
1534
+ /**
1535
+ * The keys of this object are tag names, and the values are configuration
1536
+ * objects indicating what will be checked for these whole-file tags.
1537
+ *
1538
+ * Each configuration object has 3 potential boolean keys (which default
1539
+ * to `false` when this option is supplied).
1540
+ *
1541
+ * 1. `mustExist` - enforces that all files have a `@file`, `@fileoverview`, or `@overview` tag.
1542
+ * 2. `preventDuplicates` - enforces that duplicate file overview tags within a given file will be reported
1543
+ * 3. `initialCommentsOnly` - reports file overview tags which are not, as per
1544
+ * [the docs](https://jsdoc.app/tags-file.html), "at the beginning of
1545
+ * the file"–where beginning of the file is interpreted in this rule
1546
+ * as being when the overview tag is not preceded by anything other than
1547
+ * a comment.
1548
+ *
1549
+ * When no `tags` is present, the default is:
1550
+ *
1551
+ * ```json
1552
+ * {
1553
+ * "file": {
1554
+ * "initialCommentsOnly": true,
1555
+ * "mustExist": true,
1556
+ * "preventDuplicates": true,
1557
+ * }
1558
+ * }
1559
+ * ```
1560
+ *
1561
+ * You can add additional tag names and/or override `file` if you supply this
1562
+ * option, e.g., in place of or in addition to `file`, giving other potential
1563
+ * file global tags like `@license`, `@copyright`, `@author`, `@module` or
1564
+ * `@exports`, optionally restricting them to a single use or preventing them
1565
+ * from being preceded by anything besides comments.
1566
+ *
1567
+ * For example:
1568
+ *
1569
+ * ```js
1570
+ * {
1571
+ * "license": {
1572
+ * "mustExist": true,
1573
+ * "preventDuplicates": true,
1574
+ * }
1575
+ * }
1576
+ * ```
1577
+ *
1578
+ * This would require one and only one `@license` in the file, though because
1579
+ * `initialCommentsOnly` is absent and defaults to `false`, the `@license`
1580
+ * can be anywhere.
1581
+ *
1582
+ * In the case of `@license`, you can use this rule along with the
1583
+ * `check-values` rule (with its `allowedLicenses` or `licensePattern` options),
1584
+ * to enforce a license whitelist be present on every JS file.
1585
+ *
1586
+ * Note that if you choose to use `preventDuplicates` with `license`, you still
1587
+ * have a way to allow multiple licenses for the whole page by using the SPDX
1588
+ * "AND" expression, e.g., `@license (MIT AND GPL-3.0)`.
1589
+ *
1590
+ * Note that the tag names are the main JSDoc tag name, so you should use `file`
1591
+ * in this configuration object regardless of whether you have configured
1592
+ * `fileoverview` instead of `file` on `tagNamePreference` (i.e., `fileoverview`
1593
+ * will be checked, but you must use `file` on the configuration object).
1594
+ */
1595
+ tags?: {
1596
+ /**
1597
+ * This interface was referenced by `undefined`'s JSON-Schema definition
1598
+ * via the `patternProperty` ".*".
1599
+ */
1600
+ [k: string]: {
1601
+ initialCommentsOnly?: boolean;
1602
+ mustExist?: boolean;
1603
+ preventDuplicates?: boolean;
1604
+ };
1605
+ };
1606
+ }
1607
+ ];
1608
+
1609
+ /** Requires a hyphen before the `@param` description (and optionally before `@property` descriptions). */
1610
+ "jsdoc/require-hyphen-before-param-description":
1611
+ | []
1612
+ | ["always" | "never"]
1613
+ | [
1614
+ "always" | "never",
1615
+ {
1616
+ /**
1617
+ * Object whose keys indicate different tags to check for the
1618
+ * presence or absence of hyphens; the key value should be "always" or "never",
1619
+ * indicating how hyphens are to be applied, e.g., `{property: 'never'}`
1620
+ * to ensure `@property` never uses hyphens. A key can also be set as `*`, e.g.,
1621
+ * `'*': 'always'` to apply hyphen checking to any tag (besides the preferred
1622
+ * `@param` tag which follows the main string option setting and besides any
1623
+ * other `tags` entries).
1624
+ */
1625
+ tags?:
1626
+ | {
1627
+ /**
1628
+ * This interface was referenced by `undefined`'s JSON-Schema definition
1629
+ * via the `patternProperty` ".*".
1630
+ */
1631
+ [k: string]: "always" | "never";
1632
+ }
1633
+ | "any";
1634
+ }
1635
+ ];
1636
+
1637
+ /** Checks for presence of JSDoc comments, on functions and potentially other contexts (optionally limited to exports). */
1638
+ "jsdoc/require-jsdoc":
1639
+ | []
1640
+ | [
1641
+ {
1642
+ /**
1643
+ * Normally, when `FunctionExpression` is checked, additional checks are
1644
+ * added to check the parent contexts where reporting is likely to be desired. If you really
1645
+ * want to check *all* function expressions, then set this to `true`.
1646
+ */
1647
+ checkAllFunctionExpressions?: boolean;
1648
+ /**
1649
+ * A value indicating whether `constructor`s should be checked. Defaults to
1650
+ * `true`. When `true`, `exemptEmptyConstructors` may still avoid reporting when
1651
+ * no parameters or return values are found.
1652
+ */
1653
+ checkConstructors?: boolean;
1654
+ /**
1655
+ * A value indicating whether getters should be checked. Besides setting as a
1656
+ * boolean, this option can be set to the string `"no-setter"` to indicate that
1657
+ * getters should be checked but only when there is no setter. This may be useful
1658
+ * if one only wishes documentation on one of the two accessors. Defaults to
1659
+ * `false`.
1660
+ */
1661
+ checkGetters?: boolean | "no-setter";
1662
+ /**
1663
+ * A value indicating whether setters should be checked. Besides setting as a
1664
+ * boolean, this option can be set to the string `"no-getter"` to indicate that
1665
+ * setters should be checked but only when there is no getter. This may be useful
1666
+ * if one only wishes documentation on one of the two accessors. Defaults to
1667
+ * `false`.
1668
+ */
1669
+ checkSetters?: boolean | "no-getter";
1670
+ /**
1671
+ * Set this to an array of strings or objects representing the additional AST
1672
+ * contexts where you wish the rule to be applied (e.g., `Property` for
1673
+ * properties). If specified as an object, it should have a `context` property
1674
+ * and can have an `inlineCommentBlock` property which, if set to `true`, will
1675
+ * add an inline `/** * /` instead of the regular, multi-line, indented jsdoc
1676
+ * block which will otherwise be added. Defaults to an empty array. Contexts
1677
+ * may also have their own `minLineCount` property which is an integer
1678
+ * indicating a minimum number of lines expected for a node in order
1679
+ * for it to require documentation.
1680
+ *
1681
+ * Note that you may need to disable `require` items (e.g., `MethodDefinition`)
1682
+ * if you are specifying a more precise form in `contexts` (e.g., `MethodDefinition:not([accessibility="private"] > FunctionExpression`).
1683
+ *
1684
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1685
+ * section of our Advanced docs for more on the expected format.
1686
+ */
1687
+ contexts?: (
1688
+ | string
1689
+ | {
1690
+ context?: string;
1691
+ inlineCommentBlock?: boolean;
1692
+ minLineCount?: number;
1693
+ }
1694
+ )[];
1695
+ /**
1696
+ * A boolean on whether to enable the fixer (which adds an empty JSDoc block).
1697
+ * Defaults to `true`.
1698
+ */
1699
+ enableFixer?: boolean;
1700
+ /**
1701
+ * When `true`, the rule will not report missing JSDoc blocks above constructors
1702
+ * with no parameters or return values (this is enabled by default as the class
1703
+ * name or description should be seen as sufficient to convey intent).
1704
+ *
1705
+ * Defaults to `true`.
1706
+ */
1707
+ exemptEmptyConstructors?: boolean;
1708
+ /**
1709
+ * When `true`, the rule will not report missing JSDoc blocks above
1710
+ * functions/methods with no parameters or return values (intended where
1711
+ * function/method names are sufficient for themselves as documentation).
1712
+ *
1713
+ * Defaults to `false`.
1714
+ */
1715
+ exemptEmptyFunctions?: boolean;
1716
+ /**
1717
+ * If set to `true` will avoid checking an overloaded function's implementation.
1718
+ *
1719
+ * Defaults to `false`.
1720
+ */
1721
+ exemptOverloadedImplementations?: boolean;
1722
+ /**
1723
+ * An optional message to add to the inserted JSDoc block. Defaults to the
1724
+ * empty string.
1725
+ */
1726
+ fixerMessage?: string;
1727
+ /**
1728
+ * An integer to indicate a minimum number of lines expected for a node in order
1729
+ * for it to require documentation. Defaults to `undefined`. This option will
1730
+ * apply to any context; see `contexts` for line counts specific to a context.
1731
+ */
1732
+ minLineCount?: number;
1733
+ /**
1734
+ * This option will insist that missing JSDoc blocks are only reported for
1735
+ * function bodies / class declarations that are exported from the module.
1736
+ * May be a boolean or object. If set to `true`, the defaults below will be
1737
+ * used. If unset, JSDoc block reporting will not be limited to exports.
1738
+ *
1739
+ * This object supports the following optional boolean keys (`false` unless
1740
+ * otherwise noted):
1741
+ *
1742
+ * - `ancestorsOnly` - Optimization to only check node ancestors to check if node is exported
1743
+ * - `esm` - ESM exports are checked for JSDoc comments (Defaults to `true`)
1744
+ * - `cjs` - CommonJS exports are checked for JSDoc comments (Defaults to `true`)
1745
+ * - `window` - Window global exports are checked for JSDoc comments
1746
+ */
1747
+ publicOnly?:
1748
+ | boolean
1749
+ | {
1750
+ ancestorsOnly?: boolean;
1751
+ cjs?: boolean;
1752
+ esm?: boolean;
1753
+ window?: boolean;
1754
+ };
1755
+ /**
1756
+ * An object with the following optional boolean keys which all default to
1757
+ * `false` except for `FunctionDeclaration` which defaults to `true`.
1758
+ */
1759
+ require?: {
1760
+ /**
1761
+ * Whether to check arrow functions like `() => {}`
1762
+ */
1763
+ ArrowFunctionExpression?: boolean;
1764
+ /**
1765
+ * Whether to check declarations like `class A {}`
1766
+ */
1767
+ ClassDeclaration?: boolean;
1768
+ /**
1769
+ * Whether to check class expressions like `const myClass = class {}`
1770
+ */
1771
+ ClassExpression?: boolean;
1772
+ /**
1773
+ * Whether to check function declarations like `function a {}`
1774
+ */
1775
+ FunctionDeclaration?: boolean;
1776
+ /**
1777
+ * Whether to check function expressions like `const a = function {}`
1778
+ */
1779
+ FunctionExpression?: boolean;
1780
+ /**
1781
+ * Whether to check method definitions like `class A { someMethodDefinition () {} }`
1782
+ */
1783
+ MethodDefinition?: boolean;
1784
+ };
1785
+ /**
1786
+ * If `true`, will skip above uncommented overloaded functions to check
1787
+ * for a comment block (e.g., at the top of a set of overloaded functions).
1788
+ *
1789
+ * If `false`, will force each overloaded function to be checked for a
1790
+ * comment block.
1791
+ *
1792
+ * Defaults to `true`.
1793
+ */
1794
+ skipInterveningOverloadedDeclarations?: boolean;
1795
+ }
1796
+ ];
1797
+
1798
+ /** Requires a description for `@next` tags */
1799
+ "jsdoc/require-next-description": [];
1800
+
1801
+ /** Requires a type for `@next` tags */
1802
+ "jsdoc/require-next-type": [];
1803
+
1804
+ /** Requires that all function parameters are documented with a `@param` tag. */
1805
+ "jsdoc/require-param":
1806
+ | []
1807
+ | [
1808
+ {
1809
+ /**
1810
+ * Numeric to indicate the number at which to begin auto-incrementing roots.
1811
+ * Defaults to `0`.
1812
+ */
1813
+ autoIncrementBase?: number;
1814
+ /**
1815
+ * A value indicating whether `constructor`s should be checked. Defaults to
1816
+ * `true`.
1817
+ */
1818
+ checkConstructors?: boolean;
1819
+ /**
1820
+ * Whether to require destructured properties. Defaults to `true`.
1821
+ */
1822
+ checkDestructured?: boolean;
1823
+ /**
1824
+ * Whether to check the existence of a corresponding `@param` for root objects
1825
+ * of destructured properties (e.g., that for `function ({a, b}) {}`, that there
1826
+ * is something like `@param myRootObj` defined that can correspond to
1827
+ * the `{a, b}` object parameter).
1828
+ *
1829
+ * If `checkDestructuredRoots` is `false`, `checkDestructured` will also be
1830
+ * implied to be `false` (i.e., the inside of the roots will not be checked
1831
+ * either, e.g., it will also not complain if `a` or `b` do not have their own
1832
+ * documentation). Defaults to `true`.
1833
+ */
1834
+ checkDestructuredRoots?: boolean;
1835
+ /**
1836
+ * A value indicating whether getters should be checked. Defaults to `false`.
1837
+ */
1838
+ checkGetters?: boolean;
1839
+ /**
1840
+ * If set to `true`, will report (and add fixer insertions) for missing rest
1841
+ * properties. Defaults to `false`.
1842
+ *
1843
+ * If set to `true`, note that you can still document the subproperties of the
1844
+ * rest property using other jsdoc features, e.g., `@typedef`:
1845
+ *
1846
+ * ```js
1847
+ * /**
1848
+ * * @typedef ExtraOptions
1849
+ * * @property innerProp1
1850
+ * * @property innerProp2
1851
+ * * /
1852
+ *
1853
+ * /**
1854
+ * * @param cfg
1855
+ * * @param cfg.num
1856
+ * * @param {ExtraOptions} extra
1857
+ * * /
1858
+ * function quux ({num, ...extra}) {
1859
+ * }
1860
+ * ```
1861
+ *
1862
+ * Setting this option to `false` (the default) may be useful in cases where
1863
+ * you already have separate `@param` definitions for each of the properties
1864
+ * within the rest property.
1865
+ *
1866
+ * For example, with the option disabled, this will not give an error despite
1867
+ * `extra` not having any definition:
1868
+ *
1869
+ * ```js
1870
+ * /**
1871
+ * * @param cfg
1872
+ * * @param cfg.num
1873
+ * * /
1874
+ * function quux ({num, ...extra}) {
1875
+ * }
1876
+ * ```
1877
+ *
1878
+ * Nor will this:
1879
+ *
1880
+ * ```js
1881
+ * /**
1882
+ * * @param cfg
1883
+ * * @param cfg.num
1884
+ * * @param cfg.innerProp1
1885
+ * * @param cfg.innerProp2
1886
+ * * /
1887
+ * function quux ({num, ...extra}) {
1888
+ * }
1889
+ * ```
1890
+ */
1891
+ checkRestProperty?: boolean;
1892
+ /**
1893
+ * A value indicating whether setters should be checked. Defaults to `false`.
1894
+ */
1895
+ checkSetters?: boolean;
1896
+ /**
1897
+ * When one specifies a type, unless it is of a generic type, like `object`
1898
+ * or `array`, it may be considered unnecessary to have that object's
1899
+ * destructured components required, especially where generated docs will
1900
+ * link back to the specified type. For example:
1901
+ *
1902
+ * ```js
1903
+ * /**
1904
+ * * @param {SVGRect} bbox - a SVGRect
1905
+ * * /
1906
+ * export const bboxToObj = function ({x, y, width, height}) {
1907
+ * return {x, y, width, height};
1908
+ * };
1909
+ * ```
1910
+ *
1911
+ * By default `checkTypesPattern` is set to
1912
+ * `/^(?:[oO]bject|[aA]rray|PlainObject|Generic(?:Object|Array))$/v`,
1913
+ * meaning that destructuring will be required only if the type of the `@param`
1914
+ * (the text between curly brackets) is a match for "Object" or "Array" (with or
1915
+ * without initial caps), "PlainObject", or "GenericObject", "GenericArray" (or
1916
+ * if no type is present). So in the above example, the lack of a match will
1917
+ * mean that no complaint will be given about the undocumented destructured
1918
+ * parameters.
1919
+ *
1920
+ * Note that the `/` delimiters are optional, but necessary to add flags.
1921
+ *
1922
+ * Defaults to using (only) the `v` flag, so to add your own flags, encapsulate
1923
+ * your expression as a string, but like a literal, e.g., `/^object$/vi`.
1924
+ *
1925
+ * You could set this regular expression to a more expansive list, or you
1926
+ * could restrict it such that even types matching those strings would not
1927
+ * need destructuring.
1928
+ */
1929
+ checkTypesPattern?: string;
1930
+ /**
1931
+ * Set this to an array of strings representing the AST context (or an object with
1932
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
1933
+ *
1934
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
1935
+ *
1936
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
1937
+ * `FunctionExpression`). May be useful for adding such as
1938
+ * `TSMethodSignature` in TypeScript or restricting the contexts
1939
+ * which are checked.
1940
+ *
1941
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
1942
+ * section of our Advanced docs for more on the expected format.
1943
+ */
1944
+ contexts?: (
1945
+ | string
1946
+ | {
1947
+ comment?: string;
1948
+ context?: string;
1949
+ }
1950
+ )[];
1951
+ /**
1952
+ * Whether to enable the fixer. Defaults to `true`.
1953
+ */
1954
+ enableFixer?: boolean;
1955
+ /**
1956
+ * Whether to enable the rest element fixer.
1957
+ *
1958
+ * The fixer will automatically report/insert
1959
+ * [JSDoc repeatable parameters](https://jsdoc.app/tags-param.html#multiple-types-and-repeatable-parameters)
1960
+ * if missing.
1961
+ *
1962
+ * ```js
1963
+ * /**
1964
+ * * @param {GenericArray} cfg
1965
+ * * @param {number} cfg."0"
1966
+ * * /
1967
+ * function baar ([a, ...extra]) {
1968
+ * //
1969
+ * }
1970
+ * ```
1971
+ *
1972
+ * ...becomes:
1973
+ *
1974
+ * ```js
1975
+ * /**
1976
+ * * @param {GenericArray} cfg
1977
+ * * @param {number} cfg."0"
1978
+ * * @param {...any} cfg."1"
1979
+ * * /
1980
+ * function baar ([a, ...extra]) {
1981
+ * //
1982
+ * }
1983
+ * ```
1984
+ *
1985
+ * Note that the type `any` is included since we don't know of any specific
1986
+ * type to use.
1987
+ *
1988
+ * Defaults to `true`.
1989
+ */
1990
+ enableRestElementFixer?: boolean;
1991
+ /**
1992
+ * Whether to enable the auto-adding of incrementing roots.
1993
+ *
1994
+ * The default behavior of `true` is for "root" to be auto-inserted for missing
1995
+ * roots, followed by a 0-based auto-incrementing number.
1996
+ *
1997
+ * So for:
1998
+ *
1999
+ * ```js
2000
+ * function quux ({foo}, {bar}, {baz}) {
2001
+ * }
2002
+ * ```
2003
+ *
2004
+ * ...the default JSDoc that would be added if the fixer is enabled would be:
2005
+ *
2006
+ * ```js
2007
+ * /**
2008
+ * * @param root0
2009
+ * * @param root0.foo
2010
+ * * @param root1
2011
+ * * @param root1.bar
2012
+ * * @param root2
2013
+ * * @param root2.baz
2014
+ * * /
2015
+ * ```
2016
+ *
2017
+ * Has no effect if `enableFixer` is set to `false`.
2018
+ */
2019
+ enableRootFixer?: boolean;
2020
+ /**
2021
+ * Array of tags (e.g., `['type']`) whose presence on the document block
2022
+ * avoids the need for a `@param`. Defaults to an array with
2023
+ * `inheritdoc`. If you set this array, it will overwrite the default,
2024
+ * so be sure to add back `inheritdoc` if you wish its presence to cause
2025
+ * exemption of the rule.
2026
+ */
2027
+ exemptedBy?: string[];
2028
+ /**
2029
+ * Set to `true` to ignore reporting when all params are missing. Defaults to
2030
+ * `false`.
2031
+ */
2032
+ ignoreWhenAllParamsMissing?: boolean;
2033
+ /**
2034
+ * Set if you wish TypeScript interfaces to exempt checks for the existence of
2035
+ * `@param`'s.
2036
+ *
2037
+ * Will check for a type defining the function itself (on a variable
2038
+ * declaration) or if there is a single destructured object with a type.
2039
+ * Defaults to `false`.
2040
+ */
2041
+ interfaceExemptsParamsCheck?: boolean;
2042
+ /**
2043
+ * An array of root names to use in the fixer when roots are missing. Defaults
2044
+ * to `['root']`. Note that only when all items in the array besides the last
2045
+ * are exhausted will auto-incrementing occur. So, with
2046
+ * `unnamedRootBase: ['arg', 'config']`, the following:
2047
+ *
2048
+ * ```js
2049
+ * function quux ({foo}, [bar], {baz}) {
2050
+ * }
2051
+ * ```
2052
+ *
2053
+ * ...will get the following JSDoc block added:
2054
+ *
2055
+ * ```js
2056
+ * /**
2057
+ * * @param arg
2058
+ * * @param arg.foo
2059
+ * * @param config0
2060
+ * * @param config0."0" (`bar`)
2061
+ * * @param config1
2062
+ * * @param config1.baz
2063
+ * * /
2064
+ * ```
2065
+ */
2066
+ unnamedRootBase?: string[];
2067
+ /**
2068
+ * Set to `true` if you wish to expect documentation of properties on objects
2069
+ * supplied as default values. Defaults to `false`.
2070
+ */
2071
+ useDefaultObjectProperties?: boolean;
2072
+ }
2073
+ ];
2074
+
2075
+ /** Requires that each `@param` tag has a `description` value. */
2076
+ "jsdoc/require-param-description":
2077
+ | []
2078
+ | [
2079
+ {
2080
+ /**
2081
+ * Set this to an array of strings representing the AST context (or an object with
2082
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
2083
+ *
2084
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2085
+ *
2086
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2087
+ * `FunctionExpression`). Set to `"any"` if you want
2088
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
2089
+ * for finding function blocks not attached to a function declaration or
2090
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2091
+ * `@method`) (including those associated with an `@interface`).
2092
+ *
2093
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2094
+ * section of our Advanced docs for more on the expected format.
2095
+ */
2096
+ contexts?: (
2097
+ | string
2098
+ | {
2099
+ comment?: string;
2100
+ context?: string;
2101
+ }
2102
+ )[];
2103
+ /**
2104
+ * The description string to set by default for destructured roots. Defaults to
2105
+ * "The root object".
2106
+ */
2107
+ defaultDestructuredRootDescription?: string;
2108
+ /**
2109
+ * Whether to set a default destructured root description. For example, you may
2110
+ * wish to avoid manually having to set the description for a `@param`
2111
+ * corresponding to a destructured root object as it should always be the same
2112
+ * type of object. Uses `defaultDestructuredRootDescription` for the description
2113
+ * string. Defaults to `false`.
2114
+ */
2115
+ setDefaultDestructuredRootDescription?: boolean;
2116
+ }
2117
+ ];
2118
+
2119
+ /** Requires that all `@param` tags have names. */
2120
+ "jsdoc/require-param-name":
2121
+ | []
2122
+ | [
2123
+ {
2124
+ /**
2125
+ * Set this to an array of strings representing the AST context (or an object with
2126
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
2127
+ *
2128
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2129
+ *
2130
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2131
+ * `FunctionExpression`). Set to `"any"` if you want
2132
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
2133
+ * for finding function blocks not attached to a function declaration or
2134
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2135
+ * `@method`) (including those associated with an `@interface`).
2136
+ *
2137
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2138
+ * section of our Advanced docs for more on the expected format.
2139
+ */
2140
+ contexts?: (
2141
+ | string
2142
+ | {
2143
+ comment?: string;
2144
+ context?: string;
2145
+ }
2146
+ )[];
2147
+ }
2148
+ ];
2149
+
2150
+ /** Requires that each `@param` tag has a type value (in curly brackets). */
2151
+ "jsdoc/require-param-type":
2152
+ | []
2153
+ | [
2154
+ {
2155
+ /**
2156
+ * Set this to an array of strings representing the AST context (or an object with
2157
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
2158
+ *
2159
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2160
+ *
2161
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2162
+ * `FunctionExpression`). Set to `"any"` if you want
2163
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
2164
+ * for finding function blocks not attached to a function declaration or
2165
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2166
+ * `@method`) (including those associated with an `@interface`).
2167
+ *
2168
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2169
+ * section of our Advanced docs for more on the expected format.
2170
+ */
2171
+ contexts?: (
2172
+ | string
2173
+ | {
2174
+ comment?: string;
2175
+ context?: string;
2176
+ }
2177
+ )[];
2178
+ /**
2179
+ * The type string to set by default for destructured roots. Defaults to "object".
2180
+ */
2181
+ defaultDestructuredRootType?: string;
2182
+ /**
2183
+ * Whether to set a default destructured root type. For example, you may wish
2184
+ * to avoid manually having to set the type for a `@param`
2185
+ * corresponding to a destructured root object as it is always going to be an
2186
+ * object. Uses `defaultDestructuredRootType` for the type string. Defaults to
2187
+ * `false`.
2188
+ */
2189
+ setDefaultDestructuredRootType?: boolean;
2190
+ }
2191
+ ];
2192
+
2193
+ /** Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`. */
2194
+ "jsdoc/require-property": [];
2195
+
2196
+ /** Requires that each `@property` tag has a `description` value. */
2197
+ "jsdoc/require-property-description": [];
2198
+
2199
+ /** Requires that all `@property` tags have names. */
2200
+ "jsdoc/require-property-name": [];
2201
+
2202
+ /** Requires that each `@property` tag has a type value (in curly brackets). */
2203
+ "jsdoc/require-property-type": [];
2204
+
2205
+ /** Requires that Promise rejections are documented with `@rejects` tags. */
2206
+ "jsdoc/require-rejects":
2207
+ | []
2208
+ | [
2209
+ {
2210
+ /**
2211
+ * Set this to an array of strings representing the AST context
2212
+ * (or objects with optional `context` and `comment` properties) where you wish
2213
+ * the rule to be applied.
2214
+ *
2215
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2216
+ *
2217
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2218
+ * `FunctionExpression`).
2219
+ */
2220
+ contexts?: (
2221
+ | string
2222
+ | {
2223
+ comment?: string;
2224
+ context?: string;
2225
+ }
2226
+ )[];
2227
+ /**
2228
+ * Array of tags (e.g., `['type']`) whose presence on the
2229
+ * document block avoids the need for a `@rejects`. Defaults to an array
2230
+ * with `abstract`, `virtual`, and `type`. If you set this array, it will overwrite the default,
2231
+ * so be sure to add back those tags if you wish their presence to cause
2232
+ * exemption of the rule.
2233
+ */
2234
+ exemptedBy?: string[];
2235
+ }
2236
+ ];
2237
+
2238
+ /** Requires that returns are documented with `@returns`. */
2239
+ "jsdoc/require-returns":
2240
+ | []
2241
+ | [
2242
+ {
2243
+ /**
2244
+ * A value indicating whether `constructor`s should
2245
+ * be checked for `@returns` tags. Defaults to `false`.
2246
+ */
2247
+ checkConstructors?: boolean;
2248
+ /**
2249
+ * Boolean to determine whether getter methods should
2250
+ * be checked for `@returns` tags. Defaults to `true`.
2251
+ */
2252
+ checkGetters?: boolean;
2253
+ /**
2254
+ * Set this to an array of strings representing the AST context
2255
+ * (or objects with optional `context` and `comment` properties) where you wish
2256
+ * the rule to be applied.
2257
+ *
2258
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2259
+ *
2260
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2261
+ * `FunctionExpression`). Set to `"any"` if you want
2262
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
2263
+ * for finding function blocks not attached to a function declaration or
2264
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2265
+ * `@method`) (including those associated with an `@interface`). This
2266
+ * rule will only apply on non-default contexts when there is such a tag
2267
+ * present and the `forceRequireReturn` option is set or if the
2268
+ * `forceReturnsWithAsync` option is set with a present `@async` tag
2269
+ * (since we are not checking against the actual `return` values in these
2270
+ * cases).
2271
+ */
2272
+ contexts?: (
2273
+ | string
2274
+ | {
2275
+ comment?: string;
2276
+ context?: string;
2277
+ forceRequireReturn?: boolean;
2278
+ }
2279
+ )[];
2280
+ /**
2281
+ * Whether to enable the fixer to add a blank `@returns`.
2282
+ * Defaults to `false`.
2283
+ */
2284
+ enableFixer?: boolean;
2285
+ /**
2286
+ * Array of tags (e.g., `['type']`) whose presence on the
2287
+ * document block avoids the need for a `@returns`. Defaults to an array
2288
+ * with `inheritdoc`. If you set this array, it will overwrite the default,
2289
+ * so be sure to add back `inheritdoc` if you wish its presence to cause
2290
+ * exemption of the rule.
2291
+ */
2292
+ exemptedBy?: string[];
2293
+ /**
2294
+ * Set to `true` to always insist on
2295
+ * `@returns` documentation regardless of implicit or explicit `return`'s
2296
+ * in the function. May be desired to flag that a project is aware of an
2297
+ * `undefined`/`void` return. Defaults to `false`.
2298
+ */
2299
+ forceRequireReturn?: boolean;
2300
+ /**
2301
+ * By default `async` functions that do not explicitly
2302
+ * return a value pass this rule as an `async` function will always return a
2303
+ * `Promise`, even if the `Promise` resolves to void. You can force all
2304
+ * `async` functions (including ones with an explicit `Promise` but no
2305
+ * detected non-`undefined` `resolve` value) to require `@return`
2306
+ * documentation by setting `forceReturnsWithAsync` to `true` on the options
2307
+ * object. This may be useful for flagging that there has been consideration
2308
+ * of return type. Defaults to `false`.
2309
+ */
2310
+ forceReturnsWithAsync?: boolean;
2311
+ /**
2312
+ * This option will insist that missing `@returns` are only reported for
2313
+ * function bodies / class declarations that are exported from the module.
2314
+ * May be a boolean or object. If set to `true`, the defaults below will be
2315
+ * used. If unset, `@returns` reporting will not be limited to exports.
2316
+ *
2317
+ * This object supports the following optional boolean keys (`false` unless
2318
+ * otherwise noted):
2319
+ *
2320
+ * - `ancestorsOnly` - Optimization to only check node ancestors to check if node is exported
2321
+ * - `esm` - ESM exports are checked for `@returns` JSDoc comments (Defaults to `true`)
2322
+ * - `cjs` - CommonJS exports are checked for `@returns` JSDoc comments (Defaults to `true`)
2323
+ * - `window` - Window global exports are checked for `@returns` JSDoc comments
2324
+ */
2325
+ publicOnly?:
2326
+ | boolean
2327
+ | {
2328
+ ancestorsOnly?: boolean;
2329
+ cjs?: boolean;
2330
+ esm?: boolean;
2331
+ window?: boolean;
2332
+ };
2333
+ }
2334
+ ];
2335
+
2336
+ /** Requires a return statement in function body if a `@returns` tag is specified in JSDoc comment(and reports if multiple `@returns` tags are present). */
2337
+ "jsdoc/require-returns-check":
2338
+ | []
2339
+ | [
2340
+ {
2341
+ /**
2342
+ * By default, functions which return a `Promise` that are not
2343
+ * detected as resolving with a non-`undefined` value and `async` functions
2344
+ * (even ones that do not explicitly return a value, as these are returning a
2345
+ * `Promise` implicitly) will be exempted from reporting by this rule.
2346
+ * If you wish to insist that only `Promise`'s which resolve to
2347
+ * non-`undefined` values or `async` functions with explicit `return`'s will
2348
+ * be exempted from reporting (i.e., that `async` functions can be reported
2349
+ * if they lack an explicit (non-`undefined`) `return` when a `@returns` is
2350
+ * present), you can set `exemptAsync` to `false` on the options object.
2351
+ */
2352
+ exemptAsync?: boolean;
2353
+ /**
2354
+ * Because a generator might be labeled as having a
2355
+ * `IterableIterator` `@returns` value (along with an iterator type
2356
+ * corresponding to the type of any `yield` statements), projects might wish to
2357
+ * leverage `@returns` in generators even without a `return` statement. This
2358
+ * option is therefore `true` by default in `typescript` mode (in "jsdoc" mode,
2359
+ * one might be more likely to take advantage of `@yields`). Set it to `false`
2360
+ * if you wish for a missing `return` to be flagged regardless.
2361
+ */
2362
+ exemptGenerators?: boolean;
2363
+ /**
2364
+ * Whether to check that async functions do not
2365
+ * indicate they return non-native types. Defaults to `true`.
2366
+ */
2367
+ noNativeTypes?: boolean;
2368
+ /**
2369
+ * If `true` and no return or
2370
+ * resolve value is found, this setting will even insist that reporting occur
2371
+ * with `void` or `undefined` (including as an indicated `Promise` type).
2372
+ * Unlike `require-returns`, with this option in the rule, one can
2373
+ * *discourage* the labeling of `undefined` types. Defaults to `false`.
2374
+ */
2375
+ reportMissingReturnForUndefinedTypes?: boolean;
2376
+ }
2377
+ ];
2378
+
2379
+ /** Requires that the `@returns` tag has a `description` value (not including `void`/`undefined` type returns). */
2380
+ "jsdoc/require-returns-description":
2381
+ | []
2382
+ | [
2383
+ {
2384
+ /**
2385
+ * Set this to an array of strings representing the AST context (or an object with
2386
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
2387
+ *
2388
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2389
+ *
2390
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2391
+ * `FunctionExpression`). Set to `"any"` if you want
2392
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
2393
+ * for finding function blocks not attached to a function declaration or
2394
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2395
+ * `@method`) (including those associated with an `@interface`).
2396
+ *
2397
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2398
+ * section of our Advanced docs for more on the expected format.
2399
+ */
2400
+ contexts?: (
2401
+ | string
2402
+ | {
2403
+ comment?: string;
2404
+ context?: string;
2405
+ }
2406
+ )[];
2407
+ }
2408
+ ];
2409
+
2410
+ /** Requires that `@returns` tag has type value (in curly brackets). */
2411
+ "jsdoc/require-returns-type":
2412
+ | []
2413
+ | [
2414
+ {
2415
+ /**
2416
+ * Set this to an array of strings representing the AST context (or an object with
2417
+ * optional `context` and `comment` properties) where you wish the rule to be applied.
2418
+ *
2419
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2420
+ *
2421
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2422
+ * `FunctionExpression`). Set to `"any"` if you want
2423
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
2424
+ * for finding function blocks not attached to a function declaration or
2425
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2426
+ * `@method`) (including those associated with an `@interface`).
2427
+ *
2428
+ * See the ["AST and Selectors"](../#advanced-ast-and-selectors)
2429
+ * section of our Advanced docs for more on the expected format.
2430
+ */
2431
+ contexts?: (
2432
+ | string
2433
+ | {
2434
+ comment?: string;
2435
+ context?: string;
2436
+ }
2437
+ )[];
2438
+ }
2439
+ ];
2440
+
2441
+ /** Requires tags be present, optionally for specific contexts */
2442
+ "jsdoc/require-tags":
2443
+ | []
2444
+ | [
2445
+ {
2446
+ /**
2447
+ * May be an array of either strings or objects with
2448
+ * a string `tag` property and `context` string property.
2449
+ */
2450
+ tags?: (
2451
+ | string
2452
+ | {
2453
+ context?: string;
2454
+ tag?: string;
2455
+ [k: string]: unknown;
2456
+ }
2457
+ )[];
2458
+ }
2459
+ ];
2460
+
2461
+ /** Requires `@template` tags be present when type parameters are used. */
2462
+ "jsdoc/require-template":
2463
+ | []
2464
+ | [
2465
+ {
2466
+ /**
2467
+ * Array of tags (e.g., `['type']`) whose presence on the document
2468
+ * block avoids the need for a `@template`. Defaults to an array with
2469
+ * `inheritdoc`. If you set this array, it will overwrite the default,
2470
+ * so be sure to add back `inheritdoc` if you wish its presence to cause
2471
+ * exemption of the rule.
2472
+ */
2473
+ exemptedBy?: string[];
2474
+ /**
2475
+ * Requires that each template have its own separate line, i.e., preventing
2476
+ * templates of this format:
2477
+ *
2478
+ * ```js
2479
+ * /**
2480
+ * * @template T, U, V
2481
+ * * /
2482
+ * ```
2483
+ *
2484
+ * Defaults to `false`.
2485
+ */
2486
+ requireSeparateTemplates?: boolean;
2487
+ }
2488
+ ];
2489
+
2490
+ /** Requires a description for `@template` tags */
2491
+ "jsdoc/require-template-description": [];
2492
+
2493
+ /** Requires that throw statements are documented with `@throws` tags. */
2494
+ "jsdoc/require-throws":
2495
+ | []
2496
+ | [
2497
+ {
2498
+ /**
2499
+ * Set this to an array of strings representing the AST context
2500
+ * (or objects with optional `context` and `comment` properties) where you wish
2501
+ * the rule to be applied.
2502
+ *
2503
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2504
+ *
2505
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2506
+ * `FunctionExpression`). Set to `"any"` if you want
2507
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
2508
+ * for finding function blocks not attached to a function declaration or
2509
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2510
+ * `@method`) (including those associated with an `@interface`).
2511
+ */
2512
+ contexts?: (
2513
+ | string
2514
+ | {
2515
+ comment?: string;
2516
+ context?: string;
2517
+ }
2518
+ )[];
2519
+ /**
2520
+ * Array of tags (e.g., `['type']`) whose presence on the
2521
+ * document block avoids the need for a `@throws`. Defaults to an array
2522
+ * with `inheritdoc`. If you set this array, it will overwrite the default,
2523
+ * so be sure to add back `inheritdoc` if you wish its presence to cause
2524
+ * exemption of the rule.
2525
+ */
2526
+ exemptedBy?: string[];
2527
+ }
2528
+ ];
2529
+
2530
+ /** Requires a description for `@throws` tags */
2531
+ "jsdoc/require-throws-description": [];
2532
+
2533
+ /** Requires a type for `@throws` tags */
2534
+ "jsdoc/require-throws-type": [];
2535
+
2536
+ /** Requires yields are documented with `@yields` tags. */
2537
+ "jsdoc/require-yields":
2538
+ | []
2539
+ | [
2540
+ {
2541
+ /**
2542
+ * Set this to an array of strings representing the AST context
2543
+ * (or objects with optional `context` and `comment` properties) where you wish
2544
+ * the rule to be applied.
2545
+ *
2546
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2547
+ *
2548
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2549
+ * `FunctionExpression`). Set to `"any"` if you want
2550
+ * the rule to apply to any JSDoc block throughout your files (as is necessary
2551
+ * for finding function blocks not attached to a function declaration or
2552
+ * expression, i.e., `@callback` or `@function` (or its aliases `@func` or
2553
+ * `@method`) (including those associated with an `@interface`). This
2554
+ * rule will only apply on non-default contexts when there is such a tag
2555
+ * present and the `forceRequireYields` option is set or if the
2556
+ * `withGeneratorTag` option is set with a present `@generator` tag
2557
+ * (since we are not checking against the actual `yield` values in these
2558
+ * cases).
2559
+ */
2560
+ contexts?: (
2561
+ | string
2562
+ | {
2563
+ comment?: string;
2564
+ context?: string;
2565
+ }
2566
+ )[];
2567
+ /**
2568
+ * Array of tags (e.g., `['type']`) whose presence on the
2569
+ * document block avoids the need for a `@yields`. Defaults to an array
2570
+ * with `inheritdoc`. If you set this array, it will overwrite the default,
2571
+ * so be sure to add back `inheritdoc` if you wish its presence to cause
2572
+ * exemption of the rule.
2573
+ */
2574
+ exemptedBy?: string[];
2575
+ /**
2576
+ * Set to `true` to always insist on
2577
+ * `@next` documentation even if there are no `yield` statements in the
2578
+ * function or none return values. May be desired to flag that a project is
2579
+ * aware of the expected yield return being `undefined`. Defaults to `false`.
2580
+ */
2581
+ forceRequireNext?: boolean;
2582
+ /**
2583
+ * Set to `true` to always insist on
2584
+ * `@yields` documentation for generators even if there are only
2585
+ * expressionless `yield` statements in the function. May be desired to flag
2586
+ * that a project is aware of an `undefined`/`void` yield. Defaults to
2587
+ * `false`.
2588
+ */
2589
+ forceRequireYields?: boolean;
2590
+ /**
2591
+ * If `true`, this option will insist that any use of a `yield` return
2592
+ * value (e.g., `const rv = yield;` or `const rv = yield value;`) has a
2593
+ * (non-standard) `@next` tag (in addition to any `@yields` tag) so as to be
2594
+ * able to document the type expected to be supplied into the iterator
2595
+ * (the `Generator` iterator that is returned by the call to the generator
2596
+ * function) to the iterator (e.g., `it.next(value)`). The tag will not be
2597
+ * expected if the generator function body merely has plain `yield;` or
2598
+ * `yield value;` statements without returning the values. Defaults to
2599
+ * `false`.
2600
+ */
2601
+ next?: boolean;
2602
+ /**
2603
+ * If a `@generator` tag is present on a block, require
2604
+ * (non-standard ) `@next` (see `next` option). This will require using `void`
2605
+ * or `undefined` in cases where generators do not use the `next()`-supplied
2606
+ * incoming `yield`-returned value. Defaults to `false`. See `contexts` to
2607
+ * `any` if you want to catch `@generator` with `@callback` or such not
2608
+ * attached to a function.
2609
+ */
2610
+ nextWithGeneratorTag?: boolean;
2611
+ /**
2612
+ * If a `@generator` tag is present on a block, require
2613
+ * `@yields`/`@yield`. Defaults to `true`. See `contexts` to `any` if you want
2614
+ * to catch `@generator` with `@callback` or such not attached to a function.
2615
+ */
2616
+ withGeneratorTag?: boolean;
2617
+ }
2618
+ ];
2619
+
2620
+ /** Ensures that if a `@yields` is present that a `yield` (or `yield` with a value) is present in the function body (or that if a `@next` is present that there is a yield with a return value present). */
2621
+ "jsdoc/require-yields-check":
2622
+ | []
2623
+ | [
2624
+ {
2625
+ /**
2626
+ * Avoids checking the function body and merely insists
2627
+ * that all generators have `@yields`. This can be an optimization with the
2628
+ * ESLint `require-yield` rule, as that rule already ensures a `yield` is
2629
+ * present in generators, albeit assuming the generator is not empty).
2630
+ * Defaults to `false`.
2631
+ */
2632
+ checkGeneratorsOnly?: boolean;
2633
+ /**
2634
+ * Set this to an array of strings representing the AST context
2635
+ * (or objects with optional `context` and `comment` properties) where you wish
2636
+ * the rule to be applied.
2637
+ *
2638
+ * `context` defaults to `any` and `comment` defaults to no specific comment context.
2639
+ *
2640
+ * Overrides the default contexts (`ArrowFunctionExpression`, `FunctionDeclaration`,
2641
+ * `FunctionExpression`).
2642
+ */
2643
+ contexts?: (
2644
+ | string
2645
+ | {
2646
+ comment?: string;
2647
+ context?: string;
2648
+ }
2649
+ )[];
2650
+ /**
2651
+ * If `true`, this option will insist that any use of a (non-standard)
2652
+ * `@next` tag (in addition to any `@yields` tag) will be matched by a `yield`
2653
+ * which uses a return value in the body of the generator (e.g.,
2654
+ * `const rv = yield;` or `const rv = yield value;`). This (non-standard)
2655
+ * tag is intended to be used to indicate a type and/or description of
2656
+ * the value expected to be supplied by the user when supplied to the iterator
2657
+ * by its `next` method, as with `it.next(value)` (with the iterator being
2658
+ * the `Generator` iterator that is returned by the call to the generator
2659
+ * function). This option will report an error if the generator function body
2660
+ * merely has plain `yield;` or `yield value;` statements without returning
2661
+ * the values. Defaults to `false`.
2662
+ */
2663
+ next?: boolean;
2664
+ }
2665
+ ];
2666
+
2667
+ /** Requires a description for `@yields` tags */
2668
+ "jsdoc/require-yields-description": [];
2669
+
2670
+ /** Requires a type for `@yields` tags */
2671
+ "jsdoc/require-yields-type": [];
2672
+
2673
+ /** Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups. */
2674
+ "jsdoc/sort-tags":
2675
+ | []
2676
+ | [
2677
+ {
2678
+ /**
2679
+ * Defaults to `false`. Alphabetizes any items not within `tagSequence` after any
2680
+ * items within `tagSequence` (or in place of the special `-other` pseudo-tag)
2681
+ * are sorted.
2682
+ *
2683
+ * If you want all your tags alphabetized, you can supply an empty array for
2684
+ * `tagSequence` along with setting this option to `true`.
2685
+ */
2686
+ alphabetizeExtras?: boolean;
2687
+ /**
2688
+ * Indicates the number of lines to be added between tag groups. Defaults to 1.
2689
+ * Do not set to 0 or 2+ if you are using `tag-lines` and `"always"` and do not
2690
+ * set to 1+ if you are using `tag-lines` and `"never"`.
2691
+ */
2692
+ linesBetween?: number;
2693
+ /**
2694
+ * Whether to enable reporting and fixing of line breaks within tags of a given
2695
+ * tag group. Defaults to `true` which will remove any line breaks at the end of
2696
+ * such tags. Do not use with `true` if you are using `tag-lines` and `always`.
2697
+ */
2698
+ reportIntraTagGroupSpacing?: boolean;
2699
+ /**
2700
+ * Whether to enable reporting and fixing of line breaks between tag groups
2701
+ * as set by `linesBetween`. Defaults to `true`. Note that the very last tag
2702
+ * will not have spacing applied regardless. For adding line breaks there, you
2703
+ * may wish to use the `endLines` option of the `tag-lines` rule.
2704
+ */
2705
+ reportTagGroupSpacing?: boolean;
2706
+ /**
2707
+ * Allows specification by tag of a specific higher maximum number of lines. Keys are tags and values are the maximum number of lines allowed for such tags. Overrides `linesBetween`. Defaults to no special exceptions per tag.
2708
+ */
2709
+ tagExceptions?: {
2710
+ /**
2711
+ * This interface was referenced by `undefined`'s JSON-Schema definition
2712
+ * via the `patternProperty` ".*".
2713
+ */
2714
+ [k: string]: number;
2715
+ };
2716
+ /**
2717
+ * An array of tag group objects indicating the preferred sequence for sorting tags.
2718
+ *
2719
+ * Each item in the array should be an object with a `tags` property set to an array
2720
+ * of tag names.
2721
+ *
2722
+ * Tag names earlier in the list will be arranged first. The relative position of
2723
+ * tags of the same name will not be changed.
2724
+ *
2725
+ * Earlier groups will also be arranged before later groups, but with the added
2726
+ * feature that additional line breaks may be added between (or before or after)
2727
+ * such groups (depending on the setting of `linesBetween`).
2728
+ *
2729
+ * Tag names not in the list will be grouped together at the end. The pseudo-tag
2730
+ * `-other` can be used to place them anywhere else if desired. The tags will be
2731
+ * placed in their order of appearance, or alphabetized if `alphabetizeExtras`
2732
+ * is enabled, see more below about that option.
2733
+ *
2734
+ * Defaults to the array below (noting that it is just a single tag group with
2735
+ * no lines between groups by default).
2736
+ *
2737
+ * Please note that this order is still experimental, so if you want to retain
2738
+ * a fixed order that doesn't change into the future, supply your own
2739
+ * `tagSequence`.
2740
+ *
2741
+ * ```js
2742
+ * [{tags: [
2743
+ * // Brief descriptions
2744
+ * 'summary',
2745
+ * 'typeSummary',
2746
+ *
2747
+ * // Module/file-level
2748
+ * 'module',
2749
+ * 'exports',
2750
+ * 'file',
2751
+ * 'fileoverview',
2752
+ * 'overview',
2753
+ * 'import',
2754
+ *
2755
+ * // Identifying (name, type)
2756
+ * 'typedef',
2757
+ * 'interface',
2758
+ * 'record',
2759
+ * 'template',
2760
+ * 'name',
2761
+ * 'kind',
2762
+ * 'type',
2763
+ * 'alias',
2764
+ * 'external',
2765
+ * 'host',
2766
+ * 'callback',
2767
+ * 'func',
2768
+ * 'function',
2769
+ * 'method',
2770
+ * 'class',
2771
+ * 'constructor',
2772
+ *
2773
+ * // Relationships
2774
+ * 'modifies',
2775
+ * 'mixes',
2776
+ * 'mixin',
2777
+ * 'mixinClass',
2778
+ * 'mixinFunction',
2779
+ * 'namespace',
2780
+ * 'borrows',
2781
+ * 'constructs',
2782
+ * 'lends',
2783
+ * 'implements',
2784
+ * 'requires',
2785
+ *
2786
+ * // Long descriptions
2787
+ * 'desc',
2788
+ * 'description',
2789
+ * 'classdesc',
2790
+ * 'tutorial',
2791
+ * 'copyright',
2792
+ * 'license',
2793
+ *
2794
+ * // Simple annotations
2795
+ * 'const',
2796
+ * 'constant',
2797
+ * 'final',
2798
+ * 'global',
2799
+ * 'readonly',
2800
+ * 'abstract',
2801
+ * 'virtual',
2802
+ * 'var',
2803
+ * 'member',
2804
+ * 'memberof',
2805
+ * 'memberof!',
2806
+ * 'inner',
2807
+ * 'instance',
2808
+ * 'inheritdoc',
2809
+ * 'inheritDoc',
2810
+ * 'override',
2811
+ * 'hideconstructor',
2812
+ *
2813
+ * // Core function/object info
2814
+ * 'param',
2815
+ * 'arg',
2816
+ * 'argument',
2817
+ * 'prop',
2818
+ * 'property',
2819
+ * 'return',
2820
+ * 'returns',
2821
+ *
2822
+ * // Important behavior details
2823
+ * 'async',
2824
+ * 'generator',
2825
+ * 'default',
2826
+ * 'defaultvalue',
2827
+ * 'enum',
2828
+ * 'augments',
2829
+ * 'extends',
2830
+ * 'throws',
2831
+ * 'exception',
2832
+ * 'yield',
2833
+ * 'yields',
2834
+ * 'event',
2835
+ * 'fires',
2836
+ * 'emits',
2837
+ * 'listens',
2838
+ * 'this',
2839
+ *
2840
+ * // Access
2841
+ * 'static',
2842
+ * 'private',
2843
+ * 'protected',
2844
+ * 'public',
2845
+ * 'access',
2846
+ * 'package',
2847
+ *
2848
+ * '-other',
2849
+ *
2850
+ * // Supplementary descriptions
2851
+ * 'see',
2852
+ * 'example',
2853
+ *
2854
+ * // METADATA
2855
+ *
2856
+ * // Other Closure (undocumented) metadata
2857
+ * 'closurePrimitive',
2858
+ * 'customElement',
2859
+ * 'expose',
2860
+ * 'hidden',
2861
+ * 'idGenerator',
2862
+ * 'meaning',
2863
+ * 'ngInject',
2864
+ * 'owner',
2865
+ * 'wizaction',
2866
+ *
2867
+ * // Other Closure (documented) metadata
2868
+ * 'define',
2869
+ * 'dict',
2870
+ * 'export',
2871
+ * 'externs',
2872
+ * 'implicitCast',
2873
+ * 'noalias',
2874
+ * 'nocollapse',
2875
+ * 'nocompile',
2876
+ * 'noinline',
2877
+ * 'nosideeffects',
2878
+ * 'polymer',
2879
+ * 'polymerBehavior',
2880
+ * 'preserve',
2881
+ * 'struct',
2882
+ * 'suppress',
2883
+ * 'unrestricted',
2884
+ *
2885
+ * // @homer0/prettier-plugin-jsdoc metadata
2886
+ * 'category',
2887
+ *
2888
+ * // Non-Closure metadata
2889
+ * 'ignore',
2890
+ * 'author',
2891
+ * 'version',
2892
+ * 'variation',
2893
+ * 'since',
2894
+ * 'deprecated',
2895
+ * 'todo',
2896
+ * ]}];
2897
+ * ```
2898
+ */
2899
+ tagSequence?: {
2900
+ /**
2901
+ * See description on `tagSequence`.
2902
+ */
2903
+ tags?: string[];
2904
+ }[];
2905
+ }
2906
+ ];
2907
+
2908
+ /** Enforces lines (or no lines) before, after, or between tags. */
2909
+ "jsdoc/tag-lines":
2910
+ | []
2911
+ | ["always" | "any" | "never"]
2912
+ | [
2913
+ "always" | "any" | "never",
2914
+ {
2915
+ /**
2916
+ * Set to `false` and use with "always" to indicate the normal lines to be
2917
+ * added after tags should not be added after the final tag.
2918
+ *
2919
+ * Defaults to `true`.
2920
+ */
2921
+ applyToEndTag?: boolean;
2922
+ /**
2923
+ * Use with "always" to indicate the number of lines to require be present.
2924
+ *
2925
+ * Defaults to 1.
2926
+ */
2927
+ count?: number;
2928
+ /**
2929
+ * If not set to `null`, will enforce end lines to the given count on the
2930
+ * final tag only.
2931
+ *
2932
+ * Defaults to `0`.
2933
+ */
2934
+ endLines?: number | null;
2935
+ /**
2936
+ * If not set to `null`, will enforce a maximum number of lines to the given count anywhere in the block description.
2937
+ *
2938
+ * Note that if non-`null`, `maxBlockLines` must be greater than or equal to `startLines`.
2939
+ *
2940
+ * Defaults to `null`.
2941
+ */
2942
+ maxBlockLines?: number | null;
2943
+ /**
2944
+ * If not set to `null`, will enforce end lines to the given count before the
2945
+ * first tag only, unless there is only whitespace content, in which case,
2946
+ * a line count will not be enforced.
2947
+ *
2948
+ * Defaults to `0`.
2949
+ */
2950
+ startLines?: number | null;
2951
+ /**
2952
+ * If set to a number, will enforce a starting lines count when there are no tags. Defaults to `undefined`.
2953
+ */
2954
+ startLinesWithNoTags?: number;
2955
+ /**
2956
+ * Overrides the default behavior depending on specific tags.
2957
+ *
2958
+ * An object whose keys are tag names and whose values are objects with the
2959
+ * following keys:
2960
+ *
2961
+ * 1. `lines` - Set to `always`, `never`, or `any` to override.
2962
+ * 2. `count` - Overrides main `count` (for "always")
2963
+ *
2964
+ * Defaults to empty object.
2965
+ */
2966
+ tags?: {
2967
+ /**
2968
+ * This interface was referenced by `undefined`'s JSON-Schema definition
2969
+ * via the `patternProperty` ".*".
2970
+ */
2971
+ [k: string]: {
2972
+ count?: number;
2973
+ lines?: "always" | "never" | "any";
2974
+ };
2975
+ };
2976
+ }
2977
+ ];
2978
+
2979
+ /** Auto-escape certain characters that are input within block and tag descriptions. */
2980
+ "jsdoc/text-escaping":
2981
+ | []
2982
+ | [
2983
+ {
2984
+ /**
2985
+ * This option escapes all `<` and `&` characters (except those followed by
2986
+ * whitespace which are treated as literals by Visual Studio Code). Defaults to
2987
+ * `false`.
2988
+ */
2989
+ escapeHTML?: boolean;
2990
+ /**
2991
+ * This option escapes the first backtick (`` ` ``) in a paired sequence.
2992
+ * Defaults to `false`.
2993
+ */
2994
+ escapeMarkdown?: boolean;
2995
+ }
2996
+ ];
2997
+
2998
+ /** Prefers either function properties or method signatures */
2999
+ "jsdoc/ts-method-signature-style":
3000
+ | []
3001
+ | ["method" | "property"]
3002
+ | [
3003
+ "method" | "property",
3004
+ {
3005
+ /**
3006
+ * Whether to enable the fixer. Defaults to `true`.
3007
+ */
3008
+ enableFixer?: boolean;
3009
+ }
3010
+ ];
3011
+
3012
+ /** Warns against use of the empty object type */
3013
+ "jsdoc/ts-no-empty-object-type": [];
3014
+
3015
+ /** Catches unnecessary template expressions such as string expressions within a template literal. */
3016
+ "jsdoc/ts-no-unnecessary-template-expression":
3017
+ | []
3018
+ | [
3019
+ {
3020
+ /**
3021
+ * Whether to enable the fixer. Defaults to `true`.
3022
+ */
3023
+ enableFixer?: boolean;
3024
+ }
3025
+ ];
3026
+
3027
+ /** Prefers function types over call signatures when there are no other properties. */
3028
+ "jsdoc/ts-prefer-function-type":
3029
+ | []
3030
+ | [
3031
+ {
3032
+ /**
3033
+ * Whether to enable the fixer or not
3034
+ */
3035
+ enableFixer?: boolean;
3036
+ }
3037
+ ];
3038
+
3039
+ /** Formats JSDoc type values. */
3040
+ "jsdoc/type-formatting":
3041
+ | []
3042
+ | [
3043
+ {
3044
+ /**
3045
+ * Determines how array generics are represented. Set to `angle` for the style `Array<type>` or `square` for the style `type[]`. Defaults to "square".
3046
+ */
3047
+ arrayBrackets?: "angle" | "square";
3048
+ /**
3049
+ * The space character (if any) to use after return markers (`=>`). Defaults to " ".
3050
+ */
3051
+ arrowFunctionPostReturnMarkerSpacing?: string;
3052
+ /**
3053
+ * The space character (if any) to use before return markers (`=>`). Defaults to " ".
3054
+ */
3055
+ arrowFunctionPreReturnMarkerSpacing?: string;
3056
+ /**
3057
+ * Whether to enable the fixer. Defaults to `true`.
3058
+ */
3059
+ enableFixer?: boolean;
3060
+ /**
3061
+ * The space character (if any) to use between function or class parameters. Defaults to " ".
3062
+ */
3063
+ functionOrClassParameterSpacing?: string;
3064
+ /**
3065
+ * The space character (if any) to use after a generic expression in a function or class. Defaults to "".
3066
+ */
3067
+ functionOrClassPostGenericSpacing?: string;
3068
+ /**
3069
+ * The space character (if any) to use after return markers (`:`). Defaults to "".
3070
+ */
3071
+ functionOrClassPostReturnMarkerSpacing?: string;
3072
+ /**
3073
+ * The space character (if any) to use before return markers (`:`). Defaults to "".
3074
+ */
3075
+ functionOrClassPreReturnMarkerSpacing?: string;
3076
+ /**
3077
+ * The space character (if any) to use between type parameters in a function or class. Defaults to " ".
3078
+ */
3079
+ functionOrClassTypeParameterSpacing?: string;
3080
+ /**
3081
+ * The space character (if any) to use between elements in generics and tuples. Defaults to " ".
3082
+ */
3083
+ genericAndTupleElementSpacing?: string;
3084
+ /**
3085
+ * Boolean value of whether to use a dot before the angled brackets of a generic (e.g., `SomeType.<AnotherType>`). Defaults to `false`.
3086
+ */
3087
+ genericDot?: boolean;
3088
+ /**
3089
+ * The amount of spacing (if any) after the colon of a key-value or object-field pair. Defaults to " ".
3090
+ */
3091
+ keyValuePostColonSpacing?: string;
3092
+ /**
3093
+ * The amount of spacing (if any) immediately after keys in a key-value or object-field pair. Defaults to "".
3094
+ */
3095
+ keyValuePostKeySpacing?: string;
3096
+ /**
3097
+ * The amount of spacing (if any) after the optional operator (`?`) in a key-value or object-field pair. Defaults to "".
3098
+ */
3099
+ keyValuePostOptionalSpacing?: string;
3100
+ /**
3101
+ * The amount of spacing (if any) after a variadic operator (`...`) in a key-value pair. Defaults to "".
3102
+ */
3103
+ keyValuePostVariadicSpacing?: string;
3104
+ /**
3105
+ * The style of quotation mark for surrounding method names when quoted. Defaults to `double`
3106
+ */
3107
+ methodQuotes?: "double" | "single";
3108
+ /**
3109
+ * A string indicating the whitespace to be added on each line preceding an
3110
+ * object property-value field. Defaults to the empty string.
3111
+ */
3112
+ objectFieldIndent?: string;
3113
+ /**
3114
+ * Whether and how object field properties should be quoted (e.g., `{"a": string}`).
3115
+ * Set to `single`, `double`, or `null`. Defaults to `null` (no quotes unless
3116
+ * required due to special characters within the field). Digits will be kept as is,
3117
+ * regardless of setting (they can either represent a digit or a string digit).
3118
+ */
3119
+ objectFieldQuote?: "double" | "single" | null;
3120
+ /**
3121
+ * For object properties, specify whether a "semicolon", "comma", "linebreak",
3122
+ * "semicolon-and-linebreak", or "comma-and-linebreak" should be used after
3123
+ * each object property-value pair.
3124
+ *
3125
+ * Defaults to `"comma"`.
3126
+ */
3127
+ objectFieldSeparator?: "comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak";
3128
+ /**
3129
+ * Whether `objectFieldSeparator` set to `"semicolon-and-linebreak"` or
3130
+ * `"comma-and-linebreak"` should be allowed to optionally drop the linebreak.
3131
+ *
3132
+ * Defaults to `true`.
3133
+ */
3134
+ objectFieldSeparatorOptionalLinebreak?: boolean;
3135
+ /**
3136
+ * If `separatorForSingleObjectField` is not in effect (i.e., if it is `false`
3137
+ * or there are multiple property-value object fields present), this property
3138
+ * will determine whether to add punctuation corresponding to the
3139
+ * `objectFieldSeparator` (e.g., a semicolon) to the final object field.
3140
+ * Defaults to `false`.
3141
+ */
3142
+ objectFieldSeparatorTrailingPunctuation?: boolean;
3143
+ /**
3144
+ * The space character (if any) to add after an object's initial curly bracket and before its ending curly bracket
3145
+ */
3146
+ objectTypeBracketSpacing?: string;
3147
+ /**
3148
+ * The space character (if any) to use between the equal signs of a default value. Defaults to " ".
3149
+ */
3150
+ parameterDefaultValueSpacing?: string;
3151
+ /**
3152
+ * The space character (if any) to add after a method name. Defaults to "".
3153
+ */
3154
+ postMethodNameSpacing?: string;
3155
+ /**
3156
+ * The space character (if any) to add after "new" in a constructor. Defaults to " ".
3157
+ */
3158
+ postNewSpacing?: string;
3159
+ /**
3160
+ * Whether to apply the `objectFieldSeparator` (e.g., a semicolon) when there
3161
+ * is only one property-value object field present. Defaults to `false`.
3162
+ */
3163
+ separatorForSingleObjectField?: boolean;
3164
+ /**
3165
+ * How string literals should be quoted (e.g., `"abc"`). Set to `single`
3166
+ * or `double`. Defaults to 'double'.
3167
+ */
3168
+ stringQuotes?: "double" | "single";
3169
+ /**
3170
+ * If `objectFieldSeparatorTrailingPunctuation` is set, this will determine whether the trailing puncutation is only added when the type is multiline
3171
+ */
3172
+ trailingPunctuationMultilineOnly?: boolean;
3173
+ /**
3174
+ * A string of spaces that will be added immediately after the type's initial
3175
+ * curly bracket and immediately before its ending curly bracket. Defaults
3176
+ * to the empty string.
3177
+ */
3178
+ typeBracketSpacing?: string;
3179
+ /**
3180
+ * Determines the spacing to add to unions (`|`). Defaults to a single space (`" "`).
3181
+ */
3182
+ unionSpacing?: string;
3183
+ }
3184
+ ];
3185
+
3186
+ /** Requires all types/namepaths to be valid JSDoc, Closure compiler, or TypeScript types (configurable in settings). */
3187
+ "jsdoc/valid-types":
3188
+ | []
3189
+ | [
3190
+ {
3191
+ /**
3192
+ * Set to `false` to bulk disallow
3193
+ * empty name paths with namepath groups 2 and 4 (these might often be
3194
+ * expected to have an accompanying name path, though they have some
3195
+ * indicative value without one; these may also allow names to be defined
3196
+ * in another manner elsewhere in the block); you can use
3197
+ * `settings.jsdoc.structuredTags` with the `required` key set to "name" if you
3198
+ * wish to require name paths on a tag-by-tag basis. Defaults to `true`.
3199
+ */
3200
+ allowEmptyNamepaths?: boolean;
3201
+ }
3202
+ ];
3203
+ }