eslint-plugin-jsdoc 52.0.3 → 52.0.4

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 (357) 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 +383 -398
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.ts +6 -11
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/iterateJsdoc.cjs +1988 -1528
  22. package/dist/iterateJsdoc.cjs.map +1 -1
  23. package/dist/iterateJsdoc.d.ts +349 -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 +2518 -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 -22
  231. package/dist/index.d.cts.map +0 -1
  232. package/dist/index.js +0 -425
  233. package/dist/index.js.map +0 -1
  234. package/dist/iterateJsdoc.d.cts +0 -471
  235. package/dist/iterateJsdoc.d.cts.map +0 -1
  236. package/dist/iterateJsdoc.js +0 -1617
  237. package/dist/iterateJsdoc.js.map +0 -1
  238. package/dist/jsdocUtils.js +0 -1123
  239. package/dist/jsdocUtils.js.map +0 -1
  240. package/dist/rules/checkAccess.js +0 -33
  241. package/dist/rules/checkAccess.js.map +0 -1
  242. package/dist/rules/checkAlignment.js +0 -47
  243. package/dist/rules/checkAlignment.js.map +0 -1
  244. package/dist/rules/checkExamples.js +0 -348
  245. package/dist/rules/checkExamples.js.map +0 -1
  246. package/dist/rules/checkIndentation.js +0 -59
  247. package/dist/rules/checkIndentation.js.map +0 -1
  248. package/dist/rules/checkLineAlignment.js +0 -229
  249. package/dist/rules/checkLineAlignment.js.map +0 -1
  250. package/dist/rules/checkParamNames.js +0 -237
  251. package/dist/rules/checkParamNames.js.map +0 -1
  252. package/dist/rules/checkPropertyNames.js +0 -88
  253. package/dist/rules/checkPropertyNames.js.map +0 -1
  254. package/dist/rules/checkSyntax.js +0 -25
  255. package/dist/rules/checkSyntax.js.map +0 -1
  256. package/dist/rules/checkTagNames.js +0 -191
  257. package/dist/rules/checkTagNames.js.map +0 -1
  258. package/dist/rules/checkTemplateNames.js +0 -124
  259. package/dist/rules/checkTemplateNames.js.map +0 -1
  260. package/dist/rules/checkTypes.js +0 -299
  261. package/dist/rules/checkTypes.js.map +0 -1
  262. package/dist/rules/checkValues.js +0 -103
  263. package/dist/rules/checkValues.js.map +0 -1
  264. package/dist/rules/convertToJsdocComments.js +0 -231
  265. package/dist/rules/convertToJsdocComments.js.map +0 -1
  266. package/dist/rules/emptyTags.js +0 -67
  267. package/dist/rules/emptyTags.js.map +0 -1
  268. package/dist/rules/implementsOnClasses.js +0 -40
  269. package/dist/rules/implementsOnClasses.js.map +0 -1
  270. package/dist/rules/importsAsDependencies.js +0 -68
  271. package/dist/rules/importsAsDependencies.js.map +0 -1
  272. package/dist/rules/informativeDocs.js +0 -110
  273. package/dist/rules/informativeDocs.js.map +0 -1
  274. package/dist/rules/linesBeforeBlock.js +0 -75
  275. package/dist/rules/linesBeforeBlock.js.map +0 -1
  276. package/dist/rules/matchDescription.js +0 -167
  277. package/dist/rules/matchDescription.js.map +0 -1
  278. package/dist/rules/matchName.js +0 -77
  279. package/dist/rules/matchName.js.map +0 -1
  280. package/dist/rules/multilineBlocks.js +0 -245
  281. package/dist/rules/multilineBlocks.js.map +0 -1
  282. package/dist/rules/noBadBlocks.js +0 -68
  283. package/dist/rules/noBadBlocks.js.map +0 -1
  284. package/dist/rules/noBlankBlockDescriptions.js +0 -41
  285. package/dist/rules/noBlankBlockDescriptions.js.map +0 -1
  286. package/dist/rules/noBlankBlocks.js +0 -30
  287. package/dist/rules/noBlankBlocks.js.map +0 -1
  288. package/dist/rules/noDefaults.js +0 -56
  289. package/dist/rules/noDefaults.js.map +0 -1
  290. package/dist/rules/noMissingSyntax.js +0 -126
  291. package/dist/rules/noMissingSyntax.js.map +0 -1
  292. package/dist/rules/noMultiAsterisks.js +0 -58
  293. package/dist/rules/noMultiAsterisks.js.map +0 -1
  294. package/dist/rules/noRestrictedSyntax.js +0 -49
  295. package/dist/rules/noRestrictedSyntax.js.map +0 -1
  296. package/dist/rules/noTypes.js +0 -65
  297. package/dist/rules/noTypes.js.map +0 -1
  298. package/dist/rules/noUndefinedTypes.js +0 -303
  299. package/dist/rules/noUndefinedTypes.js.map +0 -1
  300. package/dist/rules/requireAsteriskPrefix.js +0 -112
  301. package/dist/rules/requireAsteriskPrefix.js.map +0 -1
  302. package/dist/rules/requireDescription.js +0 -95
  303. package/dist/rules/requireDescription.js.map +0 -1
  304. package/dist/rules/requireDescriptionCompleteSentence.js +0 -220
  305. package/dist/rules/requireDescriptionCompleteSentence.js.map +0 -1
  306. package/dist/rules/requireExample.js +0 -77
  307. package/dist/rules/requireExample.js.map +0 -1
  308. package/dist/rules/requireFileOverview.js +0 -81
  309. package/dist/rules/requireFileOverview.js.map +0 -1
  310. package/dist/rules/requireHyphenBeforeParamDescription.js +0 -89
  311. package/dist/rules/requireHyphenBeforeParamDescription.js.map +0 -1
  312. package/dist/rules/requireJsdoc.js +0 -404
  313. package/dist/rules/requireJsdoc.js.map +0 -1
  314. package/dist/rules/requireParam.js +0 -344
  315. package/dist/rules/requireParam.js.map +0 -1
  316. package/dist/rules/requireParamDescription.js +0 -59
  317. package/dist/rules/requireParamDescription.js.map +0 -1
  318. package/dist/rules/requireParamName.js +0 -36
  319. package/dist/rules/requireParamName.js.map +0 -1
  320. package/dist/rules/requireParamType.js +0 -59
  321. package/dist/rules/requireParamType.js.map +0 -1
  322. package/dist/rules/requireProperty.js +0 -35
  323. package/dist/rules/requireProperty.js.map +0 -1
  324. package/dist/rules/requirePropertyDescription.js +0 -21
  325. package/dist/rules/requirePropertyDescription.js.map +0 -1
  326. package/dist/rules/requirePropertyName.js +0 -21
  327. package/dist/rules/requirePropertyName.js.map +0 -1
  328. package/dist/rules/requirePropertyType.js +0 -21
  329. package/dist/rules/requirePropertyType.js.map +0 -1
  330. package/dist/rules/requireReturns.js +0 -131
  331. package/dist/rules/requireReturns.js.map +0 -1
  332. package/dist/rules/requireReturnsCheck.js +0 -66
  333. package/dist/rules/requireReturnsCheck.js.map +0 -1
  334. package/dist/rules/requireReturnsDescription.js +0 -43
  335. package/dist/rules/requireReturnsDescription.js.map +0 -1
  336. package/dist/rules/requireReturnsType.js +0 -36
  337. package/dist/rules/requireReturnsType.js.map +0 -1
  338. package/dist/rules/requireTemplate.js +0 -122
  339. package/dist/rules/requireTemplate.js.map +0 -1
  340. package/dist/rules/requireThrows.js +0 -67
  341. package/dist/rules/requireThrows.js.map +0 -1
  342. package/dist/rules/requireYields.js +0 -115
  343. package/dist/rules/requireYields.js.map +0 -1
  344. package/dist/rules/requireYieldsCheck.js +0 -105
  345. package/dist/rules/requireYieldsCheck.js.map +0 -1
  346. package/dist/rules/sortTags.js +0 -262
  347. package/dist/rules/sortTags.js.map +0 -1
  348. package/dist/rules/tagLines.js +0 -183
  349. package/dist/rules/tagLines.js.map +0 -1
  350. package/dist/rules/textEscaping.js +0 -102
  351. package/dist/rules/textEscaping.js.map +0 -1
  352. package/dist/rules/validTypes.js +0 -259
  353. package/dist/rules/validTypes.js.map +0 -1
  354. package/dist/tagNames.js +0 -144
  355. package/dist/tagNames.js.map +0 -1
  356. package/dist/utils/hasReturnValue.js +0 -265
  357. package/dist/utils/hasReturnValue.js.map +0 -1
@@ -1,412 +1,404 @@
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 eslint1 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): eslint1.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: eslint1.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
+ isVirtualFunction: IsVirtualFunction;
151
+ stringify: Stringify;
152
+ reportJSDoc: ReportJSDoc;
153
+ getRegexFromString: GetRegexFromString;
154
+ getTagDescription: GetTagDescription;
155
+ setTagDescription: SetTagDescription;
156
+ getDescription: GetDescription;
157
+ setBlockDescription: SetBlockDescription;
158
+ setDescriptionLines: SetDescriptionLines;
159
+ changeTag: ChangeTag;
160
+ setTag: SetTag;
161
+ removeTag: RemoveTag;
162
+ addTag: AddTag;
163
+ getFirstLine: GetFirstLine;
164
+ seedTokens: SeedTokens;
165
+ emptyTokens: EmptyTokens;
166
+ addLine: AddLine;
167
+ addLines: AddLines;
168
+ makeMultiline: MakeMultiline;
169
+ flattenRoots: import("./jsdocUtils.js").FlattenRoots;
170
+ getFunctionParameterNames: GetFunctionParameterNames;
171
+ hasParams: HasParams;
172
+ isGenerator: IsGenerator;
173
+ isConstructor: IsConstructor;
174
+ getJsdocTagsDeep: GetJsdocTagsDeep;
175
+ getPreferredTagName: GetPreferredTagName;
176
+ isValidTag: IsValidTag;
177
+ hasATag: HasATag;
178
+ hasTag: HasTag;
179
+ comparePaths: ComparePaths;
180
+ dropPathSegmentQuotes: DropPathSegmentQuotes;
181
+ avoidDocs: AvoidDocs;
182
+ tagMightHaveNamePosition: TagMightHaveNamePositionTypePosition;
183
+ tagMightHaveTypePosition: TagMightHaveNamePositionTypePosition;
184
+ tagMustHaveNamePosition: TagMustHave;
185
+ tagMustHaveTypePosition: TagMustHave;
186
+ tagMissingRequiredTypeOrNamepath: TagMissingRequiredTypeOrNamepath;
187
+ isNamepathDefiningTag: IsNamepathX;
188
+ isNamepathReferencingTag: IsNamepathX;
189
+ isNamepathOrUrlReferencingTag: IsNamepathX;
190
+ tagMightHaveNamepath: IsNamepathX;
191
+ getTagStructureForMode: GetTagStructureForMode;
192
+ mayBeUndefinedTypeTag: MayBeUndefinedTypeTag;
193
+ hasValueOrExecutorHasNonEmptyResolveValue: HasValueOrExecutorHasNonEmptyResolveValue;
194
+ hasYieldValue: HasYieldValue;
195
+ hasYieldReturnValue: HasYieldReturnValue;
196
+ hasThrowValue: HasThrowValue;
197
+ isAsync: IsAsync;
198
+ getTags: GetTags;
199
+ getPresentTags: GetPresentTags;
200
+ filterTags: FilterTags;
201
+ filterAllTags: FilterAllTags;
202
+ getTagsByType: GetTagsByType;
203
+ hasOptionTag: HasOptionTag;
204
+ getClassNode: GetClassNode;
205
+ getClassJsdoc: GetClassJsdoc;
206
+ classHasTag: ClassHasTag;
207
+ findContext: FindContext;
216
208
  };
217
209
  /**
218
210
  * Should use ESLint rule's typing.
219
211
  */
220
- type EslintRuleMeta = eslint1.Rule.RuleMetaData;
212
+ export type EslintRuleMeta = import("eslint").Rule.RuleMetaData;
221
213
  /**
222
214
  * A plain object for tracking state as needed by rules across iterations.
223
215
  */
224
- type StateObject = {
225
- globalTags: {};
226
- hasDuplicates: {
227
- [key: string]: boolean;
228
- };
229
- selectorMap: {
230
- [selector: string]: {
231
- [comment: string]: Integer;
216
+ export type StateObject = {
217
+ globalTags: {};
218
+ hasDuplicates: {
219
+ [key: string]: boolean;
220
+ };
221
+ selectorMap: {
222
+ [selector: string]: {
223
+ [comment: string]: Integer;
224
+ };
225
+ };
226
+ hasTag: {
227
+ [key: string]: boolean;
228
+ };
229
+ hasNonComment: number;
230
+ hasNonCommentBeforeTag: {
231
+ [key: string]: boolean | number;
232
232
  };
233
- };
234
- hasTag: {
235
- [key: string]: boolean;
236
- };
237
- hasNonComment: number;
238
- hasNonCommentBeforeTag: {
239
- [key: string]: boolean | number;
240
- };
241
233
  };
242
234
  /**
243
235
  * The Node AST as supplied by the parser.
244
236
  */
245
- type Node = eslint1.Rule.Node;
246
- type Report = (message: string, fix?: eslint1.Rule.ReportFixer | null | undefined, jsdocLoc?: {
247
- line?: Integer;
248
- column?: Integer;
249
- } | (comment_parser0.Spec & {
250
- line?: Integer;
237
+ export type Node = import("eslint").Rule.Node;
238
+ export type Report = (message: string, fix?: import("eslint").Rule.ReportFixer | null | undefined, jsdocLoc?: {
239
+ line?: Integer;
240
+ column?: Integer;
241
+ } | (import("comment-parser").Spec & {
242
+ line?: Integer;
251
243
  }) | null | undefined, data?: undefined | {
252
- [key: string]: string;
244
+ [key: string]: string;
253
245
  }) => void;
254
- type PreferredTypes = {
255
- [key: string]: false | string | {
256
- message: string;
257
- replacement?: false | string;
258
- skipRootChecking?: boolean;
259
- };
246
+ export type PreferredTypes = {
247
+ [key: string]: false | string | {
248
+ message: string;
249
+ replacement?: false | string;
250
+ skipRootChecking?: boolean;
251
+ };
260
252
  };
261
- type StructuredTags = {
262
- [key: string]: {
263
- name?: "text" | "namepath-defining" | "namepath-referencing" | false;
264
- type?: boolean | string[];
265
- required?: ("name" | "type" | "typeOrNameRequired")[];
266
- };
253
+ export type StructuredTags = {
254
+ [key: string]: {
255
+ name?: "text" | "namepath-defining" | "namepath-referencing" | false;
256
+ type?: boolean | string[];
257
+ required?: ("name" | "type" | "typeOrNameRequired")[];
258
+ };
267
259
  };
268
260
  /**
269
261
  * Settings from ESLint types.
270
262
  */
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[];
263
+ export type Settings = {
264
+ maxLines: Integer;
265
+ minLines: Integer;
266
+ tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
267
+ mode: import("./jsdocUtils.js").ParserMode;
268
+ preferredTypes: PreferredTypes;
269
+ structuredTags: StructuredTags;
270
+ [name: string]: any;
271
+ contexts?: Context[];
280
272
  };
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[];
273
+ export type JSDocSettings = {
274
+ settings?: {
275
+ jsdoc?: {
276
+ ignorePrivate: boolean;
277
+ ignoreInternal: boolean;
278
+ maxLines: Integer;
279
+ minLines: Integer;
280
+ tagNamePreference: import("./jsdocUtils.js").TagNamePreference;
281
+ preferredTypes: PreferredTypes;
282
+ structuredTags: StructuredTags;
283
+ overrideReplacesDocs: boolean;
284
+ ignoreReplacesDocs: boolean;
285
+ implementsReplacesDocs: boolean;
286
+ augmentsExtendsReplacesDocs: boolean;
287
+ exemptDestructuredRootsFromChecks: boolean;
288
+ mode: import("./jsdocUtils.js").ParserMode;
289
+ contexts: Context[];
290
+ };
298
291
  };
299
- };
300
292
  };
301
293
  /**
302
294
  * Create the report function
303
295
  */
304
- type MakeReport = (context: eslint1.Rule.RuleContext, commentNode: estree0.Node) => Report;
305
- type JsdocVisitorBasic = (arg: {
306
- context: eslint1.Rule.RuleContext;
307
- sourceCode: eslint1.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?: eslint1.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: eslint1.Rule.RuleContext;
328
- sourceCode: eslint1.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: eslint1.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;
296
+ export type MakeReport = (context: import("eslint").Rule.RuleContext, commentNode: import("estree").Node) => Report;
297
+ export type JsdocVisitorBasic = (arg: {
298
+ context: import("eslint").Rule.RuleContext;
299
+ sourceCode: import("eslint").SourceCode;
300
+ indent?: string;
301
+ info?: {
302
+ comment?: string | undefined;
303
+ lastIndex?: Integer | undefined;
304
+ };
305
+ state?: StateObject;
306
+ globalState?: Map<string, Map<string, string>>;
307
+ jsdoc?: JsdocBlockWithInline;
308
+ jsdocNode?: import("eslint").Rule.Node & {
309
+ range: [number, number];
310
+ };
311
+ node?: Node;
312
+ allComments?: import("estree").Node[];
313
+ report?: Report;
314
+ makeReport?: MakeReport;
315
+ settings: Settings;
316
+ utils: BasicUtils;
346
317
  }) => 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: eslint1.Rule.RuleContext;
318
+ export type JsdocVisitor = (arg: {
319
+ context: import("eslint").Rule.RuleContext;
320
+ sourceCode: import("eslint").SourceCode;
321
+ indent: string;
322
+ info: {
323
+ comment?: string | undefined;
324
+ lastIndex?: Integer | undefined;
325
+ };
401
326
  state: StateObject;
327
+ globalState: Map<string, Map<string, string>>;
328
+ jsdoc: JsdocBlockWithInline;
329
+ jsdocNode: import("eslint").Rule.Node & {
330
+ range: [number, number];
331
+ };
332
+ node: Node | null;
333
+ allComments?: import("estree").Node[];
334
+ report: Report;
335
+ makeReport?: MakeReport;
402
336
  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;
337
+ utils: Utils;
338
+ }) => any;
339
+ export type NonCommentArgs = {
340
+ node: Node & {
341
+ range: [number, number];
342
+ };
343
+ state: StateObject;
344
+ };
345
+ export type RuleConfig = {
346
+ /**
347
+ * ESLint rule meta
348
+ */
349
+ meta: EslintRuleMeta;
350
+ /**
351
+ * Any default contexts
352
+ */
353
+ contextDefaults?: jsdocUtils.DefaultContexts | undefined;
354
+ /**
355
+ * Whether to force a `contexts` check
356
+ */
357
+ contextSelected?: true | undefined;
358
+ /**
359
+ * Whether to iterate all JSDoc blocks by default
360
+ * regardless of context
361
+ */
362
+ iterateAllJsdocs?: true | undefined;
363
+ /**
364
+ * Whether to check `@private` blocks (normally exempted)
365
+ */
366
+ checkPrivate?: true | undefined;
367
+ /**
368
+ * Whether to check `@internal` blocks (normally exempted)
369
+ */
370
+ checkInternal?: true | undefined;
371
+ /**
372
+ * Whether to iterates over all JSDoc blocks regardless of attachment
373
+ */
374
+ checkFile?: true | undefined;
375
+ /**
376
+ * Whether to avoid relying on settings for global contexts
377
+ */
378
+ nonGlobalSettings?: true | undefined;
379
+ /**
380
+ * Whether to disable the tracking of visited comment nodes (as
381
+ * non-tracked may conduct further actions)
382
+ */
383
+ noTracking?: true | undefined;
384
+ /**
385
+ * Whether the rule expects contexts to be based on a match option
386
+ */
387
+ matchContext?: true | undefined;
388
+ /**
389
+ * Handler to be executed upon exiting iteration of program AST
390
+ */
391
+ exit?: ((args: {
392
+ context: import("eslint").Rule.RuleContext;
393
+ state: StateObject;
394
+ settings: Settings;
395
+ utils: BasicUtils;
396
+ }) => void) | undefined;
397
+ /**
398
+ * Handler to be executed if rule wishes
399
+ * to be supplied nodes without comments
400
+ */
401
+ nonComment?: ((nca: NonCommentArgs) => void) | undefined;
410
402
  };
411
403
  /**
412
404
  * @typedef {{
@@ -465,7 +457,6 @@ type RuleConfig = {
465
457
  * @param {import('eslint').Rule.RuleContext & JSDocSettings} context
466
458
  * @returns {Settings|false}
467
459
  */
468
- declare function getSettings(context: eslint1.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 };
460
+ export function getSettings(context: import("eslint").Rule.RuleContext & JSDocSettings): Settings | false;
461
+ import * as jsdocUtils from './jsdocUtils.js';
471
462
  //# sourceMappingURL=iterateJsdoc.d.ts.map