eslint-plugin-jsdoc 52.0.4 → 53.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 +18 -35
  2. package/dist/WarnSettings.cjs.map +1 -1
  3. package/dist/WarnSettings.js +20 -0
  4. package/dist/WarnSettings.js.map +1 -0
  5. package/dist/_virtual/rolldown_runtime.cjs +32 -0
  6. package/dist/_virtual/rolldown_runtime.js +11 -0
  7. package/dist/alignTransform.cjs +224 -305
  8. package/dist/alignTransform.cjs.map +1 -1
  9. package/dist/alignTransform.js +241 -0
  10. package/dist/alignTransform.js.map +1 -0
  11. package/dist/defaultTagOrder.cjs +132 -43
  12. package/dist/defaultTagOrder.cjs.map +1 -1
  13. package/dist/defaultTagOrder.js +134 -0
  14. package/dist/defaultTagOrder.js.map +1 -0
  15. package/dist/exportParser.cjs +478 -696
  16. package/dist/exportParser.cjs.map +1 -1
  17. package/dist/exportParser.js +518 -0
  18. package/dist/exportParser.js.map +1 -0
  19. package/dist/getDefaultTagStructureForMode.cjs +184 -288
  20. package/dist/getDefaultTagStructureForMode.cjs.map +1 -1
  21. package/dist/getDefaultTagStructureForMode.js +188 -0
  22. package/dist/getDefaultTagStructureForMode.js.map +1 -0
  23. package/dist/getJsdocProcessorPlugin.cjs +364 -550
  24. package/dist/getJsdocProcessorPlugin.cjs.map +1 -1
  25. package/dist/getJsdocProcessorPlugin.d.cts +70 -0
  26. package/dist/getJsdocProcessorPlugin.d.cts.map +1 -0
  27. package/dist/getJsdocProcessorPlugin.d.ts +68 -65
  28. package/dist/getJsdocProcessorPlugin.d.ts.map +1 -1
  29. package/dist/getJsdocProcessorPlugin.js +383 -0
  30. package/dist/getJsdocProcessorPlugin.js.map +1 -0
  31. package/dist/index.cjs +2 -410
  32. package/dist/index.d.cts +2 -0
  33. package/dist/index.d.ts +2 -17
  34. package/dist/index.js +3 -0
  35. package/dist/iterateJsdoc.cjs +1528 -1988
  36. package/dist/iterateJsdoc.cjs.map +1 -1
  37. package/dist/iterateJsdoc.d.cts +471 -0
  38. package/dist/iterateJsdoc.d.cts.map +1 -0
  39. package/dist/iterateJsdoc.d.ts +358 -349
  40. package/dist/iterateJsdoc.d.ts.map +1 -1
  41. package/dist/iterateJsdoc.js +1617 -0
  42. package/dist/iterateJsdoc.js.map +1 -0
  43. package/dist/jsdocUtils.cjs +1009 -1376
  44. package/dist/jsdocUtils.cjs.map +1 -1
  45. package/dist/jsdocUtils.js +1123 -0
  46. package/dist/jsdocUtils.js.map +1 -0
  47. package/dist/plugin.cjs +427 -0
  48. package/dist/plugin.cjs.map +1 -0
  49. package/dist/plugin.js +427 -0
  50. package/dist/plugin.js.map +1 -0
  51. package/dist/rules/checkAccess.cjs +29 -36
  52. package/dist/rules/checkAccess.cjs.map +1 -1
  53. package/dist/rules/checkAccess.js +33 -0
  54. package/dist/rules/checkAccess.js.map +1 -0
  55. package/dist/rules/checkAlignment.cjs +41 -54
  56. package/dist/rules/checkAlignment.cjs.map +1 -1
  57. package/dist/rules/checkAlignment.js +47 -0
  58. package/dist/rules/checkAlignment.js.map +1 -0
  59. package/dist/rules/checkExamples.cjs +327 -484
  60. package/dist/rules/checkExamples.cjs.map +1 -1
  61. package/dist/rules/checkExamples.js +348 -0
  62. package/dist/rules/checkExamples.js.map +1 -0
  63. package/dist/rules/checkIndentation.cjs +50 -65
  64. package/dist/rules/checkIndentation.cjs.map +1 -1
  65. package/dist/rules/checkIndentation.js +59 -0
  66. package/dist/rules/checkIndentation.js.map +1 -0
  67. package/dist/rules/checkLineAlignment.cjs +220 -311
  68. package/dist/rules/checkLineAlignment.cjs.map +1 -1
  69. package/dist/rules/checkLineAlignment.js +229 -0
  70. package/dist/rules/checkLineAlignment.js.map +1 -0
  71. package/dist/rules/checkParamNames.cjs +227 -335
  72. package/dist/rules/checkParamNames.cjs.map +1 -1
  73. package/dist/rules/checkParamNames.js +237 -0
  74. package/dist/rules/checkParamNames.js.map +1 -0
  75. package/dist/rules/checkPropertyNames.cjs +78 -106
  76. package/dist/rules/checkPropertyNames.cjs.map +1 -1
  77. package/dist/rules/checkPropertyNames.js +88 -0
  78. package/dist/rules/checkPropertyNames.js.map +1 -0
  79. package/dist/rules/checkSyntax.cjs +21 -34
  80. package/dist/rules/checkSyntax.cjs.map +1 -1
  81. package/dist/rules/checkSyntax.js +25 -0
  82. package/dist/rules/checkSyntax.js.map +1 -0
  83. package/dist/rules/checkTagNames.cjs +188 -210
  84. package/dist/rules/checkTagNames.cjs.map +1 -1
  85. package/dist/rules/checkTagNames.js +191 -0
  86. package/dist/rules/checkTagNames.js.map +1 -0
  87. package/dist/rules/checkTemplateNames.cjs +121 -178
  88. package/dist/rules/checkTemplateNames.cjs.map +1 -1
  89. package/dist/rules/checkTemplateNames.js +124 -0
  90. package/dist/rules/checkTemplateNames.js.map +1 -0
  91. package/dist/rules/checkTypes.cjs +291 -385
  92. package/dist/rules/checkTypes.cjs.map +1 -1
  93. package/dist/rules/checkTypes.js +299 -0
  94. package/dist/rules/checkTypes.js.map +1 -0
  95. package/dist/rules/checkValues.cjs +100 -146
  96. package/dist/rules/checkValues.cjs.map +1 -1
  97. package/dist/rules/checkValues.js +103 -0
  98. package/dist/rules/checkValues.js.map +1 -0
  99. package/dist/rules/convertToJsdocComments.cjs +228 -306
  100. package/dist/rules/convertToJsdocComments.cjs.map +1 -1
  101. package/dist/rules/convertToJsdocComments.js +231 -0
  102. package/dist/rules/convertToJsdocComments.js.map +1 -0
  103. package/dist/rules/emptyTags.cjs +62 -72
  104. package/dist/rules/emptyTags.cjs.map +1 -1
  105. package/dist/rules/emptyTags.js +67 -0
  106. package/dist/rules/emptyTags.js.map +1 -0
  107. package/dist/rules/implementsOnClasses.cjs +36 -56
  108. package/dist/rules/implementsOnClasses.cjs.map +1 -1
  109. package/dist/rules/implementsOnClasses.js +40 -0
  110. package/dist/rules/implementsOnClasses.js.map +1 -0
  111. package/dist/rules/importsAsDependencies.cjs +62 -99
  112. package/dist/rules/importsAsDependencies.cjs.map +1 -1
  113. package/dist/rules/importsAsDependencies.js +68 -0
  114. package/dist/rules/importsAsDependencies.js.map +1 -0
  115. package/dist/rules/informativeDocs.cjs +105 -142
  116. package/dist/rules/informativeDocs.cjs.map +1 -1
  117. package/dist/rules/informativeDocs.js +110 -0
  118. package/dist/rules/informativeDocs.js.map +1 -0
  119. package/dist/rules/linesBeforeBlock.cjs +70 -105
  120. package/dist/rules/linesBeforeBlock.cjs.map +1 -1
  121. package/dist/rules/linesBeforeBlock.js +75 -0
  122. package/dist/rules/linesBeforeBlock.js.map +1 -0
  123. package/dist/rules/matchDescription.cjs +160 -222
  124. package/dist/rules/matchDescription.cjs.map +1 -1
  125. package/dist/rules/matchDescription.js +167 -0
  126. package/dist/rules/matchDescription.js.map +1 -0
  127. package/dist/rules/matchName.cjs +73 -128
  128. package/dist/rules/matchName.cjs.map +1 -1
  129. package/dist/rules/matchName.js +77 -0
  130. package/dist/rules/matchName.js.map +1 -0
  131. package/dist/rules/multilineBlocks.cjs +235 -352
  132. package/dist/rules/multilineBlocks.cjs.map +1 -1
  133. package/dist/rules/multilineBlocks.js +245 -0
  134. package/dist/rules/multilineBlocks.js.map +1 -0
  135. package/dist/rules/noBadBlocks.cjs +63 -86
  136. package/dist/rules/noBadBlocks.cjs.map +1 -1
  137. package/dist/rules/noBadBlocks.js +68 -0
  138. package/dist/rules/noBadBlocks.js.map +1 -0
  139. package/dist/rules/noBlankBlockDescriptions.cjs +35 -57
  140. package/dist/rules/noBlankBlockDescriptions.cjs.map +1 -1
  141. package/dist/rules/noBlankBlockDescriptions.js +41 -0
  142. package/dist/rules/noBlankBlockDescriptions.js.map +1 -0
  143. package/dist/rules/noBlankBlocks.cjs +26 -48
  144. package/dist/rules/noBlankBlocks.cjs.map +1 -1
  145. package/dist/rules/noBlankBlocks.js +30 -0
  146. package/dist/rules/noBlankBlocks.js.map +1 -0
  147. package/dist/rules/noDefaults.cjs +52 -79
  148. package/dist/rules/noDefaults.cjs.map +1 -1
  149. package/dist/rules/noDefaults.js +56 -0
  150. package/dist/rules/noDefaults.js.map +1 -0
  151. package/dist/rules/noMissingSyntax.cjs +115 -165
  152. package/dist/rules/noMissingSyntax.cjs.map +1 -1
  153. package/dist/rules/noMissingSyntax.js +126 -0
  154. package/dist/rules/noMissingSyntax.js.map +1 -0
  155. package/dist/rules/noMultiAsterisks.cjs +48 -89
  156. package/dist/rules/noMultiAsterisks.cjs.map +1 -1
  157. package/dist/rules/noMultiAsterisks.js +58 -0
  158. package/dist/rules/noMultiAsterisks.js.map +1 -0
  159. package/dist/rules/noRestrictedSyntax.cjs +45 -79
  160. package/dist/rules/noRestrictedSyntax.cjs.map +1 -1
  161. package/dist/rules/noRestrictedSyntax.js +49 -0
  162. package/dist/rules/noRestrictedSyntax.js.map +1 -0
  163. package/dist/rules/noTypes.cjs +59 -80
  164. package/dist/rules/noTypes.cjs.map +1 -1
  165. package/dist/rules/noTypes.js +65 -0
  166. package/dist/rules/noTypes.js.map +1 -0
  167. package/dist/rules/noUndefinedTypes.cjs +297 -388
  168. package/dist/rules/noUndefinedTypes.cjs.map +1 -1
  169. package/dist/rules/noUndefinedTypes.js +303 -0
  170. package/dist/rules/noUndefinedTypes.js.map +1 -0
  171. package/dist/rules/requireAsteriskPrefix.cjs +108 -159
  172. package/dist/rules/requireAsteriskPrefix.cjs.map +1 -1
  173. package/dist/rules/requireAsteriskPrefix.js +112 -0
  174. package/dist/rules/requireAsteriskPrefix.js.map +1 -0
  175. package/dist/rules/requireDescription.cjs +89 -129
  176. package/dist/rules/requireDescription.cjs.map +1 -1
  177. package/dist/rules/requireDescription.js +95 -0
  178. package/dist/rules/requireDescription.js.map +1 -0
  179. package/dist/rules/requireDescriptionCompleteSentence.cjs +201 -262
  180. package/dist/rules/requireDescriptionCompleteSentence.cjs.map +1 -1
  181. package/dist/rules/requireDescriptionCompleteSentence.js +220 -0
  182. package/dist/rules/requireDescriptionCompleteSentence.js.map +1 -0
  183. package/dist/rules/requireExample.cjs +73 -104
  184. package/dist/rules/requireExample.cjs.map +1 -1
  185. package/dist/rules/requireExample.js +77 -0
  186. package/dist/rules/requireExample.js.map +1 -0
  187. package/dist/rules/requireFileOverview.cjs +75 -129
  188. package/dist/rules/requireFileOverview.cjs.map +1 -1
  189. package/dist/rules/requireFileOverview.js +81 -0
  190. package/dist/rules/requireFileOverview.js.map +1 -0
  191. package/dist/rules/requireHyphenBeforeParamDescription.cjs +85 -133
  192. package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +1 -1
  193. package/dist/rules/requireHyphenBeforeParamDescription.js +89 -0
  194. package/dist/rules/requireHyphenBeforeParamDescription.js.map +1 -0
  195. package/dist/rules/requireJsdoc.cjs +384 -557
  196. package/dist/rules/requireJsdoc.cjs.map +1 -1
  197. package/dist/rules/requireJsdoc.js +404 -0
  198. package/dist/rules/requireJsdoc.js.map +1 -0
  199. package/dist/rules/requireParam.cjs +336 -526
  200. package/dist/rules/requireParam.cjs.map +1 -1
  201. package/dist/rules/requireParam.js +344 -0
  202. package/dist/rules/requireParam.js.map +1 -0
  203. package/dist/rules/requireParamDescription.cjs +55 -80
  204. package/dist/rules/requireParamDescription.cjs.map +1 -1
  205. package/dist/rules/requireParamDescription.js +59 -0
  206. package/dist/rules/requireParamDescription.js.map +1 -0
  207. package/dist/rules/requireParamName.cjs +32 -50
  208. package/dist/rules/requireParamName.cjs.map +1 -1
  209. package/dist/rules/requireParamName.js +36 -0
  210. package/dist/rules/requireParamName.js.map +1 -0
  211. package/dist/rules/requireParamType.cjs +55 -80
  212. package/dist/rules/requireParamType.cjs.map +1 -1
  213. package/dist/rules/requireParamType.js +59 -0
  214. package/dist/rules/requireParamType.js.map +1 -0
  215. package/dist/rules/requireProperty.cjs +31 -42
  216. package/dist/rules/requireProperty.cjs.map +1 -1
  217. package/dist/rules/requireProperty.js +35 -0
  218. package/dist/rules/requireProperty.js.map +1 -0
  219. package/dist/rules/requirePropertyDescription.cjs +17 -25
  220. package/dist/rules/requirePropertyDescription.cjs.map +1 -1
  221. package/dist/rules/requirePropertyDescription.js +21 -0
  222. package/dist/rules/requirePropertyDescription.js.map +1 -0
  223. package/dist/rules/requirePropertyName.cjs +17 -25
  224. package/dist/rules/requirePropertyName.cjs.map +1 -1
  225. package/dist/rules/requirePropertyName.js +21 -0
  226. package/dist/rules/requirePropertyName.js.map +1 -0
  227. package/dist/rules/requirePropertyType.cjs +17 -25
  228. package/dist/rules/requirePropertyType.cjs.map +1 -1
  229. package/dist/rules/requirePropertyType.js +21 -0
  230. package/dist/rules/requirePropertyType.js.map +1 -0
  231. package/dist/rules/requireReturns.cjs +125 -203
  232. package/dist/rules/requireReturns.cjs.map +1 -1
  233. package/dist/rules/requireReturns.js +131 -0
  234. package/dist/rules/requireReturns.js.map +1 -0
  235. package/dist/rules/requireReturnsCheck.cjs +60 -103
  236. package/dist/rules/requireReturnsCheck.cjs.map +1 -1
  237. package/dist/rules/requireReturnsCheck.js +66 -0
  238. package/dist/rules/requireReturnsCheck.js.map +1 -0
  239. package/dist/rules/requireReturnsDescription.cjs +39 -54
  240. package/dist/rules/requireReturnsDescription.cjs.map +1 -1
  241. package/dist/rules/requireReturnsDescription.js +43 -0
  242. package/dist/rules/requireReturnsDescription.js.map +1 -0
  243. package/dist/rules/requireReturnsType.cjs +32 -50
  244. package/dist/rules/requireReturnsType.cjs.map +1 -1
  245. package/dist/rules/requireReturnsType.js +36 -0
  246. package/dist/rules/requireReturnsType.js.map +1 -0
  247. package/dist/rules/requireTemplate.cjs +119 -178
  248. package/dist/rules/requireTemplate.cjs.map +1 -1
  249. package/dist/rules/requireTemplate.js +122 -0
  250. package/dist/rules/requireTemplate.js.map +1 -0
  251. package/dist/rules/requireThrows.cjs +61 -95
  252. package/dist/rules/requireThrows.cjs.map +1 -1
  253. package/dist/rules/requireThrows.js +67 -0
  254. package/dist/rules/requireThrows.js.map +1 -0
  255. package/dist/rules/requireYields.cjs +106 -166
  256. package/dist/rules/requireYields.cjs.map +1 -1
  257. package/dist/rules/requireYields.js +115 -0
  258. package/dist/rules/requireYields.js.map +1 -0
  259. package/dist/rules/requireYieldsCheck.cjs +96 -152
  260. package/dist/rules/requireYieldsCheck.cjs.map +1 -1
  261. package/dist/rules/requireYieldsCheck.js +105 -0
  262. package/dist/rules/requireYieldsCheck.js.map +1 -0
  263. package/dist/rules/sortTags.cjs +258 -444
  264. package/dist/rules/sortTags.cjs.map +1 -1
  265. package/dist/rules/sortTags.js +262 -0
  266. package/dist/rules/sortTags.js.map +1 -0
  267. package/dist/rules/tagLines.cjs +179 -266
  268. package/dist/rules/tagLines.cjs.map +1 -1
  269. package/dist/rules/tagLines.js +183 -0
  270. package/dist/rules/tagLines.js.map +1 -0
  271. package/dist/rules/textEscaping.cjs +92 -127
  272. package/dist/rules/textEscaping.cjs.map +1 -1
  273. package/dist/rules/textEscaping.js +102 -0
  274. package/dist/rules/textEscaping.js.map +1 -0
  275. package/dist/rules/validTypes.cjs +252 -265
  276. package/dist/rules/validTypes.cjs.map +1 -1
  277. package/dist/rules/validTypes.js +259 -0
  278. package/dist/rules/validTypes.js.map +1 -0
  279. package/dist/tagNames.cjs +134 -170
  280. package/dist/tagNames.cjs.map +1 -1
  281. package/dist/tagNames.js +144 -0
  282. package/dist/tagNames.js.map +1 -0
  283. package/dist/utils/hasReturnValue.cjs +246 -474
  284. package/dist/utils/hasReturnValue.cjs.map +1 -1
  285. package/dist/utils/hasReturnValue.js +265 -0
  286. package/dist/utils/hasReturnValue.js.map +1 -0
  287. package/package.json +40 -24
  288. package/dist/generateRule.cjs +0 -242
  289. package/dist/generateRule.cjs.map +0 -1
  290. package/dist/index.cjs.map +0 -1
  291. package/dist/index.d.ts.map +0 -1
  292. package/src/WarnSettings.js +0 -34
  293. package/src/alignTransform.js +0 -358
  294. package/src/defaultTagOrder.js +0 -169
  295. package/src/exportParser.js +0 -978
  296. package/src/getDefaultTagStructureForMode.js +0 -969
  297. package/src/getJsdocProcessorPlugin.js +0 -672
  298. package/src/index.js +0 -530
  299. package/src/iterateJsdoc.js +0 -2518
  300. package/src/jsdocUtils.js +0 -1896
  301. package/src/rules/checkAccess.js +0 -45
  302. package/src/rules/checkAlignment.js +0 -63
  303. package/src/rules/checkExamples.js +0 -589
  304. package/src/rules/checkIndentation.js +0 -75
  305. package/src/rules/checkLineAlignment.js +0 -372
  306. package/src/rules/checkParamNames.js +0 -474
  307. package/src/rules/checkPropertyNames.js +0 -152
  308. package/src/rules/checkSyntax.js +0 -30
  309. package/src/rules/checkTagNames.js +0 -314
  310. package/src/rules/checkTemplateNames.js +0 -204
  311. package/src/rules/checkTypes.js +0 -535
  312. package/src/rules/checkValues.js +0 -248
  313. package/src/rules/convertToJsdocComments.js +0 -398
  314. package/src/rules/emptyTags.js +0 -98
  315. package/src/rules/implementsOnClasses.js +0 -64
  316. package/src/rules/importsAsDependencies.js +0 -133
  317. package/src/rules/informativeDocs.js +0 -189
  318. package/src/rules/linesBeforeBlock.js +0 -134
  319. package/src/rules/matchDescription.js +0 -286
  320. package/src/rules/matchName.js +0 -151
  321. package/src/rules/multilineBlocks.js +0 -493
  322. package/src/rules/noBadBlocks.js +0 -119
  323. package/src/rules/noBlankBlockDescriptions.js +0 -69
  324. package/src/rules/noBlankBlocks.js +0 -53
  325. package/src/rules/noDefaults.js +0 -85
  326. package/src/rules/noMissingSyntax.js +0 -195
  327. package/src/rules/noMultiAsterisks.js +0 -134
  328. package/src/rules/noRestrictedSyntax.js +0 -91
  329. package/src/rules/noTypes.js +0 -93
  330. package/src/rules/noUndefinedTypes.js +0 -543
  331. package/src/rules/requireAsteriskPrefix.js +0 -190
  332. package/src/rules/requireDescription.js +0 -161
  333. package/src/rules/requireDescriptionCompleteSentence.js +0 -335
  334. package/src/rules/requireExample.js +0 -118
  335. package/src/rules/requireFileOverview.js +0 -154
  336. package/src/rules/requireHyphenBeforeParamDescription.js +0 -176
  337. package/src/rules/requireJsdoc.js +0 -743
  338. package/src/rules/requireParam.js +0 -602
  339. package/src/rules/requireParamDescription.js +0 -89
  340. package/src/rules/requireParamName.js +0 -55
  341. package/src/rules/requireParamType.js +0 -89
  342. package/src/rules/requireProperty.js +0 -48
  343. package/src/rules/requirePropertyDescription.js +0 -25
  344. package/src/rules/requirePropertyName.js +0 -25
  345. package/src/rules/requirePropertyType.js +0 -25
  346. package/src/rules/requireReturns.js +0 -238
  347. package/src/rules/requireReturnsCheck.js +0 -145
  348. package/src/rules/requireReturnsDescription.js +0 -59
  349. package/src/rules/requireReturnsType.js +0 -51
  350. package/src/rules/requireTemplate.js +0 -201
  351. package/src/rules/requireThrows.js +0 -111
  352. package/src/rules/requireYields.js +0 -216
  353. package/src/rules/requireYieldsCheck.js +0 -208
  354. package/src/rules/sortTags.js +0 -558
  355. package/src/rules/tagLines.js +0 -359
  356. package/src/rules/textEscaping.js +0 -154
  357. package/src/rules/validTypes.js +0 -401
  358. package/src/tagNames.js +0 -238
  359. package/src/utils/hasReturnValue.js +0 -572
@@ -1,969 +0,0 @@
1
- /**
2
- * @typedef {Map<string, Map<string, (string|boolean)>>} TagStructure
3
- */
4
- /**
5
- * @param {import('./jsdocUtils.js').ParserMode} mode
6
- * @returns {TagStructure}
7
- */
8
- const getDefaultTagStructureForMode = (mode) => {
9
- const isJsdoc = mode === 'jsdoc';
10
- const isClosure = mode === 'closure';
11
- const isTypescript = mode === 'typescript';
12
- const isPermissive = mode === 'permissive';
13
-
14
- const isJsdocOrPermissive = isJsdoc || isPermissive;
15
- const isJsdocOrTypescript = isJsdoc || isTypescript;
16
- const isTypescriptOrClosure = isTypescript || isClosure;
17
- const isClosureOrPermissive = isClosure || isPermissive;
18
- const isJsdocTypescriptOrPermissive = isJsdocOrTypescript || isPermissive;
19
-
20
- // Properties:
21
- // `namepathRole` - 'namepath-referencing'|'namepath-defining'|'namepath-or-url-referencing'|'text'|false
22
- // `typeAllowed` - boolean
23
- // `nameRequired` - boolean
24
- // `typeRequired` - boolean
25
- // `typeOrNameRequired` - boolean
26
-
27
- // All of `typeAllowed` have a signature with "type" except for
28
- // `augments`/`extends` ("namepath")
29
- // `param`/`arg`/`argument` (no signature)
30
- // `property`/`prop` (no signature)
31
- // `modifies` (undocumented)
32
-
33
- // None of the `namepathRole: 'namepath-defining'` show as having curly
34
- // brackets for their name/namepath
35
-
36
- // Among `namepath-defining` and `namepath-referencing`, these do not seem
37
- // to allow curly brackets in their doc signature or examples (`modifies`
38
- // references namepaths within its type brackets and `param` is
39
- // name-defining but not namepath-defining, so not part of these groups)
40
-
41
- // Todo: Should support special processing for "name" as distinct from
42
- // "namepath" (e.g., param can't define a namepath)
43
-
44
- // Todo: Should support a `tutorialID` type (for `@tutorial` block and
45
- // inline)
46
-
47
- /**
48
- * @type {TagStructure}
49
- */
50
- return new Map([
51
- [
52
- 'alias', new Map(/** @type {[string, string|boolean][]} */ ([
53
- // Signature seems to require a "namepath" (and no counter-examples)
54
- [
55
- 'namepathRole', 'namepath-defining',
56
- ],
57
-
58
- // "namepath"
59
- [
60
- 'typeOrNameRequired', true,
61
- ],
62
- ])),
63
- ],
64
-
65
- [
66
- 'arg', new Map(/** @type {[string, string|boolean][]} */ ([
67
- [
68
- 'namepathRole', 'namepath-defining',
69
- ],
70
-
71
- // See `param`
72
- [
73
- 'nameRequired', true,
74
- ],
75
-
76
- // Has no formal signature in the docs but shows curly brackets
77
- // in the examples
78
- [
79
- 'typeAllowed', true,
80
- ],
81
- ])),
82
- ],
83
-
84
- [
85
- 'argument', new Map(/** @type {[string, string|boolean][]} */ ([
86
- [
87
- 'namepathRole', 'namepath-defining',
88
- ],
89
-
90
- // See `param`
91
- [
92
- 'nameRequired', true,
93
- ],
94
-
95
- // Has no formal signature in the docs but shows curly brackets
96
- // in the examples
97
- [
98
- 'typeAllowed', true,
99
- ],
100
- ])),
101
- ],
102
-
103
- [
104
- 'augments', new Map(/** @type {[string, string|boolean][]} */ ([
105
- // Signature seems to require a "namepath" (and no counter-examples)
106
- [
107
- 'namepathRole', 'namepath-referencing',
108
- ],
109
-
110
- // Does not show curly brackets in either the signature or examples
111
- [
112
- 'typeAllowed', true,
113
- ],
114
-
115
- // "namepath"
116
- [
117
- 'typeOrNameRequired', true,
118
- ],
119
- ])),
120
- ],
121
-
122
- [
123
- 'borrows', new Map(/** @type {[string, string|boolean][]} */ ([
124
- // `borrows` has a different format, however, so needs special parsing;
125
- // seems to require both, and as "namepath"'s
126
- [
127
- 'namepathRole', 'namepath-referencing',
128
- ],
129
-
130
- // "namepath"
131
- [
132
- 'typeOrNameRequired', true,
133
- ],
134
- ])),
135
- ],
136
-
137
- [
138
- 'callback', new Map(/** @type {[string, string|boolean][]} */ ([
139
- // Seems to require a "namepath" in the signature (with no
140
- // counter-examples); TypeScript does not enforce but seems
141
- // problematic as not attached so presumably not useable without it
142
- [
143
- 'namepathRole', 'namepath-defining',
144
- ],
145
-
146
- // "namepath"
147
- [
148
- 'nameRequired', true,
149
- ],
150
- ])),
151
- ],
152
-
153
- [
154
- 'class', new Map(/** @type {[string, string|boolean][]} */ ([
155
- // Not in use, but should be this value if using to power `empty-tags`
156
- [
157
- 'nameAllowed', true,
158
- ],
159
-
160
- // Allows for "name"'s in signature, but indicated as optional
161
- [
162
- 'namepathRole', 'namepath-defining',
163
- ],
164
-
165
- [
166
- 'typeAllowed', true,
167
- ],
168
- ])),
169
- ],
170
-
171
- [
172
- 'const', new Map(/** @type {[string, string|boolean][]} */ ([
173
- // Allows for "name"'s in signature, but indicated as optional
174
- [
175
- 'namepathRole', 'namepath-defining',
176
- ],
177
-
178
- [
179
- 'typeAllowed', true,
180
- ],
181
- ])),
182
- ],
183
- [
184
- 'constant', new Map(/** @type {[string, string|boolean][]} */ ([
185
- // Allows for "name"'s in signature, but indicated as optional
186
- [
187
- 'namepathRole', 'namepath-defining',
188
- ],
189
-
190
- [
191
- 'typeAllowed', true,
192
- ],
193
- ])),
194
- ],
195
- [
196
- 'constructor', new Map(/** @type {[string, string|boolean][]} */ ([
197
- // Allows for "name"'s in signature, but indicated as optional
198
- [
199
- 'namepathRole', 'namepath-defining',
200
- ],
201
-
202
- [
203
- 'typeAllowed', true,
204
- ],
205
- ])),
206
- ],
207
-
208
- [
209
- 'constructs', new Map(/** @type {[string, string|boolean][]} */ ([
210
- // Allows for "name"'s in signature, but indicated as optional
211
- [
212
- 'namepathRole', 'namepath-defining',
213
- ],
214
-
215
- [
216
- 'nameRequired', false,
217
- ],
218
-
219
- [
220
- 'typeAllowed', false,
221
- ],
222
- ])),
223
- ],
224
-
225
- [
226
- 'define', new Map(/** @type {[string, string|boolean][]} */ ([
227
- [
228
- 'typeRequired', isClosure,
229
- ],
230
- ])),
231
- ],
232
-
233
- [
234
- 'emits', new Map(/** @type {[string, string|boolean][]} */ ([
235
- // Signature seems to require a "name" (of an event) and no counter-examples
236
- [
237
- 'namepathRole', 'namepath-referencing',
238
- ],
239
-
240
- [
241
- 'nameRequired', true,
242
- ],
243
-
244
- [
245
- 'typeAllowed', false,
246
- ],
247
- ])),
248
- ],
249
-
250
- [
251
- 'enum', new Map(/** @type {[string, string|boolean][]} */ ([
252
- // Has example showing curly brackets but not in doc signature
253
- [
254
- 'typeAllowed', true,
255
- ],
256
- ])),
257
- ],
258
-
259
- [
260
- 'event', new Map(/** @type {[string, string|boolean][]} */ ([
261
- // Appears to require a "name" in its signature, albeit somewhat
262
- // different from other "name"'s (including as described
263
- // at https://jsdoc.app/about-namepaths.html )
264
- [
265
- 'namepathRole', 'namepath-defining',
266
- ],
267
-
268
- // The doc signature of `event` seems to require a "name"
269
- [
270
- 'nameRequired', true,
271
- ],
272
- ])),
273
- ],
274
-
275
- [
276
- 'exception', new Map(/** @type {[string, string|boolean][]} */ ([
277
- // Shows curly brackets in the signature and in the examples
278
- [
279
- 'typeAllowed', true,
280
- ],
281
- ])),
282
- ],
283
-
284
- // Closure
285
- [
286
- 'export', new Map(/** @type {[string, string|boolean][]} */ ([
287
- [
288
- 'typeAllowed', isClosureOrPermissive,
289
- ],
290
- ])),
291
- ],
292
-
293
- [
294
- 'exports', new Map(/** @type {[string, string|boolean][]} */ ([
295
- [
296
- 'namepathRole', 'namepath-defining',
297
- ],
298
-
299
- [
300
- 'nameRequired', isJsdoc,
301
- ],
302
-
303
- [
304
- 'typeAllowed', isClosureOrPermissive,
305
- ],
306
- ])),
307
- ],
308
-
309
- [
310
- 'extends', new Map(/** @type {[string, string|boolean][]} */ ([
311
- // Signature seems to require a "namepath" (and no counter-examples)
312
- [
313
- 'namepathRole', 'namepath-referencing',
314
- ],
315
-
316
- [
317
- 'nameRequired', isJsdoc,
318
- ],
319
-
320
- // Does not show curly brackets in either the signature or examples
321
- [
322
- 'typeAllowed', isTypescriptOrClosure || isPermissive,
323
- ],
324
-
325
- // "namepath"
326
- [
327
- 'typeOrNameRequired', isTypescriptOrClosure || isPermissive,
328
- ],
329
- ])),
330
- ],
331
-
332
- [
333
- 'external', new Map(/** @type {[string, string|boolean][]} */ ([
334
- // Appears to require a "name" in its signature, albeit somewhat
335
- // different from other "name"'s (including as described
336
- // at https://jsdoc.app/about-namepaths.html )
337
- [
338
- 'namepathRole', 'namepath-defining',
339
- ],
340
-
341
- // "name" (and a special syntax for the `external` name)
342
- [
343
- 'nameRequired', true,
344
- ],
345
-
346
- [
347
- 'typeAllowed', false,
348
- ],
349
- ])),
350
- ],
351
-
352
- [
353
- 'fires', new Map(/** @type {[string, string|boolean][]} */ ([
354
- // Signature seems to require a "name" (of an event) and no
355
- // counter-examples
356
- [
357
- 'namepathRole', 'namepath-referencing',
358
- ],
359
-
360
- [
361
- 'nameRequired', true,
362
- ],
363
-
364
- [
365
- 'typeAllowed', false,
366
- ],
367
- ])),
368
- ],
369
-
370
- [
371
- 'func', new Map(/** @type {[string, string|boolean][]} */ ([
372
- // Allows for "name"'s in signature, but indicated as optional
373
- [
374
- 'namepathRole', 'namepath-defining',
375
- ],
376
- ])),
377
- ],
378
- [
379
- 'function', new Map(/** @type {[string, string|boolean][]} */ ([
380
- // Allows for "name"'s in signature, but indicated as optional
381
- [
382
- 'namepathRole', 'namepath-defining',
383
- ],
384
-
385
- [
386
- 'nameRequired', false,
387
- ],
388
-
389
- [
390
- 'typeAllowed', false,
391
- ],
392
- ])),
393
- ],
394
-
395
- [
396
- 'host', new Map(/** @type {[string, string|boolean][]} */ ([
397
- // Appears to require a "name" in its signature, albeit somewhat
398
- // different from other "name"'s (including as described
399
- // at https://jsdoc.app/about-namepaths.html )
400
- [
401
- 'namepathRole', 'namepath-defining',
402
- ],
403
-
404
- // See `external`
405
- [
406
- 'nameRequired', true,
407
- ],
408
-
409
- [
410
- 'typeAllowed', false,
411
- ],
412
- ])),
413
- ],
414
-
415
- [
416
- 'implements', new Map(/** @type {[string, string|boolean][]} */ ([
417
- // Shows curly brackets in the doc signature and examples
418
- // "typeExpression"
419
- [
420
- 'typeRequired', true,
421
- ],
422
- ])),
423
- ],
424
-
425
- [
426
- 'interface', new Map(/** @type {[string, string|boolean][]} */ ([
427
- // Not in use, but should be this value if using to power `empty-tags`
428
- [
429
- 'nameAllowed', isClosure,
430
- ],
431
-
432
- // Allows for "name" in signature, but indicates as optional
433
- [
434
- 'namepathRole',
435
- isJsdocTypescriptOrPermissive ? 'namepath-defining' : false,
436
- ],
437
-
438
- [
439
- 'typeAllowed', false,
440
- ],
441
- ])),
442
- ],
443
-
444
- [
445
- 'internal', new Map(/** @type {[string, string|boolean][]} */ ([
446
- // Not in use, but should be this value if using to power `empty-tags`
447
- [
448
- 'nameAllowed', false,
449
- ],
450
- // https://www.typescriptlang.org/tsconfig/#stripInternal
451
- [
452
- 'namepathRole', false,
453
- ],
454
- ])),
455
- ],
456
-
457
- [
458
- 'lends', new Map(/** @type {[string, string|boolean][]} */ ([
459
- // Signature seems to require a "namepath" (and no counter-examples)
460
- [
461
- 'namepathRole', 'namepath-referencing',
462
- ],
463
-
464
- // "namepath"
465
- [
466
- 'typeOrNameRequired', true,
467
- ],
468
- ])),
469
- ],
470
-
471
- [
472
- 'link', new Map(/** @type {[string, string|boolean][]} */ ([
473
- // Signature seems to require a namepath OR URL and might be checked as such.
474
- [
475
- 'namepathRole', 'namepath-or-url-referencing',
476
- ],
477
-
478
- ])),
479
- ],
480
-
481
- [
482
- 'linkcode', new Map(/** @type {[string, string|boolean][]} */ ([
483
- // Synonym for "link"
484
- // Signature seems to require a namepath OR URL and might be checked as such.
485
- [
486
- 'namepathRole', 'namepath-or-url-referencing',
487
- ],
488
- ])),
489
- ],
490
-
491
- [
492
- 'linkplain', new Map(/** @type {[string, string|boolean][]} */ ([
493
- // Synonym for "link"
494
- // Signature seems to require a namepath OR URL and might be checked as such.
495
- [
496
- 'namepathRole', 'namepath-or-url-referencing',
497
- ],
498
- ])),
499
- ],
500
-
501
- [
502
- 'listens', new Map(/** @type {[string, string|boolean][]} */ ([
503
- // Signature seems to require a "name" (of an event) and no
504
- // counter-examples
505
- [
506
- 'namepathRole', 'namepath-referencing',
507
- ],
508
-
509
- [
510
- 'nameRequired', true,
511
- ],
512
-
513
- [
514
- 'typeAllowed', false,
515
- ],
516
- ])),
517
- ],
518
-
519
- [
520
- 'member', new Map(/** @type {[string, string|boolean][]} */ ([
521
- // Allows for "name"'s in signature, but indicated as optional
522
- [
523
- 'namepathRole', 'namepath-defining',
524
- ],
525
-
526
- // Has example showing curly brackets but not in doc signature
527
- [
528
- 'typeAllowed', true,
529
- ],
530
- ])),
531
- ],
532
-
533
- [
534
- 'memberof!', new Map(/** @type {[string, string|boolean][]} */ ([
535
- // Signature seems to require a "namepath" (and no counter-examples),
536
- // though it allows an incomplete namepath ending with connecting symbol
537
- [
538
- 'namepathRole', 'namepath-referencing',
539
- ],
540
-
541
- // "namepath"
542
- [
543
- 'typeOrNameRequired', true,
544
- ],
545
- ])),
546
- ],
547
- [
548
- 'memberof', new Map(/** @type {[string, string|boolean][]} */ ([
549
- // Signature seems to require a "namepath" (and no counter-examples),
550
- // though it allows an incomplete namepath ending with connecting symbol
551
- [
552
- 'namepathRole', 'namepath-referencing',
553
- ],
554
-
555
- // "namepath"
556
- [
557
- 'typeOrNameRequired', true,
558
- ],
559
- ])),
560
- ],
561
-
562
- [
563
- 'method', new Map(/** @type {[string, string|boolean][]} */ ([
564
- // Allows for "name"'s in signature, but indicated as optional
565
- [
566
- 'namepathRole', 'namepath-defining',
567
- ],
568
- ])),
569
- ],
570
- [
571
- 'mixes', new Map(/** @type {[string, string|boolean][]} */ ([
572
- // Signature seems to require a "OtherObjectPath" with no
573
- // counter-examples
574
- [
575
- 'namepathRole', 'namepath-referencing',
576
- ],
577
-
578
- // "OtherObjectPath"
579
- [
580
- 'typeOrNameRequired', true,
581
- ],
582
- ])),
583
- ],
584
-
585
- [
586
- 'mixin', new Map(/** @type {[string, string|boolean][]} */ ([
587
- // Allows for "name"'s in signature, but indicated as optional
588
- [
589
- 'namepathRole', 'namepath-defining',
590
- ],
591
-
592
- [
593
- 'nameRequired', false,
594
- ],
595
-
596
- [
597
- 'typeAllowed', false,
598
- ],
599
- ])),
600
- ],
601
-
602
- [
603
- 'modifies', new Map(/** @type {[string, string|boolean][]} */ ([
604
- // Has no documentation, but test example has curly brackets, and
605
- // "name" would be suggested rather than "namepath" based on example;
606
- // not sure if name is required
607
- [
608
- 'typeAllowed', true,
609
- ],
610
- ])),
611
- ],
612
-
613
- [
614
- 'module', new Map(/** @type {[string, string|boolean][]} */ ([
615
- // Optional "name" and no curly brackets
616
- // this block impacts `no-undefined-types` and `valid-types` (search for
617
- // "isNamepathDefiningTag|tagMightHaveNamepath|tagMightHaveEitherTypeOrNamePosition")
618
- [
619
- 'namepathRole', isJsdoc ? 'namepath-defining' : 'text',
620
- ],
621
-
622
- // Shows the signature with curly brackets but not in the example
623
- [
624
- 'typeAllowed', true,
625
- ],
626
- ])),
627
- ],
628
-
629
- [
630
- 'name', new Map(/** @type {[string, string|boolean][]} */ ([
631
- // Seems to require a "namepath" in the signature (with no
632
- // counter-examples)
633
- [
634
- 'namepathRole', 'namepath-defining',
635
- ],
636
-
637
- // "namepath"
638
- [
639
- 'nameRequired', true,
640
- ],
641
-
642
- // "namepath"
643
- [
644
- 'typeOrNameRequired', true,
645
- ],
646
- ])),
647
- ],
648
-
649
- [
650
- 'namespace', new Map(/** @type {[string, string|boolean][]} */ ([
651
- // Allows for "name"'s in signature, but indicated as optional
652
- [
653
- 'namepathRole', 'namepath-defining',
654
- ],
655
-
656
- // Shows the signature with curly brackets but not in the example
657
- [
658
- 'typeAllowed', true,
659
- ],
660
- ])),
661
- ],
662
- [
663
- 'package', new Map(/** @type {[string, string|boolean][]} */ ([
664
- // Shows the signature with curly brackets but not in the example
665
- // "typeExpression"
666
- [
667
- 'typeAllowed', isClosureOrPermissive,
668
- ],
669
- ])),
670
- ],
671
-
672
- [
673
- 'param', new Map(/** @type {[string, string|boolean][]} */ ([
674
- [
675
- 'namepathRole', 'namepath-defining',
676
- ],
677
-
678
- // Though no signature provided requiring, per
679
- // https://jsdoc.app/tags-param.html:
680
- // "The @param tag requires you to specify the name of the parameter you
681
- // are documenting."
682
- [
683
- 'nameRequired', true,
684
- ],
685
-
686
- // Has no formal signature in the docs but shows curly brackets
687
- // in the examples
688
- [
689
- 'typeAllowed', true,
690
- ],
691
- ])),
692
- ],
693
-
694
- [
695
- 'private', new Map(/** @type {[string, string|boolean][]} */ ([
696
- // Shows the signature with curly brackets but not in the example
697
- // "typeExpression"
698
- [
699
- 'typeAllowed', isClosureOrPermissive,
700
- ],
701
- ])),
702
- ],
703
-
704
- [
705
- 'prop', new Map(/** @type {[string, string|boolean][]} */ ([
706
- [
707
- 'namepathRole', 'namepath-defining',
708
- ],
709
-
710
- // See `property`
711
- [
712
- 'nameRequired', true,
713
- ],
714
-
715
- // Has no formal signature in the docs but shows curly brackets
716
- // in the examples
717
- [
718
- 'typeAllowed', true,
719
- ],
720
- ])),
721
- ],
722
-
723
- [
724
- 'property', new Map(/** @type {[string, string|boolean][]} */ ([
725
- [
726
- 'namepathRole', 'namepath-defining',
727
- ],
728
-
729
- // No docs indicate required, but since parallel to `param`, we treat as
730
- // such:
731
- [
732
- 'nameRequired', true,
733
- ],
734
-
735
- // Has no formal signature in the docs but shows curly brackets
736
- // in the examples
737
- [
738
- 'typeAllowed', true,
739
- ],
740
- ])),
741
- ],
742
-
743
- [
744
- 'protected', new Map(/** @type {[string, string|boolean][]} */ ([
745
- // Shows the signature with curly brackets but not in the example
746
- // "typeExpression"
747
- [
748
- 'typeAllowed', isClosureOrPermissive,
749
- ],
750
- ])),
751
- ],
752
-
753
- [
754
- 'public', new Map(/** @type {[string, string|boolean][]} */ ([
755
- // Does not show a signature nor show curly brackets in the example
756
- [
757
- 'typeAllowed', isClosureOrPermissive,
758
- ],
759
- ])),
760
- ],
761
-
762
- [
763
- 'requires', new Map(/** @type {[string, string|boolean][]} */ ([
764
- // <someModuleName>
765
- [
766
- 'namepathRole', 'namepath-referencing',
767
- ],
768
-
769
- [
770
- 'nameRequired', true,
771
- ],
772
-
773
- [
774
- 'typeAllowed', false,
775
- ],
776
- ])),
777
- ],
778
-
779
- [
780
- 'return', new Map(/** @type {[string, string|boolean][]} */ ([
781
- // Shows curly brackets in the signature and in the examples
782
- [
783
- 'typeAllowed', true,
784
- ],
785
- ])),
786
- ],
787
- [
788
- 'returns', new Map(/** @type {[string, string|boolean][]} */ ([
789
- // Shows curly brackets in the signature and in the examples
790
- [
791
- 'typeAllowed', true,
792
- ],
793
- ])),
794
- ],
795
-
796
- [
797
- 'satisfies', new Map(/** @type {[string, string|boolean][]} */ ([
798
- // Shows curly brackets in the doc signature and examples
799
- [
800
- 'typeRequired', true,
801
- ],
802
- ])),
803
- ],
804
-
805
- [
806
- 'see', new Map(/** @type {[string, string|boolean][]} */ ([
807
- // Signature allows for "namepath" or text, so user must configure to
808
- // 'namepath-referencing' to enforce checks
809
- [
810
- 'namepathRole', 'text',
811
- ],
812
- ])),
813
- ],
814
-
815
- [
816
- 'static', new Map(/** @type {[string, string|boolean][]} */ ([
817
- // Does not show a signature nor show curly brackets in the example
818
- [
819
- 'typeAllowed', isClosureOrPermissive,
820
- ],
821
- ])),
822
- ],
823
-
824
- [
825
- 'suppress', new Map(/** @type {[string, string|boolean][]} */ ([
826
- [
827
- 'namepathRole', !isClosure,
828
- ],
829
- [
830
- 'typeRequired', isClosure,
831
- ],
832
- ])),
833
- ],
834
-
835
- [
836
- 'template', new Map(/** @type {[string, string|boolean][]} */ ([
837
- [
838
- 'namepathRole', isJsdoc ? 'text' : 'namepath-referencing',
839
- ],
840
-
841
- [
842
- 'nameRequired', !isJsdoc,
843
- ],
844
-
845
- // Though defines `namepathRole: 'namepath-defining'` in a sense, it is
846
- // not parseable in the same way for template (e.g., allowing commas),
847
- // so not adding
848
- [
849
- 'typeAllowed', isTypescriptOrClosure || isPermissive,
850
- ],
851
- ])),
852
- ],
853
-
854
- [
855
- 'this', new Map(/** @type {[string, string|boolean][]} */ ([
856
- // Signature seems to require a "namepath" (and no counter-examples)
857
- // Not used with namepath in Closure/TypeScript, however
858
- [
859
- 'namepathRole', isJsdoc ? 'namepath-referencing' : false,
860
- ],
861
-
862
- // namepath
863
- [
864
- 'typeOrNameRequired', isJsdoc,
865
- ],
866
-
867
- [
868
- 'typeRequired', isTypescriptOrClosure,
869
- ],
870
- ])),
871
- ],
872
-
873
- [
874
- 'throws', new Map(/** @type {[string, string|boolean][]} */ ([
875
- // Shows curly brackets in the signature and in the examples
876
- [
877
- 'typeAllowed', true,
878
- ],
879
- ])),
880
- ],
881
-
882
- [
883
- 'tutorial', new Map(/** @type {[string, string|boolean][]} */ ([
884
- // (a tutorial ID)
885
- [
886
- 'nameRequired', true,
887
- ],
888
-
889
- [
890
- 'typeAllowed', false,
891
- ],
892
- ])),
893
- ],
894
-
895
- [
896
- 'type', new Map(/** @type {[string, string|boolean][]} */ ([
897
- // Shows curly brackets in the doc signature and examples
898
- // "typeName"
899
- [
900
- 'typeRequired', true,
901
- ],
902
- ])),
903
- ],
904
-
905
- [
906
- 'typedef', new Map(/** @type {[string, string|boolean][]} */ ([
907
- // Seems to require a "namepath" in the signature (with no
908
- // counter-examples)
909
- [
910
- 'namepathRole', 'namepath-defining',
911
- ],
912
-
913
- // TypeScript may allow it to be dropped if followed by @property or @member;
914
- // also shown as missing in Closure
915
- // "namepath"
916
- [
917
- 'nameRequired', isJsdocOrPermissive,
918
- ],
919
-
920
- // Is not `typeRequired` for TypeScript because it gives an error:
921
- // JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.
922
-
923
- // Has example showing curly brackets but not in doc signature
924
- [
925
- 'typeAllowed', true,
926
- ],
927
-
928
- // TypeScript may allow it to be dropped if followed by @property or @member
929
- // "namepath"
930
- [
931
- 'typeOrNameRequired', !isTypescript,
932
- ],
933
- ])),
934
- ],
935
-
936
- [
937
- 'var', new Map(/** @type {[string, string|boolean][]} */ ([
938
- // Allows for "name"'s in signature, but indicated as optional
939
- [
940
- 'namepathRole', 'namepath-defining',
941
- ],
942
-
943
- // Has example showing curly brackets but not in doc signature
944
- [
945
- 'typeAllowed', true,
946
- ],
947
- ])),
948
- ],
949
-
950
- [
951
- 'yield', new Map(/** @type {[string, string|boolean][]} */ ([
952
- // Shows curly brackets in the signature and in the examples
953
- [
954
- 'typeAllowed', true,
955
- ],
956
- ])),
957
- ],
958
- [
959
- 'yields', new Map(/** @type {[string, string|boolean][]} */ ([
960
- // Shows curly brackets in the signature and in the examples
961
- [
962
- 'typeAllowed', true,
963
- ],
964
- ])),
965
- ],
966
- ]);
967
- };
968
-
969
- export default getDefaultTagStructureForMode;