eslint-plugin-jsdoc 46.4.6 → 46.5.1

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 (191) hide show
  1. package/README.md +31 -0
  2. package/dist/index.js +21 -10
  3. package/dist/index.js.map +1 -1
  4. package/dist/jsdocUtils.js +1 -1
  5. package/dist/jsdocUtils.js.map +1 -1
  6. package/dist/rules/matchDescription.js +1 -1
  7. package/dist/rules/matchDescription.js.map +1 -1
  8. package/package.json +14 -12
  9. package/dist/WarnSettings.d.ts +0 -17
  10. package/dist/WarnSettings.d.ts.map +0 -1
  11. package/dist/alignTransform.d.ts +0 -32
  12. package/dist/alignTransform.d.ts.map +0 -1
  13. package/dist/defaultTagOrder.d.ts +0 -5
  14. package/dist/defaultTagOrder.d.ts.map +0 -1
  15. package/dist/exportParser.d.ts +0 -41
  16. package/dist/exportParser.d.ts.map +0 -1
  17. package/dist/getDefaultTagStructureForMode.d.ts +0 -11
  18. package/dist/getDefaultTagStructureForMode.d.ts.map +0 -1
  19. package/dist/index.d.ts +0 -10
  20. package/dist/index.d.ts.map +0 -1
  21. package/dist/iterateJsdoc.d.ts +0 -460
  22. package/dist/iterateJsdoc.d.ts.map +0 -1
  23. package/dist/jsdocUtils.d.ts +0 -421
  24. package/dist/jsdocUtils.d.ts.map +0 -1
  25. package/dist/rules/checkAccess.d.ts +0 -3
  26. package/dist/rules/checkAccess.d.ts.map +0 -1
  27. package/dist/rules/checkAlignment.d.ts +0 -3
  28. package/dist/rules/checkAlignment.d.ts.map +0 -1
  29. package/dist/rules/checkExamples.d.ts +0 -4
  30. package/dist/rules/checkExamples.d.ts.map +0 -1
  31. package/dist/rules/checkIndentation.d.ts +0 -3
  32. package/dist/rules/checkIndentation.d.ts.map +0 -1
  33. package/dist/rules/checkLineAlignment.d.ts +0 -10
  34. package/dist/rules/checkLineAlignment.d.ts.map +0 -1
  35. package/dist/rules/checkParamNames.d.ts +0 -3
  36. package/dist/rules/checkParamNames.d.ts.map +0 -1
  37. package/dist/rules/checkPropertyNames.d.ts +0 -3
  38. package/dist/rules/checkPropertyNames.d.ts.map +0 -1
  39. package/dist/rules/checkSyntax.d.ts +0 -3
  40. package/dist/rules/checkSyntax.d.ts.map +0 -1
  41. package/dist/rules/checkTagNames.d.ts +0 -3
  42. package/dist/rules/checkTagNames.d.ts.map +0 -1
  43. package/dist/rules/checkTypes.d.ts +0 -3
  44. package/dist/rules/checkTypes.d.ts.map +0 -1
  45. package/dist/rules/checkValues.d.ts +0 -3
  46. package/dist/rules/checkValues.d.ts.map +0 -1
  47. package/dist/rules/emptyTags.d.ts +0 -3
  48. package/dist/rules/emptyTags.d.ts.map +0 -1
  49. package/dist/rules/implementsOnClasses.d.ts +0 -3
  50. package/dist/rules/implementsOnClasses.d.ts.map +0 -1
  51. package/dist/rules/importsAsDependencies.d.ts +0 -3
  52. package/dist/rules/importsAsDependencies.d.ts.map +0 -1
  53. package/dist/rules/informativeDocs.d.ts +0 -3
  54. package/dist/rules/informativeDocs.d.ts.map +0 -1
  55. package/dist/rules/matchDescription.d.ts +0 -3
  56. package/dist/rules/matchDescription.d.ts.map +0 -1
  57. package/dist/rules/matchName.d.ts +0 -3
  58. package/dist/rules/matchName.d.ts.map +0 -1
  59. package/dist/rules/multilineBlocks.d.ts +0 -3
  60. package/dist/rules/multilineBlocks.d.ts.map +0 -1
  61. package/dist/rules/noBadBlocks.d.ts +0 -3
  62. package/dist/rules/noBadBlocks.d.ts.map +0 -1
  63. package/dist/rules/noBlankBlockDescriptions.d.ts +0 -3
  64. package/dist/rules/noBlankBlockDescriptions.d.ts.map +0 -1
  65. package/dist/rules/noBlankBlocks.d.ts +0 -3
  66. package/dist/rules/noBlankBlocks.d.ts.map +0 -1
  67. package/dist/rules/noDefaults.d.ts +0 -3
  68. package/dist/rules/noDefaults.d.ts.map +0 -1
  69. package/dist/rules/noMissingSyntax.d.ts +0 -10
  70. package/dist/rules/noMissingSyntax.d.ts.map +0 -1
  71. package/dist/rules/noMultiAsterisks.d.ts +0 -3
  72. package/dist/rules/noMultiAsterisks.d.ts.map +0 -1
  73. package/dist/rules/noRestrictedSyntax.d.ts +0 -3
  74. package/dist/rules/noRestrictedSyntax.d.ts.map +0 -1
  75. package/dist/rules/noTypes.d.ts +0 -3
  76. package/dist/rules/noTypes.d.ts.map +0 -1
  77. package/dist/rules/noUndefinedTypes.d.ts +0 -3
  78. package/dist/rules/noUndefinedTypes.d.ts.map +0 -1
  79. package/dist/rules/requireAsteriskPrefix.d.ts +0 -3
  80. package/dist/rules/requireAsteriskPrefix.d.ts.map +0 -1
  81. package/dist/rules/requireDescription.d.ts +0 -3
  82. package/dist/rules/requireDescription.d.ts.map +0 -1
  83. package/dist/rules/requireDescriptionCompleteSentence.d.ts +0 -3
  84. package/dist/rules/requireDescriptionCompleteSentence.d.ts.map +0 -1
  85. package/dist/rules/requireExample.d.ts +0 -3
  86. package/dist/rules/requireExample.d.ts.map +0 -1
  87. package/dist/rules/requireFileOverview.d.ts +0 -3
  88. package/dist/rules/requireFileOverview.d.ts.map +0 -1
  89. package/dist/rules/requireHyphenBeforeParamDescription.d.ts +0 -3
  90. package/dist/rules/requireHyphenBeforeParamDescription.d.ts.map +0 -1
  91. package/dist/rules/requireJsdoc.d.ts +0 -9
  92. package/dist/rules/requireJsdoc.d.ts.map +0 -1
  93. package/dist/rules/requireParam.d.ts +0 -4
  94. package/dist/rules/requireParam.d.ts.map +0 -1
  95. package/dist/rules/requireParamDescription.d.ts +0 -3
  96. package/dist/rules/requireParamDescription.d.ts.map +0 -1
  97. package/dist/rules/requireParamName.d.ts +0 -3
  98. package/dist/rules/requireParamName.d.ts.map +0 -1
  99. package/dist/rules/requireParamType.d.ts +0 -3
  100. package/dist/rules/requireParamType.d.ts.map +0 -1
  101. package/dist/rules/requireProperty.d.ts +0 -3
  102. package/dist/rules/requireProperty.d.ts.map +0 -1
  103. package/dist/rules/requirePropertyDescription.d.ts +0 -3
  104. package/dist/rules/requirePropertyDescription.d.ts.map +0 -1
  105. package/dist/rules/requirePropertyName.d.ts +0 -3
  106. package/dist/rules/requirePropertyName.d.ts.map +0 -1
  107. package/dist/rules/requirePropertyType.d.ts +0 -3
  108. package/dist/rules/requirePropertyType.d.ts.map +0 -1
  109. package/dist/rules/requireReturns.d.ts +0 -3
  110. package/dist/rules/requireReturns.d.ts.map +0 -1
  111. package/dist/rules/requireReturnsCheck.d.ts +0 -3
  112. package/dist/rules/requireReturnsCheck.d.ts.map +0 -1
  113. package/dist/rules/requireReturnsDescription.d.ts +0 -3
  114. package/dist/rules/requireReturnsDescription.d.ts.map +0 -1
  115. package/dist/rules/requireReturnsType.d.ts +0 -3
  116. package/dist/rules/requireReturnsType.d.ts.map +0 -1
  117. package/dist/rules/requireThrows.d.ts +0 -3
  118. package/dist/rules/requireThrows.d.ts.map +0 -1
  119. package/dist/rules/requireYields.d.ts +0 -3
  120. package/dist/rules/requireYields.d.ts.map +0 -1
  121. package/dist/rules/requireYieldsCheck.d.ts +0 -3
  122. package/dist/rules/requireYieldsCheck.d.ts.map +0 -1
  123. package/dist/rules/sortTags.d.ts +0 -3
  124. package/dist/rules/sortTags.d.ts.map +0 -1
  125. package/dist/rules/tagLines.d.ts +0 -3
  126. package/dist/rules/tagLines.d.ts.map +0 -1
  127. package/dist/rules/textEscaping.d.ts +0 -3
  128. package/dist/rules/textEscaping.d.ts.map +0 -1
  129. package/dist/rules/validTypes.d.ts +0 -3
  130. package/dist/rules/validTypes.d.ts.map +0 -1
  131. package/dist/tagNames.d.ts +0 -16
  132. package/dist/tagNames.d.ts.map +0 -1
  133. package/dist/utils/hasReturnValue.d.ts +0 -20
  134. package/dist/utils/hasReturnValue.d.ts.map +0 -1
  135. package/docs/advanced.md +0 -102
  136. package/docs/rules/check-access.md +0 -193
  137. package/docs/rules/check-alignment.md +0 -169
  138. package/docs/rules/check-examples.md +0 -784
  139. package/docs/rules/check-indentation.md +0 -296
  140. package/docs/rules/check-line-alignment.md +0 -1002
  141. package/docs/rules/check-param-names.md +0 -1035
  142. package/docs/rules/check-property-names.md +0 -244
  143. package/docs/rules/check-syntax.md +0 -80
  144. package/docs/rules/check-tag-names.md +0 -1132
  145. package/docs/rules/check-types.md +0 -1198
  146. package/docs/rules/check-values.md +0 -409
  147. package/docs/rules/empty-tags.md +0 -220
  148. package/docs/rules/implements-on-classes.md +0 -219
  149. package/docs/rules/imports-as-dependencies.md +0 -99
  150. package/docs/rules/informative-docs.md +0 -400
  151. package/docs/rules/match-description.md +0 -1008
  152. package/docs/rules/match-name.md +0 -249
  153. package/docs/rules/multiline-blocks.md +0 -398
  154. package/docs/rules/no-bad-blocks.md +0 -174
  155. package/docs/rules/no-blank-block-descriptions.md +0 -91
  156. package/docs/rules/no-blank-blocks.md +0 -98
  157. package/docs/rules/no-defaults.md +0 -207
  158. package/docs/rules/no-missing-syntax.md +0 -275
  159. package/docs/rules/no-multi-asterisks.md +0 -278
  160. package/docs/rules/no-restricted-syntax.md +0 -383
  161. package/docs/rules/no-types.md +0 -168
  162. package/docs/rules/no-undefined-types.md +0 -789
  163. package/docs/rules/require-asterisk-prefix.md +0 -297
  164. package/docs/rules/require-description-complete-sentence.md +0 -820
  165. package/docs/rules/require-description.md +0 -585
  166. package/docs/rules/require-example.md +0 -390
  167. package/docs/rules/require-file-overview.md +0 -324
  168. package/docs/rules/require-hyphen-before-param-description.md +0 -281
  169. package/docs/rules/require-jsdoc.md +0 -1857
  170. package/docs/rules/require-param-description.md +0 -238
  171. package/docs/rules/require-param-name.md +0 -163
  172. package/docs/rules/require-param-type.md +0 -227
  173. package/docs/rules/require-param.md +0 -1820
  174. package/docs/rules/require-property-description.md +0 -88
  175. package/docs/rules/require-property-name.md +0 -79
  176. package/docs/rules/require-property-type.md +0 -79
  177. package/docs/rules/require-property.md +0 -128
  178. package/docs/rules/require-returns-check.md +0 -1053
  179. package/docs/rules/require-returns-description.md +0 -181
  180. package/docs/rules/require-returns-type.md +0 -144
  181. package/docs/rules/require-returns.md +0 -1191
  182. package/docs/rules/require-throws.md +0 -326
  183. package/docs/rules/require-yields-check.md +0 -544
  184. package/docs/rules/require-yields.md +0 -823
  185. package/docs/rules/sort-tags.md +0 -635
  186. package/docs/rules/tag-lines.md +0 -551
  187. package/docs/rules/text-escaping.md +0 -177
  188. package/docs/rules/valid-types.md +0 -881
  189. package/docs/settings.md +0 -362
  190. package/tsconfig-prod.json +0 -20
  191. package/tsconfig.json +0 -21
@@ -1,275 +0,0 @@
1
- <a name="user-content-no-missing-syntax"></a>
2
- <a name="no-missing-syntax"></a>
3
- # <code>no-missing-syntax</code>
4
-
5
- * [Options](#user-content-no-missing-syntax-options)
6
- * [`contexts`](#user-content-no-missing-syntax-options-contexts)
7
- * [Context and settings](#user-content-no-missing-syntax-context-and-settings)
8
- * [Failing examples](#user-content-no-missing-syntax-failing-examples)
9
- * [Passing examples](#user-content-no-missing-syntax-passing-examples)
10
-
11
-
12
- This rule lets you report if certain always expected comment structures are
13
- missing.
14
-
15
- This (along with `no-restricted-syntax`) is a bit similar to Schematron for
16
- XML or jsontron for JSON--you can validate expectations of there being
17
- arbitrary structures.
18
-
19
- This differs from the rule of the same name in
20
- [`eslint-plugin-query`](https://github.com/brettz9/eslint-plugin-query)
21
- in that this rule always looks for a comment above a structure (whether or not
22
- you have a `comment` condition).
23
-
24
- This rule might be especially useful with [`overrides`](https://eslint.org/docs/user-guide/configuring/configuration-files#how-do-overrides-work)
25
- where you need only require tags and/or types within specific directories
26
- (e.g., to enforce that a plugins or locale directory always has a certain form
27
- of export and comment therefor).
28
-
29
- In addition to being generally useful for precision in requiring contexts,
30
- it is hoped that the ability to specify required tags on structures can
31
- be used for requiring `@type` or other types for a minimalist yet adequate
32
- specification of types which can be used to compile JavaScript+JSDoc (JJ)
33
- to WebAssembly (e.g., by converting it to TypeSscript and then using
34
- AssemblyScript to convert to WebAssembly). (It may be possible that one
35
- will need to require types with certain structures beyond function
36
- declarations and the like, as well as optionally requiring specification
37
- of number types.)
38
-
39
- Note that you can use selectors which make use of negators like `:not()`
40
- including with asterisk, e.g., `*:not(FunctionDeclaration)` to indicate types
41
- which are not adequate to satisfy a condition, e.g.,
42
- `FunctionDeclaration:not(FunctionDeclaration[id.name="ignoreMe"])` would
43
- not report if there were only a function declaration of the name "ignoreMe"
44
- (though it would report by function declarations of other names).
45
-
46
- <a name="user-content-no-missing-syntax-options"></a>
47
- <a name="no-missing-syntax-options"></a>
48
- ## Options
49
-
50
- <a name="user-content-no-missing-syntax-options-contexts"></a>
51
- <a name="no-missing-syntax-options-contexts"></a>
52
- ### <code>contexts</code>
53
-
54
- Set this to an array of strings representing the AST context (or an object with
55
- `context` and `comment` properties) where you wish the rule to be applied.
56
-
57
- Use the `minimum` property (defaults to 1) to indicate how many are required
58
- for the rule to be reported.
59
-
60
- Use the `message` property to indicate the specific error to be shown when an
61
- error is reported for that context being found missing. You may use
62
- `{{context}}` and `{{comment}}` with such messages.
63
-
64
- Set to `"any"` if you want the rule to apply to any jsdoc block throughout
65
- your files (as is necessary for finding function blocks not attached to a
66
- function declaration or expression, i.e., `@callback` or `@function` (or its
67
- aliases `@func` or `@method`) (including those associated with an `@interface`).
68
-
69
- See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
70
- section of our README for more on the expected format.
71
-
72
- <a name="user-content-no-missing-syntax-context-and-settings"></a>
73
- <a name="no-missing-syntax-context-and-settings"></a>
74
- ## Context and settings
75
-
76
- |||
77
- |---|---|
78
- |Context|None except those indicated by `contexts`|
79
- |Tags|Any if indicated by AST|
80
- |Recommended|false|
81
- |Options|`contexts`|
82
-
83
- <a name="user-content-no-missing-syntax-failing-examples"></a>
84
- <a name="no-missing-syntax-failing-examples"></a>
85
- ## Failing examples
86
-
87
- The following patterns are considered problems:
88
-
89
- ````js
90
- /**
91
- * @implements {Bar|Foo}
92
- */
93
- function quux () {
94
-
95
- }
96
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Foo\"]:nth-child(1))","context":"FunctionDeclaration"}]}]
97
- // Message: Syntax is required: FunctionDeclaration with JsdocBlock[postDelimiter=""]:has(JsdocTypeUnion > JsdocTypeName[value="Foo"]:nth-child(1))
98
-
99
- /**
100
- * @implements {Bar|Foo}
101
- */
102
- function quux () {
103
-
104
- }
105
- // Settings: {"jsdoc":{"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Foo\"]:nth-child(1))","context":"FunctionDeclaration"}]}}
106
- // Message: Syntax is required: FunctionDeclaration with JsdocBlock[postDelimiter=""]:has(JsdocTypeUnion > JsdocTypeName[value="Foo"]:nth-child(1))
107
-
108
- /**
109
- * @implements {Bar|Foo}
110
- */
111
- function quux () {
112
-
113
- }
114
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Bar\"]:nth-child(1))","context":"FunctionDeclaration"},{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Foo\"]:nth-child(1))","context":"FunctionDeclaration"}]}]
115
- // Message: Syntax is required: FunctionDeclaration with JsdocBlock[postDelimiter=""]:has(JsdocTypeUnion > JsdocTypeName[value="Foo"]:nth-child(1))
116
-
117
- /**
118
- * @implements {Bar|Foo}
119
- */
120
- function quux () {
121
-
122
- }
123
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Bar\"]:nth-child(1))","context":"any"},{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Foo\"]:nth-child(1))","context":":function"}]}]
124
- // Message: Syntax is required: :function with JsdocBlock[postDelimiter=""]:has(JsdocTypeUnion > JsdocTypeName[value="Foo"]:nth-child(1))
125
-
126
- /**
127
- * @private
128
- * Object holding values of some custom enum
129
- */
130
- const MY_ENUM = Object.freeze({
131
- VAL_A: "myvala"
132
- } as const);
133
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTag[tag=/private|protected/])","context":":declaration","message":"Requiring private/protected tags here"},{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTag[tag=\"enum\"])","context":"any","message":"@enum required on declarations"}]}]
134
- // Message: @enum required on declarations
135
-
136
- /**
137
- * @implements {Bar|Foo}
138
- */
139
- function quux () {
140
-
141
- }
142
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Foo\"]:nth-child(1))","context":"FunctionDeclaration","message":"Problematically missing function syntax: `{{context}}` with `{{comment}}`."}]}]
143
- // Message: Problematically missing function syntax: `FunctionDeclaration` with `JsdocBlock[postDelimiter=""]:has(JsdocTypeUnion > JsdocTypeName[value="Foo"]:nth-child(1))`.
144
-
145
- /**
146
- * @implements {Bar|Foo}
147
- */
148
- function quux () {
149
-
150
- }
151
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":["FunctionDeclaration"]}]
152
- // Message: Syntax is required: FunctionDeclaration
153
-
154
- /**
155
- * @implements {Bar|Foo}
156
- */
157
- function quux () {
158
-
159
- }
160
- // Message: Rule `no-missing-syntax` is missing a `contexts` option.
161
-
162
- /**
163
- * @implements {Bar|Foo}
164
- */
165
- function quux () {
166
-
167
- }
168
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Bar\"]:nth-child(1))","context":"FunctionDeclaration","minimum":2}]}]
169
- // Message: Syntax is required: FunctionDeclaration with JsdocBlock[postDelimiter=""]:has(JsdocTypeUnion > JsdocTypeName[value="Bar"]:nth-child(1))
170
-
171
- /**
172
- * @param ab
173
- * @param cd
174
- */
175
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock:has(JsdocTag[name=/opt_/])","context":"any","message":"Require names matching `/^opt_/i`."}]}]
176
- // Message: Require names matching `/^opt_/i`.
177
-
178
- /**
179
- * @param ab
180
- * @param cd
181
- */
182
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock:has(JsdocTag[name=/opt_/])","message":"Require names matching `/^opt_/i`."}]}]
183
- // Message: Require names matching `/^opt_/i`.
184
-
185
- /**
186
- * @param ab
187
- * @param cd
188
- */
189
- function quux () {}
190
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock:has(JsdocTag[name=/opt_/])","context":"any","message":"Require names matching `/^opt_/i`."}]}]
191
- // Message: Require names matching `/^opt_/i`.
192
-
193
- /**
194
- * @implements {Bar|Foo}
195
- */
196
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"context":"FunctionDeclaration"}]}]
197
- // Message: Syntax is required: FunctionDeclaration
198
- ````
199
-
200
-
201
-
202
- <a name="user-content-no-missing-syntax-passing-examples"></a>
203
- <a name="no-missing-syntax-passing-examples"></a>
204
- ## Passing examples
205
-
206
- The following patterns are not considered problems:
207
-
208
- ````js
209
- /**
210
- * @implements {Bar|Foo}
211
- */
212
- function quux () {
213
-
214
- }
215
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Bar\"]:nth-child(1))","context":"FunctionDeclaration"}]}]
216
-
217
- /**
218
- * @implements {Bar|Foo}
219
- */
220
- function quux () {
221
-
222
- }
223
-
224
- /**
225
- * @implements {Bar|Foo}
226
- */
227
- function bar () {
228
-
229
- }
230
-
231
- /**
232
- * @implements {Bar|Foo}
233
- */
234
- function baz () {
235
-
236
- }
237
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Bar\"]:nth-child(1))","context":"FunctionDeclaration","minimum":2}]}]
238
-
239
- /**
240
- * @param opt_a
241
- * @param opt_b
242
- */
243
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock:has(JsdocTag[name=/opt_/])","context":"any","message":"Require names matching `/^opt_/i`."}]}]
244
-
245
- /**
246
- * @param opt_a
247
- * @param opt_b
248
- */
249
- function quux () {}
250
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock:has(JsdocTag[name=/opt_/])","context":"any","message":"Require names matching `/^opt_/i`."}]}]
251
-
252
- /**
253
- * @param opt_a
254
- * @param opt_b
255
- */
256
- function quux () {}
257
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock:has(JsdocTag[name=/opt_/])","message":"Require names matching `/^opt_/i`."}]}]
258
-
259
- /**
260
- * @implements {Bar|Foo}
261
- */
262
- function quux () {
263
-
264
- }
265
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Bar\"]:nth-child(1))","context":"FunctionDeclaration"},{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Foo\"]:nth-child(2))","context":"FunctionDeclaration"}]}]
266
-
267
- /**
268
- * @implements {Bar|Foo}
269
- */
270
- function quux () {
271
-
272
- }
273
- // "jsdoc/no-missing-syntax": ["error"|"warn", {"contexts":[{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Bar\"]:nth-child(1))","context":"any"},{"comment":"JsdocBlock[postDelimiter=\"\"]:has(JsdocTypeUnion > JsdocTypeName[value=\"Foo\"]:nth-child(2))","context":"FunctionDeclaration"}]}]
274
- ````
275
-
@@ -1,278 +0,0 @@
1
- <a name="user-content-no-multi-asterisks"></a>
2
- <a name="no-multi-asterisks"></a>
3
- ### <code>no-multi-asterisks</code>
4
-
5
-
6
-
7
- Prevents use of multiple asterisks at the beginning of lines.
8
-
9
- Note that if you wish to prevent multiple asterisks at the very beginning of
10
- the jsdoc block, you should use `no-bad-blocks` (as that is not proper jsdoc
11
- and that rule is for catching blocks which only seem like jsdoc).
12
-
13
- <a name="user-content-fixer"></a>
14
- <a name="fixer"></a>
15
- ## Fixer
16
-
17
- (TODO)
18
-
19
- <a name="user-content-options"></a>
20
- <a name="options"></a>
21
- ## Options
22
-
23
- <a name="user-content-options-allowwhitespace-defaults-to-false"></a>
24
- <a name="options-allowwhitespace-defaults-to-false"></a>
25
- ### <code>allowWhitespace</code> (defaults to <code>false</code>)
26
-
27
- Set to `true` if you wish to allow asterisks after a space (as with Markdown):
28
-
29
- ```js
30
- /**
31
- * *bold* text
32
- */
33
- ```
34
-
35
- <a name="user-content-options-preventatmiddlelines-defaults-to-true"></a>
36
- <a name="options-preventatmiddlelines-defaults-to-true"></a>
37
- ### <code>preventAtMiddleLines</code> (defaults to <code>true</code>)
38
-
39
- Prevent the likes of this:
40
-
41
- ```js
42
- /**
43
- *
44
- **
45
- */
46
- ```
47
-
48
- <a name="user-content-options-preventatend-defaults-to-true"></a>
49
- <a name="options-preventatend-defaults-to-true"></a>
50
- ### <code>preventAtEnd</code> (defaults to <code>true</code>)
51
-
52
- Prevent the likes of this:
53
-
54
- ```js
55
- /**
56
- *
57
- *
58
- **/
59
- ```
60
-
61
- <a name="user-content-context-and-settings"></a>
62
- <a name="context-and-settings"></a>
63
- ## Context and settings
64
-
65
- |||
66
- |---|---|
67
- |Context|everywhere|
68
- |Tags|(any)|
69
- |Recommended|true|
70
- |Settings||
71
- |Options|`allowWhitespace`, `preventAtEnd`, `preventAtMiddleLines`|
72
-
73
- <a name="user-content-failing-examples"></a>
74
- <a name="failing-examples"></a>
75
- ## Failing examples
76
-
77
- The following patterns are considered problems:
78
-
79
- ````js
80
- /**
81
- *
82
- **
83
- */
84
- // Message: Should be no multiple asterisks on middle lines.
85
-
86
- /**
87
- *
88
- **
89
- */
90
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"preventAtMiddleLines":true}]
91
- // Message: Should be no multiple asterisks on middle lines.
92
-
93
- /**
94
- *
95
- **
96
- */
97
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"preventAtEnd":false}]
98
- // Message: Should be no multiple asterisks on middle lines.
99
-
100
- /**
101
- * With a description
102
- * @tag {SomeType} and a tag with details
103
- **
104
- */
105
- // Message: Should be no multiple asterisks on middle lines.
106
-
107
- /**
108
- **
109
- *
110
- */
111
- // Message: Should be no multiple asterisks on middle lines.
112
-
113
- /**
114
- * Desc.
115
- *
116
- **/
117
- // Message: Should be no multiple asterisks on end lines.
118
-
119
- /**
120
- * Desc.
121
- *
122
- **/
123
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"preventAtEnd":true}]
124
- // Message: Should be no multiple asterisks on end lines.
125
-
126
- /**
127
- * Desc.
128
- *
129
- abc * **/
130
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"preventAtEnd":true}]
131
- // Message: Should be no multiple asterisks on end lines.
132
-
133
- /**
134
- * Desc.
135
- *
136
- **/
137
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"preventAtMiddleLines":false}]
138
- // Message: Should be no multiple asterisks on end lines.
139
-
140
- /** Desc. **/
141
- // Message: Should be no multiple asterisks on end lines.
142
-
143
- /** @someTag name desc. **/
144
- // Message: Should be no multiple asterisks on end lines.
145
-
146
- /** abc * */
147
- // Message: Should be no multiple asterisks on end lines.
148
-
149
- /**
150
- * Preserve user's whitespace when fixing (though one may also
151
- * use an align rule)
152
- *
153
- * */
154
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"preventAtEnd":true}]
155
- // Message: Should be no multiple asterisks on end lines.
156
-
157
- /**
158
- * The method does 2 things:
159
- * * Thing 1
160
- * * Thing 2
161
- */
162
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"allowWhitespace":false}]
163
- // Message: Should be no multiple asterisks on middle lines.
164
-
165
- /**
166
- * This muti-line comment contains some
167
- * *non-standard bold* syntax
168
- */
169
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"allowWhitespace":false}]
170
- // Message: Should be no multiple asterisks on middle lines.
171
-
172
- /** Desc. **/
173
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"allowWhitespace":true}]
174
- // Message: Should be no multiple asterisks on end lines.
175
- ````
176
-
177
-
178
-
179
- <a name="user-content-passing-examples"></a>
180
- <a name="passing-examples"></a>
181
- ## Passing examples
182
-
183
- The following patterns are not considered problems:
184
-
185
- ````js
186
- /**
187
- *
188
- * Desc. ***
189
- */
190
-
191
- /**
192
- * Desc. ***
193
- *
194
- */
195
-
196
- /**
197
- * Desc.
198
- *
199
- * sth */
200
-
201
- /**
202
- **
203
- *
204
- */
205
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"preventAtMiddleLines":false}]
206
-
207
- /**
208
- *
209
- *
210
- **/
211
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"preventAtEnd":false}]
212
-
213
- /**
214
- * With a desc.
215
- * and ***
216
- */
217
-
218
- /**
219
- * and ***
220
- * With a desc.
221
- */
222
-
223
- /**
224
- * With a desc.
225
- * With a desc.
226
- * Desc. */
227
-
228
- /**
229
- * With a description
230
- * @tag {SomeType} and a tag with details
231
- *
232
- */
233
-
234
- /** abc */
235
- function foo() {
236
- //
237
- }
238
-
239
- /** foo */
240
- function foo(): void {
241
- //
242
- }
243
-
244
- /** @aTag abc */
245
- function foo() {
246
- //
247
- }
248
-
249
- /**
250
- * **Bold**
251
- */
252
-
253
- /**
254
- * Preserve user's bold statement when fixing.
255
- *
256
- * **Bold example:** Hi there.
257
- */
258
-
259
- /**
260
- * The method does 2 things:
261
- * * Thing 1
262
- * * Thing 2
263
- */
264
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"allowWhitespace":true}]
265
-
266
- /**
267
- * This muti-line comment contains some
268
- * *non-standard bold* syntax
269
- */
270
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"allowWhitespace":true}]
271
-
272
- /** abc */
273
- function foo() {
274
- //
275
- }
276
- // "jsdoc/no-multi-asterisks": ["error"|"warn", {"allowWhitespace":true}]
277
- ````
278
-