eslint-plugin-jsdoc 53.0.0 → 54.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/dist/WarnSettings.cjs +35 -18
  2. package/dist/WarnSettings.cjs.map +1 -1
  3. package/dist/alignTransform.cjs +305 -224
  4. package/dist/alignTransform.cjs.map +1 -1
  5. package/dist/defaultTagOrder.cjs +43 -132
  6. package/dist/defaultTagOrder.cjs.map +1 -1
  7. package/dist/exportParser.cjs +696 -478
  8. package/dist/exportParser.cjs.map +1 -1
  9. package/dist/generateRule.cjs +242 -0
  10. package/dist/generateRule.cjs.map +1 -0
  11. package/dist/getDefaultTagStructureForMode.cjs +288 -184
  12. package/dist/getDefaultTagStructureForMode.cjs.map +1 -1
  13. package/dist/getJsdocProcessorPlugin.cjs +550 -364
  14. package/dist/getJsdocProcessorPlugin.cjs.map +1 -1
  15. package/dist/getJsdocProcessorPlugin.d.ts +65 -68
  16. package/dist/getJsdocProcessorPlugin.d.ts.map +1 -1
  17. package/dist/index.cjs +410 -2
  18. package/dist/index.cjs.map +1 -0
  19. package/dist/index.d.ts +17 -2
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/iterateJsdoc.cjs +2005 -1528
  22. package/dist/iterateJsdoc.cjs.map +1 -1
  23. package/dist/iterateJsdoc.d.ts +350 -358
  24. package/dist/iterateJsdoc.d.ts.map +1 -1
  25. package/dist/jsdocUtils.cjs +1376 -1009
  26. package/dist/jsdocUtils.cjs.map +1 -1
  27. package/dist/rules/checkAccess.cjs +36 -29
  28. package/dist/rules/checkAccess.cjs.map +1 -1
  29. package/dist/rules/checkAlignment.cjs +54 -41
  30. package/dist/rules/checkAlignment.cjs.map +1 -1
  31. package/dist/rules/checkExamples.cjs +484 -327
  32. package/dist/rules/checkExamples.cjs.map +1 -1
  33. package/dist/rules/checkIndentation.cjs +65 -50
  34. package/dist/rules/checkIndentation.cjs.map +1 -1
  35. package/dist/rules/checkLineAlignment.cjs +311 -220
  36. package/dist/rules/checkLineAlignment.cjs.map +1 -1
  37. package/dist/rules/checkParamNames.cjs +335 -227
  38. package/dist/rules/checkParamNames.cjs.map +1 -1
  39. package/dist/rules/checkPropertyNames.cjs +106 -78
  40. package/dist/rules/checkPropertyNames.cjs.map +1 -1
  41. package/dist/rules/checkSyntax.cjs +34 -21
  42. package/dist/rules/checkSyntax.cjs.map +1 -1
  43. package/dist/rules/checkTagNames.cjs +210 -188
  44. package/dist/rules/checkTagNames.cjs.map +1 -1
  45. package/dist/rules/checkTemplateNames.cjs +178 -121
  46. package/dist/rules/checkTemplateNames.cjs.map +1 -1
  47. package/dist/rules/checkTypes.cjs +385 -291
  48. package/dist/rules/checkTypes.cjs.map +1 -1
  49. package/dist/rules/checkValues.cjs +146 -100
  50. package/dist/rules/checkValues.cjs.map +1 -1
  51. package/dist/rules/convertToJsdocComments.cjs +306 -228
  52. package/dist/rules/convertToJsdocComments.cjs.map +1 -1
  53. package/dist/rules/emptyTags.cjs +72 -62
  54. package/dist/rules/emptyTags.cjs.map +1 -1
  55. package/dist/rules/implementsOnClasses.cjs +56 -36
  56. package/dist/rules/implementsOnClasses.cjs.map +1 -1
  57. package/dist/rules/importsAsDependencies.cjs +99 -62
  58. package/dist/rules/importsAsDependencies.cjs.map +1 -1
  59. package/dist/rules/informativeDocs.cjs +142 -105
  60. package/dist/rules/informativeDocs.cjs.map +1 -1
  61. package/dist/rules/linesBeforeBlock.cjs +105 -70
  62. package/dist/rules/linesBeforeBlock.cjs.map +1 -1
  63. package/dist/rules/matchDescription.cjs +222 -160
  64. package/dist/rules/matchDescription.cjs.map +1 -1
  65. package/dist/rules/matchName.cjs +128 -73
  66. package/dist/rules/matchName.cjs.map +1 -1
  67. package/dist/rules/multilineBlocks.cjs +352 -235
  68. package/dist/rules/multilineBlocks.cjs.map +1 -1
  69. package/dist/rules/noBadBlocks.cjs +86 -63
  70. package/dist/rules/noBadBlocks.cjs.map +1 -1
  71. package/dist/rules/noBlankBlockDescriptions.cjs +57 -35
  72. package/dist/rules/noBlankBlockDescriptions.cjs.map +1 -1
  73. package/dist/rules/noBlankBlocks.cjs +48 -26
  74. package/dist/rules/noBlankBlocks.cjs.map +1 -1
  75. package/dist/rules/noDefaults.cjs +79 -52
  76. package/dist/rules/noDefaults.cjs.map +1 -1
  77. package/dist/rules/noMissingSyntax.cjs +165 -115
  78. package/dist/rules/noMissingSyntax.cjs.map +1 -1
  79. package/dist/rules/noMultiAsterisks.cjs +89 -48
  80. package/dist/rules/noMultiAsterisks.cjs.map +1 -1
  81. package/dist/rules/noRestrictedSyntax.cjs +79 -45
  82. package/dist/rules/noRestrictedSyntax.cjs.map +1 -1
  83. package/dist/rules/noTypes.cjs +80 -59
  84. package/dist/rules/noTypes.cjs.map +1 -1
  85. package/dist/rules/noUndefinedTypes.cjs +388 -297
  86. package/dist/rules/noUndefinedTypes.cjs.map +1 -1
  87. package/dist/rules/requireAsteriskPrefix.cjs +159 -108
  88. package/dist/rules/requireAsteriskPrefix.cjs.map +1 -1
  89. package/dist/rules/requireDescription.cjs +129 -89
  90. package/dist/rules/requireDescription.cjs.map +1 -1
  91. package/dist/rules/requireDescriptionCompleteSentence.cjs +262 -201
  92. package/dist/rules/requireDescriptionCompleteSentence.cjs.map +1 -1
  93. package/dist/rules/requireExample.cjs +104 -73
  94. package/dist/rules/requireExample.cjs.map +1 -1
  95. package/dist/rules/requireFileOverview.cjs +129 -75
  96. package/dist/rules/requireFileOverview.cjs.map +1 -1
  97. package/dist/rules/requireHyphenBeforeParamDescription.cjs +133 -85
  98. package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +1 -1
  99. package/dist/rules/requireJsdoc.cjs +557 -384
  100. package/dist/rules/requireJsdoc.cjs.map +1 -1
  101. package/dist/rules/requireParam.cjs +526 -336
  102. package/dist/rules/requireParam.cjs.map +1 -1
  103. package/dist/rules/requireParamDescription.cjs +80 -55
  104. package/dist/rules/requireParamDescription.cjs.map +1 -1
  105. package/dist/rules/requireParamName.cjs +50 -32
  106. package/dist/rules/requireParamName.cjs.map +1 -1
  107. package/dist/rules/requireParamType.cjs +80 -55
  108. package/dist/rules/requireParamType.cjs.map +1 -1
  109. package/dist/rules/requireProperty.cjs +42 -31
  110. package/dist/rules/requireProperty.cjs.map +1 -1
  111. package/dist/rules/requirePropertyDescription.cjs +25 -17
  112. package/dist/rules/requirePropertyDescription.cjs.map +1 -1
  113. package/dist/rules/requirePropertyName.cjs +25 -17
  114. package/dist/rules/requirePropertyName.cjs.map +1 -1
  115. package/dist/rules/requirePropertyType.cjs +25 -17
  116. package/dist/rules/requirePropertyType.cjs.map +1 -1
  117. package/dist/rules/requireReturns.cjs +203 -125
  118. package/dist/rules/requireReturns.cjs.map +1 -1
  119. package/dist/rules/requireReturnsCheck.cjs +103 -60
  120. package/dist/rules/requireReturnsCheck.cjs.map +1 -1
  121. package/dist/rules/requireReturnsDescription.cjs +54 -39
  122. package/dist/rules/requireReturnsDescription.cjs.map +1 -1
  123. package/dist/rules/requireReturnsType.cjs +50 -32
  124. package/dist/rules/requireReturnsType.cjs.map +1 -1
  125. package/dist/rules/requireTemplate.cjs +178 -119
  126. package/dist/rules/requireTemplate.cjs.map +1 -1
  127. package/dist/rules/requireThrows.cjs +95 -61
  128. package/dist/rules/requireThrows.cjs.map +1 -1
  129. package/dist/rules/requireYields.cjs +166 -106
  130. package/dist/rules/requireYields.cjs.map +1 -1
  131. package/dist/rules/requireYieldsCheck.cjs +152 -96
  132. package/dist/rules/requireYieldsCheck.cjs.map +1 -1
  133. package/dist/rules/sortTags.cjs +444 -258
  134. package/dist/rules/sortTags.cjs.map +1 -1
  135. package/dist/rules/tagLines.cjs +266 -179
  136. package/dist/rules/tagLines.cjs.map +1 -1
  137. package/dist/rules/textEscaping.cjs +127 -92
  138. package/dist/rules/textEscaping.cjs.map +1 -1
  139. package/dist/rules/validTypes.cjs +265 -252
  140. package/dist/rules/validTypes.cjs.map +1 -1
  141. package/dist/tagNames.cjs +170 -134
  142. package/dist/tagNames.cjs.map +1 -1
  143. package/dist/utils/hasReturnValue.cjs +474 -246
  144. package/dist/utils/hasReturnValue.cjs.map +1 -1
  145. package/package.json +24 -40
  146. package/src/WarnSettings.js +34 -0
  147. package/src/alignTransform.js +358 -0
  148. package/src/defaultTagOrder.js +169 -0
  149. package/src/exportParser.js +978 -0
  150. package/src/getDefaultTagStructureForMode.js +969 -0
  151. package/src/getJsdocProcessorPlugin.js +672 -0
  152. package/src/index.js +530 -0
  153. package/src/iterateJsdoc.js +2541 -0
  154. package/src/jsdocUtils.js +1896 -0
  155. package/src/rules/checkAccess.js +45 -0
  156. package/src/rules/checkAlignment.js +63 -0
  157. package/src/rules/checkExamples.js +589 -0
  158. package/src/rules/checkIndentation.js +75 -0
  159. package/src/rules/checkLineAlignment.js +372 -0
  160. package/src/rules/checkParamNames.js +474 -0
  161. package/src/rules/checkPropertyNames.js +152 -0
  162. package/src/rules/checkSyntax.js +30 -0
  163. package/src/rules/checkTagNames.js +314 -0
  164. package/src/rules/checkTemplateNames.js +204 -0
  165. package/src/rules/checkTypes.js +535 -0
  166. package/src/rules/checkValues.js +248 -0
  167. package/src/rules/convertToJsdocComments.js +398 -0
  168. package/src/rules/emptyTags.js +98 -0
  169. package/src/rules/implementsOnClasses.js +64 -0
  170. package/src/rules/importsAsDependencies.js +133 -0
  171. package/src/rules/informativeDocs.js +189 -0
  172. package/src/rules/linesBeforeBlock.js +134 -0
  173. package/src/rules/matchDescription.js +286 -0
  174. package/src/rules/matchName.js +151 -0
  175. package/src/rules/multilineBlocks.js +493 -0
  176. package/src/rules/noBadBlocks.js +119 -0
  177. package/src/rules/noBlankBlockDescriptions.js +69 -0
  178. package/src/rules/noBlankBlocks.js +53 -0
  179. package/src/rules/noDefaults.js +85 -0
  180. package/src/rules/noMissingSyntax.js +195 -0
  181. package/src/rules/noMultiAsterisks.js +134 -0
  182. package/src/rules/noRestrictedSyntax.js +91 -0
  183. package/src/rules/noTypes.js +93 -0
  184. package/src/rules/noUndefinedTypes.js +543 -0
  185. package/src/rules/requireAsteriskPrefix.js +190 -0
  186. package/src/rules/requireDescription.js +161 -0
  187. package/src/rules/requireDescriptionCompleteSentence.js +335 -0
  188. package/src/rules/requireExample.js +118 -0
  189. package/src/rules/requireFileOverview.js +154 -0
  190. package/src/rules/requireHyphenBeforeParamDescription.js +176 -0
  191. package/src/rules/requireJsdoc.js +743 -0
  192. package/src/rules/requireParam.js +602 -0
  193. package/src/rules/requireParamDescription.js +89 -0
  194. package/src/rules/requireParamName.js +55 -0
  195. package/src/rules/requireParamType.js +89 -0
  196. package/src/rules/requireProperty.js +48 -0
  197. package/src/rules/requirePropertyDescription.js +25 -0
  198. package/src/rules/requirePropertyName.js +25 -0
  199. package/src/rules/requirePropertyType.js +25 -0
  200. package/src/rules/requireReturns.js +238 -0
  201. package/src/rules/requireReturnsCheck.js +145 -0
  202. package/src/rules/requireReturnsDescription.js +59 -0
  203. package/src/rules/requireReturnsType.js +51 -0
  204. package/src/rules/requireTemplate.js +201 -0
  205. package/src/rules/requireThrows.js +111 -0
  206. package/src/rules/requireYields.js +216 -0
  207. package/src/rules/requireYieldsCheck.js +208 -0
  208. package/src/rules/sortTags.js +558 -0
  209. package/src/rules/tagLines.js +359 -0
  210. package/src/rules/textEscaping.js +154 -0
  211. package/src/rules/validTypes.js +401 -0
  212. package/src/tagNames.js +238 -0
  213. package/src/utils/hasReturnValue.js +572 -0
  214. package/dist/WarnSettings.js +0 -20
  215. package/dist/WarnSettings.js.map +0 -1
  216. package/dist/_virtual/rolldown_runtime.cjs +0 -32
  217. package/dist/_virtual/rolldown_runtime.js +0 -11
  218. package/dist/alignTransform.js +0 -241
  219. package/dist/alignTransform.js.map +0 -1
  220. package/dist/defaultTagOrder.js +0 -134
  221. package/dist/defaultTagOrder.js.map +0 -1
  222. package/dist/exportParser.js +0 -518
  223. package/dist/exportParser.js.map +0 -1
  224. package/dist/getDefaultTagStructureForMode.js +0 -188
  225. package/dist/getDefaultTagStructureForMode.js.map +0 -1
  226. package/dist/getJsdocProcessorPlugin.d.cts +0 -70
  227. package/dist/getJsdocProcessorPlugin.d.cts.map +0 -1
  228. package/dist/getJsdocProcessorPlugin.js +0 -383
  229. package/dist/getJsdocProcessorPlugin.js.map +0 -1
  230. package/dist/index.d.cts +0 -2
  231. package/dist/index.js +0 -3
  232. package/dist/iterateJsdoc.d.cts +0 -471
  233. package/dist/iterateJsdoc.d.cts.map +0 -1
  234. package/dist/iterateJsdoc.js +0 -1617
  235. package/dist/iterateJsdoc.js.map +0 -1
  236. package/dist/jsdocUtils.js +0 -1123
  237. package/dist/jsdocUtils.js.map +0 -1
  238. package/dist/plugin.cjs +0 -427
  239. package/dist/plugin.cjs.map +0 -1
  240. package/dist/plugin.js +0 -427
  241. package/dist/plugin.js.map +0 -1
  242. package/dist/rules/checkAccess.js +0 -33
  243. package/dist/rules/checkAccess.js.map +0 -1
  244. package/dist/rules/checkAlignment.js +0 -47
  245. package/dist/rules/checkAlignment.js.map +0 -1
  246. package/dist/rules/checkExamples.js +0 -348
  247. package/dist/rules/checkExamples.js.map +0 -1
  248. package/dist/rules/checkIndentation.js +0 -59
  249. package/dist/rules/checkIndentation.js.map +0 -1
  250. package/dist/rules/checkLineAlignment.js +0 -229
  251. package/dist/rules/checkLineAlignment.js.map +0 -1
  252. package/dist/rules/checkParamNames.js +0 -237
  253. package/dist/rules/checkParamNames.js.map +0 -1
  254. package/dist/rules/checkPropertyNames.js +0 -88
  255. package/dist/rules/checkPropertyNames.js.map +0 -1
  256. package/dist/rules/checkSyntax.js +0 -25
  257. package/dist/rules/checkSyntax.js.map +0 -1
  258. package/dist/rules/checkTagNames.js +0 -191
  259. package/dist/rules/checkTagNames.js.map +0 -1
  260. package/dist/rules/checkTemplateNames.js +0 -124
  261. package/dist/rules/checkTemplateNames.js.map +0 -1
  262. package/dist/rules/checkTypes.js +0 -299
  263. package/dist/rules/checkTypes.js.map +0 -1
  264. package/dist/rules/checkValues.js +0 -103
  265. package/dist/rules/checkValues.js.map +0 -1
  266. package/dist/rules/convertToJsdocComments.js +0 -231
  267. package/dist/rules/convertToJsdocComments.js.map +0 -1
  268. package/dist/rules/emptyTags.js +0 -67
  269. package/dist/rules/emptyTags.js.map +0 -1
  270. package/dist/rules/implementsOnClasses.js +0 -40
  271. package/dist/rules/implementsOnClasses.js.map +0 -1
  272. package/dist/rules/importsAsDependencies.js +0 -68
  273. package/dist/rules/importsAsDependencies.js.map +0 -1
  274. package/dist/rules/informativeDocs.js +0 -110
  275. package/dist/rules/informativeDocs.js.map +0 -1
  276. package/dist/rules/linesBeforeBlock.js +0 -75
  277. package/dist/rules/linesBeforeBlock.js.map +0 -1
  278. package/dist/rules/matchDescription.js +0 -167
  279. package/dist/rules/matchDescription.js.map +0 -1
  280. package/dist/rules/matchName.js +0 -77
  281. package/dist/rules/matchName.js.map +0 -1
  282. package/dist/rules/multilineBlocks.js +0 -245
  283. package/dist/rules/multilineBlocks.js.map +0 -1
  284. package/dist/rules/noBadBlocks.js +0 -68
  285. package/dist/rules/noBadBlocks.js.map +0 -1
  286. package/dist/rules/noBlankBlockDescriptions.js +0 -41
  287. package/dist/rules/noBlankBlockDescriptions.js.map +0 -1
  288. package/dist/rules/noBlankBlocks.js +0 -30
  289. package/dist/rules/noBlankBlocks.js.map +0 -1
  290. package/dist/rules/noDefaults.js +0 -56
  291. package/dist/rules/noDefaults.js.map +0 -1
  292. package/dist/rules/noMissingSyntax.js +0 -126
  293. package/dist/rules/noMissingSyntax.js.map +0 -1
  294. package/dist/rules/noMultiAsterisks.js +0 -58
  295. package/dist/rules/noMultiAsterisks.js.map +0 -1
  296. package/dist/rules/noRestrictedSyntax.js +0 -49
  297. package/dist/rules/noRestrictedSyntax.js.map +0 -1
  298. package/dist/rules/noTypes.js +0 -65
  299. package/dist/rules/noTypes.js.map +0 -1
  300. package/dist/rules/noUndefinedTypes.js +0 -303
  301. package/dist/rules/noUndefinedTypes.js.map +0 -1
  302. package/dist/rules/requireAsteriskPrefix.js +0 -112
  303. package/dist/rules/requireAsteriskPrefix.js.map +0 -1
  304. package/dist/rules/requireDescription.js +0 -95
  305. package/dist/rules/requireDescription.js.map +0 -1
  306. package/dist/rules/requireDescriptionCompleteSentence.js +0 -220
  307. package/dist/rules/requireDescriptionCompleteSentence.js.map +0 -1
  308. package/dist/rules/requireExample.js +0 -77
  309. package/dist/rules/requireExample.js.map +0 -1
  310. package/dist/rules/requireFileOverview.js +0 -81
  311. package/dist/rules/requireFileOverview.js.map +0 -1
  312. package/dist/rules/requireHyphenBeforeParamDescription.js +0 -89
  313. package/dist/rules/requireHyphenBeforeParamDescription.js.map +0 -1
  314. package/dist/rules/requireJsdoc.js +0 -404
  315. package/dist/rules/requireJsdoc.js.map +0 -1
  316. package/dist/rules/requireParam.js +0 -344
  317. package/dist/rules/requireParam.js.map +0 -1
  318. package/dist/rules/requireParamDescription.js +0 -59
  319. package/dist/rules/requireParamDescription.js.map +0 -1
  320. package/dist/rules/requireParamName.js +0 -36
  321. package/dist/rules/requireParamName.js.map +0 -1
  322. package/dist/rules/requireParamType.js +0 -59
  323. package/dist/rules/requireParamType.js.map +0 -1
  324. package/dist/rules/requireProperty.js +0 -35
  325. package/dist/rules/requireProperty.js.map +0 -1
  326. package/dist/rules/requirePropertyDescription.js +0 -21
  327. package/dist/rules/requirePropertyDescription.js.map +0 -1
  328. package/dist/rules/requirePropertyName.js +0 -21
  329. package/dist/rules/requirePropertyName.js.map +0 -1
  330. package/dist/rules/requirePropertyType.js +0 -21
  331. package/dist/rules/requirePropertyType.js.map +0 -1
  332. package/dist/rules/requireReturns.js +0 -131
  333. package/dist/rules/requireReturns.js.map +0 -1
  334. package/dist/rules/requireReturnsCheck.js +0 -66
  335. package/dist/rules/requireReturnsCheck.js.map +0 -1
  336. package/dist/rules/requireReturnsDescription.js +0 -43
  337. package/dist/rules/requireReturnsDescription.js.map +0 -1
  338. package/dist/rules/requireReturnsType.js +0 -36
  339. package/dist/rules/requireReturnsType.js.map +0 -1
  340. package/dist/rules/requireTemplate.js +0 -122
  341. package/dist/rules/requireTemplate.js.map +0 -1
  342. package/dist/rules/requireThrows.js +0 -67
  343. package/dist/rules/requireThrows.js.map +0 -1
  344. package/dist/rules/requireYields.js +0 -115
  345. package/dist/rules/requireYields.js.map +0 -1
  346. package/dist/rules/requireYieldsCheck.js +0 -105
  347. package/dist/rules/requireYieldsCheck.js.map +0 -1
  348. package/dist/rules/sortTags.js +0 -262
  349. package/dist/rules/sortTags.js.map +0 -1
  350. package/dist/rules/tagLines.js +0 -183
  351. package/dist/rules/tagLines.js.map +0 -1
  352. package/dist/rules/textEscaping.js +0 -102
  353. package/dist/rules/textEscaping.js.map +0 -1
  354. package/dist/rules/validTypes.js +0 -259
  355. package/dist/rules/validTypes.js.map +0 -1
  356. package/dist/tagNames.js +0 -144
  357. package/dist/tagNames.js.map +0 -1
  358. package/dist/utils/hasReturnValue.js +0 -265
  359. package/dist/utils/hasReturnValue.js.map +0 -1
@@ -1,412 +1,405 @@
1
- import * as _es_joy_jsdoccomment0 from "@es-joy/jsdoccomment";
2
- import { parseComment } from "@es-joy/jsdoccomment";
3
- import * as comment_parser0 from "comment-parser";
4
- import * as eslint0 from "eslint";
5
- import * as __jsdocUtils_js0 from "./jsdocUtils.js";
6
- import * as __getDefaultTagStructureForMode_js0 from "./getDefaultTagStructureForMode.js";
7
- import * as estree0 from "estree";
8
-
9
- //#region src/iterateJsdoc.d.ts
10
1
  /**
11
2
  * @param {JsdocVisitor} iterator
12
3
  * @param {RuleConfig} ruleConfig
13
4
  * @returns {import('eslint').Rule.RuleModule}
14
5
  */
15
- declare function iterateJsdoc(iterator: JsdocVisitor, ruleConfig: RuleConfig): eslint0.Rule.RuleModule;
16
- type Integer = number;
17
- type JsdocBlockWithInline = _es_joy_jsdoccomment0.JsdocBlockWithInline;
18
- type ContextObject = {
19
- disallowName?: string;
20
- allowName?: string;
21
- context?: string;
22
- comment?: string;
23
- tags?: string[];
24
- replacement?: string;
25
- minimum?: Integer;
26
- message?: string;
27
- forceRequireReturn?: boolean;
6
+ export default function iterateJsdoc(iterator: JsdocVisitor, ruleConfig: RuleConfig): import("eslint").Rule.RuleModule;
7
+ export { parseComment } from "@es-joy/jsdoccomment";
8
+ export type Integer = number;
9
+ export type JsdocBlockWithInline = import("@es-joy/jsdoccomment").JsdocBlockWithInline;
10
+ export type ContextObject = {
11
+ disallowName?: string;
12
+ allowName?: string;
13
+ context?: string;
14
+ comment?: string;
15
+ tags?: string[];
16
+ replacement?: string;
17
+ minimum?: Integer;
18
+ message?: string;
19
+ forceRequireReturn?: boolean;
28
20
  };
29
- type Context = string | ContextObject;
30
- type CheckJsdoc = (info: {
31
- lastIndex?: Integer;
32
- isFunctionContext?: boolean;
33
- selector?: string;
34
- comment?: string;
35
- }, handler: null | ((jsdoc: _es_joy_jsdoccomment0.JsdocBlockWithInline) => boolean | undefined), node: eslint0.Rule.Node) => void;
36
- type ForEachPreferredTag = (tagName: string, arrayHandler: (matchingJsdocTag: _es_joy_jsdoccomment0.JsdocTagWithInline, targetTagName: string) => void, skipReportingBlockedTag?: boolean | undefined) => void;
37
- type ReportSettings = (message: string) => void;
38
- type ParseClosureTemplateTag = (tag: comment_parser0.Spec) => string[];
39
- type GetPreferredTagNameObject = (cfg: {
40
- tagName: string;
21
+ export type Context = string | ContextObject;
22
+ export type CheckJsdoc = (info: {
23
+ lastIndex?: Integer;
24
+ isFunctionContext?: boolean;
25
+ selector?: string;
26
+ comment?: string;
27
+ }, handler: null | ((jsdoc: import("@es-joy/jsdoccomment").JsdocBlockWithInline) => boolean | undefined), node: import("eslint").Rule.Node) => void;
28
+ export type ForEachPreferredTag = (tagName: string, arrayHandler: (matchingJsdocTag: import("@es-joy/jsdoccomment").JsdocTagWithInline, targetTagName: string) => void, skipReportingBlockedTag?: boolean | undefined) => void;
29
+ export type ReportSettings = (message: string) => void;
30
+ export type ParseClosureTemplateTag = (tag: import("comment-parser").Spec) => string[];
31
+ export type GetPreferredTagNameObject = (cfg: {
32
+ tagName: string;
41
33
  }) => string | false | {
42
- message: string;
43
- replacement?: string | undefined;
34
+ message: string;
35
+ replacement?: string | undefined;
44
36
  } | {
45
- blocked: true;
46
- tagName: string;
37
+ blocked: true;
38
+ tagName: string;
47
39
  };
48
- type BasicUtils = {
49
- forEachPreferredTag: ForEachPreferredTag;
50
- reportSettings: ReportSettings;
51
- parseClosureTemplateTag: ParseClosureTemplateTag;
52
- getPreferredTagNameObject: GetPreferredTagNameObject;
53
- pathDoesNotBeginWith: __jsdocUtils_js0.PathDoesNotBeginWith;
40
+ export type BasicUtils = {
41
+ forEachPreferredTag: ForEachPreferredTag;
42
+ reportSettings: ReportSettings;
43
+ parseClosureTemplateTag: ParseClosureTemplateTag;
44
+ getPreferredTagNameObject: GetPreferredTagNameObject;
45
+ pathDoesNotBeginWith: import("./jsdocUtils.js").PathDoesNotBeginWith;
54
46
  };
55
- type IsIteratingFunction = () => boolean;
56
- type IsVirtualFunction = () => boolean;
57
- type Stringify = (tagBlock: comment_parser0.Block, specRewire?: boolean | undefined) => string;
58
- type ReportJSDoc = (msg: string, tag?: comment_parser0.Spec | {
59
- line: Integer;
60
- column?: Integer;
47
+ export type IsIteratingFunction = () => boolean;
48
+ export type IsVirtualFunction = () => boolean;
49
+ export type Stringify = (tagBlock: import("comment-parser").Block, specRewire?: boolean | undefined) => string;
50
+ export type ReportJSDoc = (msg: string, tag?: import("comment-parser").Spec | {
51
+ line: Integer;
52
+ column?: Integer;
61
53
  } | null | undefined, handler?: (() => void) | null | undefined, specRewire?: boolean | undefined, data?: undefined | {
62
- [key: string]: string;
54
+ [key: string]: string;
63
55
  }) => any;
64
- type GetRegexFromString = (str: string, requiredFlags?: string | undefined) => RegExp;
65
- type GetTagDescription = (tg: comment_parser0.Spec, returnArray?: boolean | undefined) => string[] | string;
66
- type SetTagDescription = (tg: comment_parser0.Spec, matcher: RegExp, setter: (description: string) => string) => Integer;
67
- type GetDescription = () => {
68
- description: string;
69
- descriptions: string[];
70
- lastDescriptionLine: Integer;
56
+ export type GetRegexFromString = (str: string, requiredFlags?: string | undefined) => RegExp;
57
+ export type GetTagDescription = (tg: import("comment-parser").Spec, returnArray?: boolean | undefined) => string[] | string;
58
+ export type SetTagDescription = (tg: import("comment-parser").Spec, matcher: RegExp, setter: (description: string) => string) => Integer;
59
+ export type GetDescription = () => {
60
+ description: string;
61
+ descriptions: string[];
62
+ lastDescriptionLine: Integer;
71
63
  };
72
- type SetBlockDescription = (setter: (info: {
73
- delimiter: string;
74
- postDelimiter: string;
75
- start: string;
76
- }, seedTokens: (tokens?: Partial<comment_parser0.Tokens>) => comment_parser0.Tokens, descLines: string[]) => comment_parser0.Line[]) => void;
77
- type SetDescriptionLines = (matcher: RegExp, setter: (description: string) => string) => Integer;
78
- type ChangeTag = (tag: comment_parser0.Spec, ...tokens: Partial<comment_parser0.Tokens>[]) => void;
79
- type SetTag = (tag: comment_parser0.Spec & {
80
- line: Integer;
81
- }, tokens?: Partial<comment_parser0.Tokens> | undefined) => void;
82
- type RemoveTag = (tagIndex: Integer, cfg?: {
83
- removeEmptyBlock?: boolean;
84
- tagSourceOffset?: Integer;
64
+ export type SetBlockDescription = (setter: (info: {
65
+ delimiter: string;
66
+ postDelimiter: string;
67
+ start: string;
68
+ }, seedTokens: (tokens?: Partial<import("comment-parser").Tokens>) => import("comment-parser").Tokens, descLines: string[]) => import("comment-parser").Line[]) => void;
69
+ export type SetDescriptionLines = (matcher: RegExp, setter: (description: string) => string) => Integer;
70
+ export type ChangeTag = (tag: import("comment-parser").Spec, ...tokens: Partial<import("comment-parser").Tokens>[]) => void;
71
+ export type SetTag = (tag: import("comment-parser").Spec & {
72
+ line: Integer;
73
+ }, tokens?: Partial<import("comment-parser").Tokens> | undefined) => void;
74
+ export type RemoveTag = (tagIndex: Integer, cfg?: {
75
+ removeEmptyBlock?: boolean;
76
+ tagSourceOffset?: Integer;
85
77
  } | undefined) => void;
86
- type AddTag = (targetTagName: string, number?: number | undefined, tokens?: {} | comment_parser0.Tokens | undefined) => void;
87
- type GetFirstLine = () => Integer | undefined;
88
- type SeedTokens = (tokens?: Partial<comment_parser0.Tokens> | undefined) => comment_parser0.Tokens;
78
+ export type AddTag = (targetTagName: string, number?: number | undefined, tokens?: {} | import("comment-parser").Tokens | undefined) => void;
79
+ export type GetFirstLine = () => Integer | undefined;
80
+ export type SeedTokens = (tokens?: Partial<import("comment-parser").Tokens> | undefined) => import("comment-parser").Tokens;
89
81
  /**
90
82
  * Sets tokens to empty string.
91
83
  */
92
- type EmptyTokens = (tokens: comment_parser0.Tokens) => void;
93
- type AddLine = (sourceIndex: Integer, tokens: Partial<comment_parser0.Tokens>) => void;
94
- type AddLines = (tagIndex: Integer, tagSourceOffset: Integer, numLines: Integer) => void;
95
- type MakeMultiline = () => void;
96
- type GetFunctionParameterNames = (useDefaultObjectProperties?: boolean | undefined) => __jsdocUtils_js0.ParamNameInfo[];
97
- type HasParams = () => Integer;
98
- type IsGenerator = () => boolean;
99
- type IsConstructor = () => boolean;
100
- type GetJsdocTagsDeep = (tagName: string) => false | {
101
- idx: Integer;
102
- name: string;
103
- type: string;
84
+ export type EmptyTokens = (tokens: import("comment-parser").Tokens) => void;
85
+ export type AddLine = (sourceIndex: Integer, tokens: Partial<import("comment-parser").Tokens>) => void;
86
+ export type AddLines = (tagIndex: Integer, tagSourceOffset: Integer, numLines: Integer) => void;
87
+ export type MakeMultiline = () => void;
88
+ export type GetFunctionParameterNames = (useDefaultObjectProperties?: boolean | undefined) => import("./jsdocUtils.js").ParamNameInfo[];
89
+ export type HasParams = () => Integer;
90
+ export type IsGenerator = () => boolean;
91
+ export type IsConstructor = () => boolean;
92
+ export type GetJsdocTagsDeep = (tagName: string) => false | {
93
+ idx: Integer;
94
+ name: string;
95
+ type: string;
104
96
  }[];
105
- type GetPreferredTagName = (cfg: {
106
- tagName: string;
107
- skipReportingBlockedTag?: boolean;
108
- allowObjectReturn?: boolean;
109
- defaultMessage?: string;
97
+ export type GetPreferredTagName = (cfg: {
98
+ tagName: string;
99
+ skipReportingBlockedTag?: boolean;
100
+ allowObjectReturn?: boolean;
101
+ defaultMessage?: string;
110
102
  }) => string | undefined | false | {
111
- message: string;
112
- replacement?: string | undefined;
103
+ message: string;
104
+ replacement?: string | undefined;
113
105
  } | {
114
- blocked: true;
115
- tagName: string;
106
+ blocked: true;
107
+ tagName: string;
116
108
  };
117
- type IsValidTag = (name: string, definedTags: string[]) => boolean;
118
- type HasATag = (names: string[]) => boolean;
119
- type HasTag = (name: string) => boolean;
120
- type ComparePaths = (name: string) => (otherPathName: string) => boolean;
121
- type DropPathSegmentQuotes = (name: string) => string;
122
- type AvoidDocs = () => boolean;
123
- type TagMightHaveNamePositionTypePosition = (tagName: string, otherModeMaps?: __getDefaultTagStructureForMode_js0.TagStructure[] | undefined) => boolean | {
124
- otherMode: true;
109
+ export type IsValidTag = (name: string, definedTags: string[]) => boolean;
110
+ export type HasATag = (names: string[]) => boolean;
111
+ export type HasTag = (name: string) => boolean;
112
+ export type ComparePaths = (name: string) => (otherPathName: string) => boolean;
113
+ export type DropPathSegmentQuotes = (name: string) => string;
114
+ export type AvoidDocs = () => boolean;
115
+ export type TagMightHaveNamePositionTypePosition = (tagName: string, otherModeMaps?: import("./getDefaultTagStructureForMode.js").TagStructure[] | undefined) => boolean | {
116
+ otherMode: true;
125
117
  };
126
- type TagMustHave = (tagName: string, otherModeMaps: __getDefaultTagStructureForMode_js0.TagStructure[]) => boolean | {
127
- otherMode: false;
118
+ export type TagMustHave = (tagName: string, otherModeMaps: import("./getDefaultTagStructureForMode.js").TagStructure[]) => boolean | {
119
+ otherMode: false;
128
120
  };
129
- type TagMissingRequiredTypeOrNamepath = (tag: comment_parser0.Spec, otherModeMaps: __getDefaultTagStructureForMode_js0.TagStructure[]) => boolean | {
130
- otherMode: false;
121
+ export type TagMissingRequiredTypeOrNamepath = (tag: import("comment-parser").Spec, otherModeMaps: import("./getDefaultTagStructureForMode.js").TagStructure[]) => boolean | {
122
+ otherMode: false;
131
123
  };
132
- type IsNamepathX = (tagName: string) => boolean;
133
- type GetTagStructureForMode = (mde: __jsdocUtils_js0.ParserMode) => __getDefaultTagStructureForMode_js0.TagStructure;
134
- type MayBeUndefinedTypeTag = (tag: comment_parser0.Spec) => boolean;
135
- type HasValueOrExecutorHasNonEmptyResolveValue = (anyPromiseAsReturn: boolean, allBranches?: boolean | undefined) => boolean;
136
- type HasYieldValue = () => boolean;
137
- type HasYieldReturnValue = () => boolean;
138
- type HasThrowValue = () => boolean;
139
- type IsAsync = () => boolean | undefined;
140
- type GetTags = (tagName: string) => comment_parser0.Spec[];
141
- type GetPresentTags = (tagList: string[]) => _es_joy_jsdoccomment0.JsdocTagWithInline[];
142
- type FilterTags = (filter: (tag: _es_joy_jsdoccomment0.JsdocTagWithInline) => boolean) => _es_joy_jsdoccomment0.JsdocTagWithInline[];
143
- type FilterAllTags = (filter: (tag: (comment_parser0.Spec | _es_joy_jsdoccomment0.JsdocInlineTagNoType)) => boolean) => (comment_parser0.Spec | _es_joy_jsdoccomment0.JsdocInlineTagNoType)[];
144
- type GetTagsByType = (tags: comment_parser0.Spec[]) => {
145
- tagsWithNames: comment_parser0.Spec[];
146
- tagsWithoutNames: comment_parser0.Spec[];
124
+ export type IsNamepathX = (tagName: string) => boolean;
125
+ export type GetTagStructureForMode = (mde: import("./jsdocUtils.js").ParserMode) => import("./getDefaultTagStructureForMode.js").TagStructure;
126
+ export type MayBeUndefinedTypeTag = (tag: import("comment-parser").Spec) => boolean;
127
+ export type HasValueOrExecutorHasNonEmptyResolveValue = (anyPromiseAsReturn: boolean, allBranches?: boolean | undefined) => boolean;
128
+ export type HasYieldValue = () => boolean;
129
+ export type HasYieldReturnValue = () => boolean;
130
+ export type HasThrowValue = () => boolean;
131
+ export type IsAsync = () => boolean | undefined;
132
+ export type GetTags = (tagName: string) => import("comment-parser").Spec[];
133
+ export type GetPresentTags = (tagList: string[]) => import("@es-joy/jsdoccomment").JsdocTagWithInline[];
134
+ export type FilterTags = (filter: (tag: import("@es-joy/jsdoccomment").JsdocTagWithInline) => boolean) => import("@es-joy/jsdoccomment").JsdocTagWithInline[];
135
+ export type FilterAllTags = (filter: (tag: (import("comment-parser").Spec | import("@es-joy/jsdoccomment").JsdocInlineTagNoType)) => boolean) => (import("comment-parser").Spec | import("@es-joy/jsdoccomment").JsdocInlineTagNoType)[];
136
+ export type GetTagsByType = (tags: import("comment-parser").Spec[]) => {
137
+ tagsWithNames: import("comment-parser").Spec[];
138
+ tagsWithoutNames: import("comment-parser").Spec[];
147
139
  };
148
- type HasOptionTag = (tagName: string) => boolean;
149
- type GetClassNode = () => Node | null;
150
- type GetClassJsdoc = () => null | JsdocBlockWithInline;
151
- type ClassHasTag = (tagName: string) => boolean;
152
- type FindContext = (contexts: Context[], comment: string | undefined) => {
153
- foundContext: Context | undefined;
154
- contextStr: string;
140
+ export type HasOptionTag = (tagName: string) => boolean;
141
+ export type GetClassNode = () => Node | null;
142
+ export type GetClassJsdoc = () => null | JsdocBlockWithInline;
143
+ export type ClassHasTag = (tagName: string) => boolean;
144
+ export type FindContext = (contexts: Context[], comment: string | undefined) => {
145
+ foundContext: Context | undefined;
146
+ contextStr: string;
155
147
  };
156
- type Utils = BasicUtils & {
157
- isIteratingFunction: IsIteratingFunction;
158
- isVirtualFunction: IsVirtualFunction;
159
- stringify: Stringify;
160
- reportJSDoc: ReportJSDoc;
161
- getRegexFromString: GetRegexFromString;
162
- getTagDescription: GetTagDescription;
163
- setTagDescription: SetTagDescription;
164
- getDescription: GetDescription;
165
- setBlockDescription: SetBlockDescription;
166
- setDescriptionLines: SetDescriptionLines;
167
- changeTag: ChangeTag;
168
- setTag: SetTag;
169
- removeTag: RemoveTag;
170
- addTag: AddTag;
171
- getFirstLine: GetFirstLine;
172
- seedTokens: SeedTokens;
173
- emptyTokens: EmptyTokens;
174
- addLine: AddLine;
175
- addLines: AddLines;
176
- makeMultiline: MakeMultiline;
177
- flattenRoots: __jsdocUtils_js0.FlattenRoots;
178
- getFunctionParameterNames: GetFunctionParameterNames;
179
- hasParams: HasParams;
180
- isGenerator: IsGenerator;
181
- isConstructor: IsConstructor;
182
- getJsdocTagsDeep: GetJsdocTagsDeep;
183
- getPreferredTagName: GetPreferredTagName;
184
- isValidTag: IsValidTag;
185
- hasATag: HasATag;
186
- hasTag: HasTag;
187
- comparePaths: ComparePaths;
188
- dropPathSegmentQuotes: DropPathSegmentQuotes;
189
- avoidDocs: AvoidDocs;
190
- tagMightHaveNamePosition: TagMightHaveNamePositionTypePosition;
191
- tagMightHaveTypePosition: TagMightHaveNamePositionTypePosition;
192
- tagMustHaveNamePosition: TagMustHave;
193
- tagMustHaveTypePosition: TagMustHave;
194
- tagMissingRequiredTypeOrNamepath: TagMissingRequiredTypeOrNamepath;
195
- isNamepathDefiningTag: IsNamepathX;
196
- isNamepathReferencingTag: IsNamepathX;
197
- isNamepathOrUrlReferencingTag: IsNamepathX;
198
- tagMightHaveNamepath: IsNamepathX;
199
- getTagStructureForMode: GetTagStructureForMode;
200
- mayBeUndefinedTypeTag: MayBeUndefinedTypeTag;
201
- hasValueOrExecutorHasNonEmptyResolveValue: HasValueOrExecutorHasNonEmptyResolveValue;
202
- hasYieldValue: HasYieldValue;
203
- hasYieldReturnValue: HasYieldReturnValue;
204
- hasThrowValue: HasThrowValue;
205
- isAsync: IsAsync;
206
- getTags: GetTags;
207
- getPresentTags: GetPresentTags;
208
- filterTags: FilterTags;
209
- filterAllTags: FilterAllTags;
210
- getTagsByType: GetTagsByType;
211
- hasOptionTag: HasOptionTag;
212
- getClassNode: GetClassNode;
213
- getClassJsdoc: GetClassJsdoc;
214
- classHasTag: ClassHasTag;
215
- findContext: FindContext;
148
+ export type Utils = BasicUtils & {
149
+ isIteratingFunction: IsIteratingFunction;
150
+ isIteratingFunctionOrVariable: IsIteratingFunction;
151
+ isVirtualFunction: IsVirtualFunction;
152
+ stringify: Stringify;
153
+ reportJSDoc: ReportJSDoc;
154
+ getRegexFromString: GetRegexFromString;
155
+ getTagDescription: GetTagDescription;
156
+ setTagDescription: SetTagDescription;
157
+ getDescription: GetDescription;
158
+ setBlockDescription: SetBlockDescription;
159
+ setDescriptionLines: SetDescriptionLines;
160
+ changeTag: ChangeTag;
161
+ setTag: SetTag;
162
+ removeTag: RemoveTag;
163
+ addTag: AddTag;
164
+ getFirstLine: GetFirstLine;
165
+ seedTokens: SeedTokens;
166
+ emptyTokens: EmptyTokens;
167
+ addLine: AddLine;
168
+ addLines: AddLines;
169
+ makeMultiline: MakeMultiline;
170
+ flattenRoots: import("./jsdocUtils.js").FlattenRoots;
171
+ getFunctionParameterNames: GetFunctionParameterNames;
172
+ hasParams: HasParams;
173
+ isGenerator: IsGenerator;
174
+ isConstructor: IsConstructor;
175
+ getJsdocTagsDeep: GetJsdocTagsDeep;
176
+ getPreferredTagName: GetPreferredTagName;
177
+ isValidTag: IsValidTag;
178
+ hasATag: HasATag;
179
+ hasTag: HasTag;
180
+ comparePaths: ComparePaths;
181
+ dropPathSegmentQuotes: DropPathSegmentQuotes;
182
+ avoidDocs: AvoidDocs;
183
+ tagMightHaveNamePosition: TagMightHaveNamePositionTypePosition;
184
+ tagMightHaveTypePosition: TagMightHaveNamePositionTypePosition;
185
+ tagMustHaveNamePosition: TagMustHave;
186
+ tagMustHaveTypePosition: TagMustHave;
187
+ tagMissingRequiredTypeOrNamepath: TagMissingRequiredTypeOrNamepath;
188
+ isNamepathDefiningTag: IsNamepathX;
189
+ isNamepathReferencingTag: IsNamepathX;
190
+ isNamepathOrUrlReferencingTag: IsNamepathX;
191
+ tagMightHaveNamepath: IsNamepathX;
192
+ getTagStructureForMode: GetTagStructureForMode;
193
+ mayBeUndefinedTypeTag: MayBeUndefinedTypeTag;
194
+ hasValueOrExecutorHasNonEmptyResolveValue: HasValueOrExecutorHasNonEmptyResolveValue;
195
+ hasYieldValue: HasYieldValue;
196
+ hasYieldReturnValue: HasYieldReturnValue;
197
+ hasThrowValue: HasThrowValue;
198
+ isAsync: IsAsync;
199
+ getTags: GetTags;
200
+ getPresentTags: GetPresentTags;
201
+ filterTags: FilterTags;
202
+ filterAllTags: FilterAllTags;
203
+ getTagsByType: GetTagsByType;
204
+ hasOptionTag: HasOptionTag;
205
+ getClassNode: GetClassNode;
206
+ getClassJsdoc: GetClassJsdoc;
207
+ classHasTag: ClassHasTag;
208
+ findContext: FindContext;
216
209
  };
217
210
  /**
218
211
  * Should use ESLint rule's typing.
219
212
  */
220
- type EslintRuleMeta = eslint0.Rule.RuleMetaData;
213
+ export type EslintRuleMeta = import("eslint").Rule.RuleMetaData;
221
214
  /**
222
215
  * A plain object for tracking state as needed by rules across iterations.
223
216
  */
224
- type StateObject = {
225
- globalTags: {};
226
- hasDuplicates: {
227
- [key: string]: boolean;
228
- };
229
- selectorMap: {
230
- [selector: string]: {
231
- [comment: string]: Integer;
217
+ export type StateObject = {
218
+ globalTags: {};
219
+ hasDuplicates: {
220
+ [key: string]: boolean;
221
+ };
222
+ selectorMap: {
223
+ [selector: string]: {
224
+ [comment: string]: Integer;
225
+ };
226
+ };
227
+ hasTag: {
228
+ [key: string]: boolean;
229
+ };
230
+ hasNonComment: number;
231
+ hasNonCommentBeforeTag: {
232
+ [key: string]: boolean | number;
232
233
  };
233
- };
234
- hasTag: {
235
- [key: string]: boolean;
236
- };
237
- hasNonComment: number;
238
- hasNonCommentBeforeTag: {
239
- [key: string]: boolean | number;
240
- };
241
234
  };
242
235
  /**
243
236
  * The Node AST as supplied by the parser.
244
237
  */
245
- type Node = eslint0.Rule.Node;
246
- type Report = (message: string, fix?: eslint0.Rule.ReportFixer | null | undefined, jsdocLoc?: {
247
- line?: Integer;
248
- column?: Integer;
249
- } | (comment_parser0.Spec & {
250
- line?: Integer;
238
+ export type Node = import("eslint").Rule.Node;
239
+ export type Report = (message: string, fix?: import("eslint").Rule.ReportFixer | null | undefined, jsdocLoc?: {
240
+ line?: Integer;
241
+ column?: Integer;
242
+ } | (import("comment-parser").Spec & {
243
+ line?: Integer;
251
244
  }) | null | undefined, data?: undefined | {
252
- [key: string]: string;
245
+ [key: string]: string;
253
246
  }) => void;
254
- type PreferredTypes = {
255
- [key: string]: false | string | {
256
- message: string;
257
- replacement?: false | string;
258
- skipRootChecking?: boolean;
259
- };
247
+ export type PreferredTypes = {
248
+ [key: string]: false | string | {
249
+ message: string;
250
+ replacement?: false | string;
251
+ skipRootChecking?: boolean;
252
+ };
260
253
  };
261
- type StructuredTags = {
262
- [key: string]: {
263
- name?: "text" | "namepath-defining" | "namepath-referencing" | false;
264
- type?: boolean | string[];
265
- required?: ("name" | "type" | "typeOrNameRequired")[];
266
- };
254
+ export type StructuredTags = {
255
+ [key: string]: {
256
+ name?: "text" | "namepath-defining" | "namepath-referencing" | false;
257
+ type?: boolean | string[];
258
+ required?: ("name" | "type" | "typeOrNameRequired")[];
259
+ };
267
260
  };
268
261
  /**
269
262
  * Settings from ESLint types.
270
263
  */
271
- type Settings = {
272
- maxLines: Integer;
273
- minLines: Integer;
274
- tagNamePreference: __jsdocUtils_js0.TagNamePreference;
275
- mode: __jsdocUtils_js0.ParserMode;
276
- preferredTypes: PreferredTypes;
277
- structuredTags: StructuredTags;
278
- [name: string]: any;
279
- contexts?: Context[];
264
+ export type Settings = {
265
+ maxLines: Integer;
266
+ minLines: Integer;
267
+ tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
268
+ mode: import("./jsdocUtils.js").ParserMode;
269
+ preferredTypes: PreferredTypes;
270
+ structuredTags: StructuredTags;
271
+ [name: string]: any;
272
+ contexts?: Context[];
280
273
  };
281
- type JSDocSettings = {
282
- settings?: {
283
- jsdoc?: {
284
- ignorePrivate: boolean;
285
- ignoreInternal: boolean;
286
- maxLines: Integer;
287
- minLines: Integer;
288
- tagNamePreference: __jsdocUtils_js0.TagNamePreference;
289
- preferredTypes: PreferredTypes;
290
- structuredTags: StructuredTags;
291
- overrideReplacesDocs: boolean;
292
- ignoreReplacesDocs: boolean;
293
- implementsReplacesDocs: boolean;
294
- augmentsExtendsReplacesDocs: boolean;
295
- exemptDestructuredRootsFromChecks: boolean;
296
- mode: __jsdocUtils_js0.ParserMode;
297
- contexts: Context[];
274
+ export type JSDocSettings = {
275
+ settings?: {
276
+ jsdoc?: {
277
+ ignorePrivate: boolean;
278
+ ignoreInternal: boolean;
279
+ maxLines: Integer;
280
+ minLines: Integer;
281
+ tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
282
+ preferredTypes: PreferredTypes;
283
+ structuredTags: StructuredTags;
284
+ overrideReplacesDocs: boolean;
285
+ ignoreReplacesDocs: boolean;
286
+ implementsReplacesDocs: boolean;
287
+ augmentsExtendsReplacesDocs: boolean;
288
+ exemptDestructuredRootsFromChecks: boolean;
289
+ mode: import("./jsdocUtils.js").ParserMode;
290
+ contexts: Context[];
291
+ };
298
292
  };
299
- };
300
293
  };
301
294
  /**
302
295
  * Create the report function
303
296
  */
304
- type MakeReport = (context: eslint0.Rule.RuleContext, commentNode: estree0.Node) => Report;
305
- type JsdocVisitorBasic = (arg: {
306
- context: eslint0.Rule.RuleContext;
307
- sourceCode: eslint0.SourceCode;
308
- indent?: string;
309
- info?: {
310
- comment?: string | undefined;
311
- lastIndex?: Integer | undefined;
312
- };
313
- state?: StateObject;
314
- globalState?: Map<string, Map<string, string>>;
315
- jsdoc?: JsdocBlockWithInline;
316
- jsdocNode?: eslint0.Rule.Node & {
317
- range: [number, number];
318
- };
319
- node?: Node;
320
- allComments?: estree0.Node[];
321
- report?: Report;
322
- makeReport?: MakeReport;
323
- settings: Settings;
324
- utils: BasicUtils;
325
- }) => any;
326
- type JsdocVisitor = (arg: {
327
- context: eslint0.Rule.RuleContext;
328
- sourceCode: eslint0.SourceCode;
329
- indent: string;
330
- info: {
331
- comment?: string | undefined;
332
- lastIndex?: Integer | undefined;
333
- };
334
- state: StateObject;
335
- globalState: Map<string, Map<string, string>>;
336
- jsdoc: JsdocBlockWithInline;
337
- jsdocNode: eslint0.Rule.Node & {
338
- range: [number, number];
339
- };
340
- node: Node | null;
341
- allComments?: estree0.Node[];
342
- report: Report;
343
- makeReport?: MakeReport;
344
- settings: Settings;
345
- utils: Utils;
297
+ export type MakeReport = (context: import("eslint").Rule.RuleContext, commentNode: import("estree").Node) => Report;
298
+ export type JsdocVisitorBasic = (arg: {
299
+ context: import("eslint").Rule.RuleContext;
300
+ sourceCode: import("eslint").SourceCode;
301
+ indent?: string;
302
+ info?: {
303
+ comment?: string | undefined;
304
+ lastIndex?: Integer | undefined;
305
+ };
306
+ state?: StateObject;
307
+ globalState?: Map<string, Map<string, string>>;
308
+ jsdoc?: JsdocBlockWithInline;
309
+ jsdocNode?: import("eslint").Rule.Node & {
310
+ range: [number, number];
311
+ };
312
+ node?: Node;
313
+ allComments?: import("estree").Node[];
314
+ report?: Report;
315
+ makeReport?: MakeReport;
316
+ settings: Settings;
317
+ utils: BasicUtils;
346
318
  }) => any;
347
- type NonCommentArgs = {
348
- node: Node & {
349
- range: [number, number];
350
- };
351
- state: StateObject;
352
- };
353
- type RuleConfig = {
354
- /**
355
- * ESLint rule meta
356
- */
357
- meta: EslintRuleMeta;
358
- /**
359
- * Any default contexts
360
- */
361
- contextDefaults?: __jsdocUtils_js0.DefaultContexts | undefined;
362
- /**
363
- * Whether to force a `contexts` check
364
- */
365
- contextSelected?: true | undefined;
366
- /**
367
- * Whether to iterate all JSDoc blocks by default
368
- * regardless of context
369
- */
370
- iterateAllJsdocs?: true | undefined;
371
- /**
372
- * Whether to check `@private` blocks (normally exempted)
373
- */
374
- checkPrivate?: true | undefined;
375
- /**
376
- * Whether to check `@internal` blocks (normally exempted)
377
- */
378
- checkInternal?: true | undefined;
379
- /**
380
- * Whether to iterates over all JSDoc blocks regardless of attachment
381
- */
382
- checkFile?: true | undefined;
383
- /**
384
- * Whether to avoid relying on settings for global contexts
385
- */
386
- nonGlobalSettings?: true | undefined;
387
- /**
388
- * Whether to disable the tracking of visited comment nodes (as
389
- * non-tracked may conduct further actions)
390
- */
391
- noTracking?: true | undefined;
392
- /**
393
- * Whether the rule expects contexts to be based on a match option
394
- */
395
- matchContext?: true | undefined;
396
- /**
397
- * Handler to be executed upon exiting iteration of program AST
398
- */
399
- exit?: ((args: {
400
- context: eslint0.Rule.RuleContext;
319
+ export type JsdocVisitor = (arg: {
320
+ context: import("eslint").Rule.RuleContext;
321
+ sourceCode: import("eslint").SourceCode;
322
+ indent: string;
323
+ info: {
324
+ comment?: string | undefined;
325
+ lastIndex?: Integer | undefined;
326
+ };
401
327
  state: StateObject;
328
+ globalState: Map<string, Map<string, string>>;
329
+ jsdoc: JsdocBlockWithInline;
330
+ jsdocNode: import("eslint").Rule.Node & {
331
+ range: [number, number];
332
+ };
333
+ node: Node | null;
334
+ allComments?: import("estree").Node[];
335
+ report: Report;
336
+ makeReport?: MakeReport;
402
337
  settings: Settings;
403
- utils: BasicUtils;
404
- }) => void) | undefined;
405
- /**
406
- * Handler to be executed if rule wishes
407
- * to be supplied nodes without comments
408
- */
409
- nonComment?: ((nca: NonCommentArgs) => void) | undefined;
338
+ utils: Utils;
339
+ }) => any;
340
+ export type NonCommentArgs = {
341
+ node: Node & {
342
+ range: [number, number];
343
+ };
344
+ state: StateObject;
345
+ };
346
+ export type RuleConfig = {
347
+ /**
348
+ * ESLint rule meta
349
+ */
350
+ meta: EslintRuleMeta;
351
+ /**
352
+ * Any default contexts
353
+ */
354
+ contextDefaults?: jsdocUtils.DefaultContexts | undefined;
355
+ /**
356
+ * Whether to force a `contexts` check
357
+ */
358
+ contextSelected?: true | undefined;
359
+ /**
360
+ * Whether to iterate all JSDoc blocks by default
361
+ * regardless of context
362
+ */
363
+ iterateAllJsdocs?: true | undefined;
364
+ /**
365
+ * Whether to check `@private` blocks (normally exempted)
366
+ */
367
+ checkPrivate?: true | undefined;
368
+ /**
369
+ * Whether to check `@internal` blocks (normally exempted)
370
+ */
371
+ checkInternal?: true | undefined;
372
+ /**
373
+ * Whether to iterates over all JSDoc blocks regardless of attachment
374
+ */
375
+ checkFile?: true | undefined;
376
+ /**
377
+ * Whether to avoid relying on settings for global contexts
378
+ */
379
+ nonGlobalSettings?: true | undefined;
380
+ /**
381
+ * Whether to disable the tracking of visited comment nodes (as
382
+ * non-tracked may conduct further actions)
383
+ */
384
+ noTracking?: true | undefined;
385
+ /**
386
+ * Whether the rule expects contexts to be based on a match option
387
+ */
388
+ matchContext?: true | undefined;
389
+ /**
390
+ * Handler to be executed upon exiting iteration of program AST
391
+ */
392
+ exit?: ((args: {
393
+ context: import("eslint").Rule.RuleContext;
394
+ state: StateObject;
395
+ settings: Settings;
396
+ utils: BasicUtils;
397
+ }) => void) | undefined;
398
+ /**
399
+ * Handler to be executed if rule wishes
400
+ * to be supplied nodes without comments
401
+ */
402
+ nonComment?: ((nca: NonCommentArgs) => void) | undefined;
410
403
  };
411
404
  /**
412
405
  * @typedef {{
@@ -465,7 +458,6 @@ type RuleConfig = {
465
458
  * @param {import('eslint').Rule.RuleContext & JSDocSettings} context
466
459
  * @returns {Settings|false}
467
460
  */
468
- declare function getSettings(context: eslint0.Rule.RuleContext & JSDocSettings): Settings | false;
469
- //#endregion
470
- export { AddLine, AddLines, AddTag, AvoidDocs, BasicUtils, ChangeTag, CheckJsdoc, ClassHasTag, ComparePaths, Context, ContextObject, DropPathSegmentQuotes, EmptyTokens, EslintRuleMeta, FilterAllTags, FilterTags, FindContext, ForEachPreferredTag, GetClassJsdoc, GetClassNode, GetDescription, GetFirstLine, GetFunctionParameterNames, GetJsdocTagsDeep, GetPreferredTagName, GetPreferredTagNameObject, GetPresentTags, GetRegexFromString, GetTagDescription, GetTagStructureForMode, GetTags, GetTagsByType, HasATag, HasOptionTag, HasParams, HasTag, HasThrowValue, HasValueOrExecutorHasNonEmptyResolveValue, HasYieldReturnValue, HasYieldValue, Integer, IsAsync, IsConstructor, IsGenerator, IsIteratingFunction, IsNamepathX, IsValidTag, IsVirtualFunction, JSDocSettings, JsdocBlockWithInline, JsdocVisitor, JsdocVisitorBasic, MakeMultiline, MakeReport, MayBeUndefinedTypeTag, Node, NonCommentArgs, ParseClosureTemplateTag, PreferredTypes, RemoveTag, Report, ReportJSDoc, ReportSettings, RuleConfig, SeedTokens, SetBlockDescription, SetDescriptionLines, SetTag, SetTagDescription, Settings, StateObject, Stringify, StructuredTags, TagMightHaveNamePositionTypePosition, TagMissingRequiredTypeOrNamepath, TagMustHave, Utils, iterateJsdoc as default, getSettings, parseComment };
461
+ export function getSettings(context: import("eslint").Rule.RuleContext & JSDocSettings): Settings | false;
462
+ import * as jsdocUtils from './jsdocUtils.js';
471
463
  //# sourceMappingURL=iterateJsdoc.d.ts.map