eslint-plugin-jsdoc 46.4.6 → 46.5.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 (187) 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/package.json +14 -12
  5. package/dist/WarnSettings.d.ts +0 -17
  6. package/dist/WarnSettings.d.ts.map +0 -1
  7. package/dist/alignTransform.d.ts +0 -32
  8. package/dist/alignTransform.d.ts.map +0 -1
  9. package/dist/defaultTagOrder.d.ts +0 -5
  10. package/dist/defaultTagOrder.d.ts.map +0 -1
  11. package/dist/exportParser.d.ts +0 -41
  12. package/dist/exportParser.d.ts.map +0 -1
  13. package/dist/getDefaultTagStructureForMode.d.ts +0 -11
  14. package/dist/getDefaultTagStructureForMode.d.ts.map +0 -1
  15. package/dist/index.d.ts +0 -10
  16. package/dist/index.d.ts.map +0 -1
  17. package/dist/iterateJsdoc.d.ts +0 -460
  18. package/dist/iterateJsdoc.d.ts.map +0 -1
  19. package/dist/jsdocUtils.d.ts +0 -421
  20. package/dist/jsdocUtils.d.ts.map +0 -1
  21. package/dist/rules/checkAccess.d.ts +0 -3
  22. package/dist/rules/checkAccess.d.ts.map +0 -1
  23. package/dist/rules/checkAlignment.d.ts +0 -3
  24. package/dist/rules/checkAlignment.d.ts.map +0 -1
  25. package/dist/rules/checkExamples.d.ts +0 -4
  26. package/dist/rules/checkExamples.d.ts.map +0 -1
  27. package/dist/rules/checkIndentation.d.ts +0 -3
  28. package/dist/rules/checkIndentation.d.ts.map +0 -1
  29. package/dist/rules/checkLineAlignment.d.ts +0 -10
  30. package/dist/rules/checkLineAlignment.d.ts.map +0 -1
  31. package/dist/rules/checkParamNames.d.ts +0 -3
  32. package/dist/rules/checkParamNames.d.ts.map +0 -1
  33. package/dist/rules/checkPropertyNames.d.ts +0 -3
  34. package/dist/rules/checkPropertyNames.d.ts.map +0 -1
  35. package/dist/rules/checkSyntax.d.ts +0 -3
  36. package/dist/rules/checkSyntax.d.ts.map +0 -1
  37. package/dist/rules/checkTagNames.d.ts +0 -3
  38. package/dist/rules/checkTagNames.d.ts.map +0 -1
  39. package/dist/rules/checkTypes.d.ts +0 -3
  40. package/dist/rules/checkTypes.d.ts.map +0 -1
  41. package/dist/rules/checkValues.d.ts +0 -3
  42. package/dist/rules/checkValues.d.ts.map +0 -1
  43. package/dist/rules/emptyTags.d.ts +0 -3
  44. package/dist/rules/emptyTags.d.ts.map +0 -1
  45. package/dist/rules/implementsOnClasses.d.ts +0 -3
  46. package/dist/rules/implementsOnClasses.d.ts.map +0 -1
  47. package/dist/rules/importsAsDependencies.d.ts +0 -3
  48. package/dist/rules/importsAsDependencies.d.ts.map +0 -1
  49. package/dist/rules/informativeDocs.d.ts +0 -3
  50. package/dist/rules/informativeDocs.d.ts.map +0 -1
  51. package/dist/rules/matchDescription.d.ts +0 -3
  52. package/dist/rules/matchDescription.d.ts.map +0 -1
  53. package/dist/rules/matchName.d.ts +0 -3
  54. package/dist/rules/matchName.d.ts.map +0 -1
  55. package/dist/rules/multilineBlocks.d.ts +0 -3
  56. package/dist/rules/multilineBlocks.d.ts.map +0 -1
  57. package/dist/rules/noBadBlocks.d.ts +0 -3
  58. package/dist/rules/noBadBlocks.d.ts.map +0 -1
  59. package/dist/rules/noBlankBlockDescriptions.d.ts +0 -3
  60. package/dist/rules/noBlankBlockDescriptions.d.ts.map +0 -1
  61. package/dist/rules/noBlankBlocks.d.ts +0 -3
  62. package/dist/rules/noBlankBlocks.d.ts.map +0 -1
  63. package/dist/rules/noDefaults.d.ts +0 -3
  64. package/dist/rules/noDefaults.d.ts.map +0 -1
  65. package/dist/rules/noMissingSyntax.d.ts +0 -10
  66. package/dist/rules/noMissingSyntax.d.ts.map +0 -1
  67. package/dist/rules/noMultiAsterisks.d.ts +0 -3
  68. package/dist/rules/noMultiAsterisks.d.ts.map +0 -1
  69. package/dist/rules/noRestrictedSyntax.d.ts +0 -3
  70. package/dist/rules/noRestrictedSyntax.d.ts.map +0 -1
  71. package/dist/rules/noTypes.d.ts +0 -3
  72. package/dist/rules/noTypes.d.ts.map +0 -1
  73. package/dist/rules/noUndefinedTypes.d.ts +0 -3
  74. package/dist/rules/noUndefinedTypes.d.ts.map +0 -1
  75. package/dist/rules/requireAsteriskPrefix.d.ts +0 -3
  76. package/dist/rules/requireAsteriskPrefix.d.ts.map +0 -1
  77. package/dist/rules/requireDescription.d.ts +0 -3
  78. package/dist/rules/requireDescription.d.ts.map +0 -1
  79. package/dist/rules/requireDescriptionCompleteSentence.d.ts +0 -3
  80. package/dist/rules/requireDescriptionCompleteSentence.d.ts.map +0 -1
  81. package/dist/rules/requireExample.d.ts +0 -3
  82. package/dist/rules/requireExample.d.ts.map +0 -1
  83. package/dist/rules/requireFileOverview.d.ts +0 -3
  84. package/dist/rules/requireFileOverview.d.ts.map +0 -1
  85. package/dist/rules/requireHyphenBeforeParamDescription.d.ts +0 -3
  86. package/dist/rules/requireHyphenBeforeParamDescription.d.ts.map +0 -1
  87. package/dist/rules/requireJsdoc.d.ts +0 -9
  88. package/dist/rules/requireJsdoc.d.ts.map +0 -1
  89. package/dist/rules/requireParam.d.ts +0 -4
  90. package/dist/rules/requireParam.d.ts.map +0 -1
  91. package/dist/rules/requireParamDescription.d.ts +0 -3
  92. package/dist/rules/requireParamDescription.d.ts.map +0 -1
  93. package/dist/rules/requireParamName.d.ts +0 -3
  94. package/dist/rules/requireParamName.d.ts.map +0 -1
  95. package/dist/rules/requireParamType.d.ts +0 -3
  96. package/dist/rules/requireParamType.d.ts.map +0 -1
  97. package/dist/rules/requireProperty.d.ts +0 -3
  98. package/dist/rules/requireProperty.d.ts.map +0 -1
  99. package/dist/rules/requirePropertyDescription.d.ts +0 -3
  100. package/dist/rules/requirePropertyDescription.d.ts.map +0 -1
  101. package/dist/rules/requirePropertyName.d.ts +0 -3
  102. package/dist/rules/requirePropertyName.d.ts.map +0 -1
  103. package/dist/rules/requirePropertyType.d.ts +0 -3
  104. package/dist/rules/requirePropertyType.d.ts.map +0 -1
  105. package/dist/rules/requireReturns.d.ts +0 -3
  106. package/dist/rules/requireReturns.d.ts.map +0 -1
  107. package/dist/rules/requireReturnsCheck.d.ts +0 -3
  108. package/dist/rules/requireReturnsCheck.d.ts.map +0 -1
  109. package/dist/rules/requireReturnsDescription.d.ts +0 -3
  110. package/dist/rules/requireReturnsDescription.d.ts.map +0 -1
  111. package/dist/rules/requireReturnsType.d.ts +0 -3
  112. package/dist/rules/requireReturnsType.d.ts.map +0 -1
  113. package/dist/rules/requireThrows.d.ts +0 -3
  114. package/dist/rules/requireThrows.d.ts.map +0 -1
  115. package/dist/rules/requireYields.d.ts +0 -3
  116. package/dist/rules/requireYields.d.ts.map +0 -1
  117. package/dist/rules/requireYieldsCheck.d.ts +0 -3
  118. package/dist/rules/requireYieldsCheck.d.ts.map +0 -1
  119. package/dist/rules/sortTags.d.ts +0 -3
  120. package/dist/rules/sortTags.d.ts.map +0 -1
  121. package/dist/rules/tagLines.d.ts +0 -3
  122. package/dist/rules/tagLines.d.ts.map +0 -1
  123. package/dist/rules/textEscaping.d.ts +0 -3
  124. package/dist/rules/textEscaping.d.ts.map +0 -1
  125. package/dist/rules/validTypes.d.ts +0 -3
  126. package/dist/rules/validTypes.d.ts.map +0 -1
  127. package/dist/tagNames.d.ts +0 -16
  128. package/dist/tagNames.d.ts.map +0 -1
  129. package/dist/utils/hasReturnValue.d.ts +0 -20
  130. package/dist/utils/hasReturnValue.d.ts.map +0 -1
  131. package/docs/advanced.md +0 -102
  132. package/docs/rules/check-access.md +0 -193
  133. package/docs/rules/check-alignment.md +0 -169
  134. package/docs/rules/check-examples.md +0 -784
  135. package/docs/rules/check-indentation.md +0 -296
  136. package/docs/rules/check-line-alignment.md +0 -1002
  137. package/docs/rules/check-param-names.md +0 -1035
  138. package/docs/rules/check-property-names.md +0 -244
  139. package/docs/rules/check-syntax.md +0 -80
  140. package/docs/rules/check-tag-names.md +0 -1132
  141. package/docs/rules/check-types.md +0 -1198
  142. package/docs/rules/check-values.md +0 -409
  143. package/docs/rules/empty-tags.md +0 -220
  144. package/docs/rules/implements-on-classes.md +0 -219
  145. package/docs/rules/imports-as-dependencies.md +0 -99
  146. package/docs/rules/informative-docs.md +0 -400
  147. package/docs/rules/match-description.md +0 -1008
  148. package/docs/rules/match-name.md +0 -249
  149. package/docs/rules/multiline-blocks.md +0 -398
  150. package/docs/rules/no-bad-blocks.md +0 -174
  151. package/docs/rules/no-blank-block-descriptions.md +0 -91
  152. package/docs/rules/no-blank-blocks.md +0 -98
  153. package/docs/rules/no-defaults.md +0 -207
  154. package/docs/rules/no-missing-syntax.md +0 -275
  155. package/docs/rules/no-multi-asterisks.md +0 -278
  156. package/docs/rules/no-restricted-syntax.md +0 -383
  157. package/docs/rules/no-types.md +0 -168
  158. package/docs/rules/no-undefined-types.md +0 -789
  159. package/docs/rules/require-asterisk-prefix.md +0 -297
  160. package/docs/rules/require-description-complete-sentence.md +0 -820
  161. package/docs/rules/require-description.md +0 -585
  162. package/docs/rules/require-example.md +0 -390
  163. package/docs/rules/require-file-overview.md +0 -324
  164. package/docs/rules/require-hyphen-before-param-description.md +0 -281
  165. package/docs/rules/require-jsdoc.md +0 -1857
  166. package/docs/rules/require-param-description.md +0 -238
  167. package/docs/rules/require-param-name.md +0 -163
  168. package/docs/rules/require-param-type.md +0 -227
  169. package/docs/rules/require-param.md +0 -1820
  170. package/docs/rules/require-property-description.md +0 -88
  171. package/docs/rules/require-property-name.md +0 -79
  172. package/docs/rules/require-property-type.md +0 -79
  173. package/docs/rules/require-property.md +0 -128
  174. package/docs/rules/require-returns-check.md +0 -1053
  175. package/docs/rules/require-returns-description.md +0 -181
  176. package/docs/rules/require-returns-type.md +0 -144
  177. package/docs/rules/require-returns.md +0 -1191
  178. package/docs/rules/require-throws.md +0 -326
  179. package/docs/rules/require-yields-check.md +0 -544
  180. package/docs/rules/require-yields.md +0 -823
  181. package/docs/rules/sort-tags.md +0 -635
  182. package/docs/rules/tag-lines.md +0 -551
  183. package/docs/rules/text-escaping.md +0 -177
  184. package/docs/rules/valid-types.md +0 -881
  185. package/docs/settings.md +0 -362
  186. package/tsconfig-prod.json +0 -20
  187. package/tsconfig.json +0 -21
@@ -1,1002 +0,0 @@
1
- <a name="user-content-check-line-alignment"></a>
2
- <a name="check-line-alignment"></a>
3
- # <code>check-line-alignment</code>
4
-
5
- * [Fixer](#user-content-check-line-alignment-fixer)
6
- * [Options](#user-content-check-line-alignment-options)
7
- * [`tags`](#user-content-check-line-alignment-options-tags)
8
- * [`customSpacings`](#user-content-check-line-alignment-options-customspacings)
9
- * [`preserveMainDescriptionPostDelimiter`](#user-content-check-line-alignment-options-preservemaindescriptionpostdelimiter)
10
- * [`wrapIndent`](#user-content-check-line-alignment-options-wrapindent)
11
- * [Context and settings](#user-content-check-line-alignment-context-and-settings)
12
- * [Failing examples](#user-content-check-line-alignment-failing-examples)
13
- * [Passing examples](#user-content-check-line-alignment-passing-examples)
14
-
15
-
16
- Reports invalid alignment of JSDoc block lines. This is a
17
- [standard recommended to WordPress code](https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/#aligning-comments),
18
- for example.
19
-
20
- <a name="user-content-check-line-alignment-fixer"></a>
21
- <a name="check-line-alignment-fixer"></a>
22
- ## Fixer
23
-
24
- (TODO)
25
-
26
- <a name="user-content-check-line-alignment-options"></a>
27
- <a name="check-line-alignment-options"></a>
28
- ## Options
29
-
30
- This rule allows one optional string argument. If it is `"always"` then a
31
- problem is raised when the lines are not aligned. If it is `"never"` then
32
- a problem should be raised when there is more than one space between each
33
- line's parts. If it is `"any"`, no alignment is made. Defaults to `"never"`.
34
-
35
- Note that in addition to alignment, the "never" and "always" options will both
36
- ensure that at least one space is present after the asterisk delimiter.
37
-
38
- After the string, an options object is allowed with the following properties.
39
-
40
- <a name="user-content-check-line-alignment-options-tags"></a>
41
- <a name="check-line-alignment-options-tags"></a>
42
- ### <code>tags</code>
43
-
44
- Use this to change the tags which are sought for alignment changes. Defaults to an array of
45
- `['param', 'arg', 'argument', 'property', 'prop', 'returns', 'return']`.
46
-
47
- <a name="user-content-check-line-alignment-options-customspacings"></a>
48
- <a name="check-line-alignment-options-customspacings"></a>
49
- ### <code>customSpacings</code>
50
-
51
- An object with any of the following keys set to an integer. Affects spacing:
52
-
53
- - `postDelimiter` - after the asterisk (e.g., `* @param`)
54
- - `postTag` - after the tag (e.g., `* @param `)
55
- - `postType` - after the type (e.g., `* @param {someType} `)
56
- - `postName` - after the name (e.g., `* @param {someType} name `)
57
- - `postHyphen` - after any hyphens in the description (e.g., `* @param {someType} name - A description`)
58
-
59
- If a spacing is not defined, it defaults to one.
60
-
61
- <a name="user-content-check-line-alignment-options-preservemaindescriptionpostdelimiter"></a>
62
- <a name="check-line-alignment-options-preservemaindescriptionpostdelimiter"></a>
63
- ### <code>preserveMainDescriptionPostDelimiter</code>
64
-
65
- A boolean to determine whether to preserve the post-delimiter spacing of the
66
- main description. If `false` or unset, will be set to a single space.
67
-
68
- <a name="user-content-check-line-alignment-options-wrapindent"></a>
69
- <a name="check-line-alignment-options-wrapindent"></a>
70
- ### <code>wrapIndent</code>
71
-
72
- The indent that will be applied for tag text after the first line.
73
- Default to the empty string (no indent).
74
-
75
- <a name="user-content-check-line-alignment-context-and-settings"></a>
76
- <a name="check-line-alignment-context-and-settings"></a>
77
- ## Context and settings
78
-
79
- |||
80
- |---|---|
81
- |Context|everywhere|
82
- |Options|string ("always", "never", "any") followed by object with `customSpacings`, `preserveMainDescriptionPostDelimiter`, `tags`, `wrapIndent`|
83
- |Tags|`param`, `property`, `returns` and others added by `tags`|
84
- |Aliases|`arg`, `argument`, `prop`, `return`|
85
- |Recommended|false|
86
-
87
- <a name="user-content-check-line-alignment-failing-examples"></a>
88
- <a name="check-line-alignment-failing-examples"></a>
89
- ## Failing examples
90
-
91
- The following patterns are considered problems:
92
-
93
- ````js
94
- /**
95
- * Function description.
96
- *
97
- * @param {string} lorem Description.
98
- * @param {int} sit Description multi words.
99
- */
100
- const fn = ( lorem, sit ) => {}
101
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
102
- // Message: Expected JSDoc block lines to be aligned.
103
-
104
- /**
105
- * With tabs.
106
- *
107
- * @param {string} lorem Description.
108
- * @param {int} sit Description multi words.
109
- */
110
- const fn = ( lorem, sit ) => {}
111
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
112
- // Message: Expected JSDoc block lines to be aligned.
113
-
114
- /**
115
- * Function description.
116
- *
117
- * @param {string} lorem - Description.
118
- * @param {int} sit - Description multi words.
119
- */
120
- const fn = ( lorem, sit ) => {}
121
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
122
- // Message: Expected JSDoc block lines to be aligned.
123
-
124
- /**
125
- * Function description.
126
- *
127
- * @param {string} lorem Description.
128
- * @param {int} sit Description multi words.
129
- */
130
- const fn = ( lorem, sit ) => {}
131
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
132
- // Message: Expected JSDoc block lines to be aligned.
133
-
134
- /**
135
- * Function description.
136
- *
137
- * @param {string} lorem Description.
138
- * @param {int} sit Description multi words.
139
- */
140
- const fn = ( lorem, sit ) => {}
141
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
142
- // Message: Expected JSDoc block lines to be aligned.
143
-
144
- /**
145
- * Function description.
146
- *
147
- * @param {string} lorem Description.
148
- * @param {int} sit Description multi words.
149
- */
150
- const fn = ( lorem, sit ) => {}
151
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
152
- // Message: Expected JSDoc block lines to be aligned.
153
-
154
- /**
155
- * Function description.
156
- *
157
- * @param {string} lorem Description.
158
- * @param {int} sit Description multi words.
159
- */
160
- const fn = ( lorem, sit ) => {}
161
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
162
- // Message: Expected JSDoc block lines to be aligned.
163
-
164
- /**
165
- * Function description.
166
- *
167
- * @param {string} lorem Description.
168
- * @param {int} sit Description multi words.
169
- */
170
- function fn( lorem, sit ) {}
171
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
172
- // Message: Expected JSDoc block lines to be aligned.
173
-
174
- const object = {
175
- /**
176
- * Function description.
177
- *
178
- * @param {string} lorem Description.
179
- * @param {int} sit Description multi words.
180
- */
181
- fn( lorem, sit ) {}
182
- }
183
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
184
- // Message: Expected JSDoc block lines to be aligned.
185
-
186
- class ClassName {
187
- /**
188
- * Function description.
189
- *
190
- * @param {string} lorem Description.
191
- * @param {int} sit Description multi words.
192
- */
193
- fn( lorem, sit ) {}
194
- }
195
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
196
- // Message: Expected JSDoc block lines to be aligned.
197
-
198
- /**
199
- * Function description.
200
- *
201
- * @arg {string} lorem Description.
202
- * @arg {int} sit Description multi words.
203
- */
204
- const fn = ( lorem, sit ) => {}
205
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
206
- // Message: Expected JSDoc block lines to be aligned.
207
-
208
- /**
209
- * @namespace
210
- * @property {object} defaults Description.
211
- * @property {int} defaults.lorem Description multi words.
212
- */
213
- const config = {
214
- defaults: {
215
- lorem: 1
216
- }
217
- }
218
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
219
- // Message: Expected JSDoc block lines to be aligned.
220
-
221
- /**
222
- * My object.
223
- *
224
- * @typedef {Object} MyObject
225
- *
226
- * @property {string} lorem Description.
227
- * @property {int} sit Description multi words.
228
- */
229
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
230
- // Message: Expected JSDoc block lines to be aligned.
231
-
232
- /**
233
- * My object.
234
- *
235
- * @typedef {Object} MyObject
236
- *
237
- * @property {{a: number, b: string, c}} lorem Description.
238
- * @property {Object.<string, Class>} sit Description multi words.
239
- * @property {Object.<string, Class>} amet Description} weird {multi} {{words}}.
240
- * @property {Object.<string, Class>} dolor
241
- */
242
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
243
- // Message: Expected JSDoc block lines to be aligned.
244
-
245
- /**
246
- * My object.
247
- *
248
- * @typedef {Object} MyObject
249
- *
250
- * @property {{a: number, b: string, c}} lorem Description.
251
- * @property {Object.<string, Class>} sit Description multi words.
252
- * @property {Object.<string, Class>} amet Description} weird {multi} {{words}}.
253
- * @property {Object.<string, Class>} dolor
254
- */
255
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"tags":["typedef","property"]}]
256
- // Message: Expected JSDoc block lines to be aligned.
257
-
258
- /**
259
- * My function.
260
- *
261
- * @param {string} lorem Description.
262
- * @param {int} sit Description multi words.
263
- */
264
- const fn = ( lorem, sit ) => {}
265
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
266
- // Message: Expected JSDoc block lines to not be aligned.
267
-
268
- /**
269
- * My function.
270
- *
271
- * @param {string} lorem Description.
272
- * @param {int} sit Description multi words.
273
- */
274
- const fn = ( lorem, sit ) => {}
275
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
276
- // Message: Expected JSDoc block lines to not be aligned.
277
-
278
- /**
279
- * My function.
280
- *
281
- * @param {string} lorem Description.
282
- * @param {int} sit
283
- */
284
- const fn = ( lorem, sit ) => {}
285
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
286
- // Message: Expected JSDoc block lines to not be aligned.
287
-
288
- /**
289
- * My function.
290
- *
291
- * @param {string} lorem Description.
292
- * @param {int} sit
293
- */
294
- const fn = ( lorem, sit ) => {}
295
- // Message: Expected JSDoc block lines to not be aligned.
296
-
297
- /**
298
- * Function description.
299
- *
300
- * @param {string} lorem Description.
301
- * @param {int} sit Description multi
302
- line without *.
303
- */
304
- const fn = ( lorem, sit ) => {}
305
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
306
- // Message: Expected JSDoc block lines to be aligned.
307
-
308
- /**
309
- * My function.
310
- *
311
- * @param {string} lorem Description.
312
- * @param {int} sit
313
- *
314
- * @return {string} Return description
315
- * with multi line, but don't touch.
316
- */
317
- const fn = ( lorem, sit ) => {}
318
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"tags":["param"]}]
319
- // Message: Expected JSDoc block lines to be aligned.
320
-
321
- /**
322
- * Only return doc.
323
- *
324
- * @return {boolean} Return description.
325
- */
326
- const fn = ( lorem, sit ) => {}
327
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
328
- // Message: Expected JSDoc block lines to be aligned.
329
-
330
- /**
331
- * Creates OS based shortcuts for files, folders, and applications.
332
- *
333
- * @param {object} options Options object for each OS.
334
- * @return {boolean} True = success, false = failed to create the icon
335
- */
336
- function quux () {}
337
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
338
- // Message: Expected JSDoc block lines to not be aligned.
339
-
340
- /**
341
- * Creates OS based shortcuts for files, folders, and applications.
342
- *
343
- * @param {object} options Options object for each OS.
344
- * @return {boolean} True = success, false = failed to create the icon
345
- */
346
- function quux () {}
347
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
348
- // Message: Expected JSDoc block lines to not be aligned.
349
-
350
- /**
351
- * Creates OS based shortcuts for files, folders, and applications.
352
- *
353
- * @param {object} options Options object for each OS.
354
- * @return True = success, false = failed to create the icon
355
- */
356
- function quux () {}
357
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
358
- // Message: Expected JSDoc block lines to not be aligned.
359
-
360
- /**
361
- * Creates OS based shortcuts for files, folders, and applications.
362
- *
363
- * @param options Options object for each OS.
364
- * @return True = success, false = failed to create the icon
365
- */
366
- function quux () {}
367
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
368
- // Message: Expected JSDoc block lines to not be aligned.
369
-
370
- /**
371
- * Creates OS based shortcuts for files, folders, and applications.
372
- *
373
- * @param {object} options Options object for each OS.
374
- * @param {object} other Other.
375
- * @return True = success, false = failed to create the icon
376
- */
377
- function quux () {}
378
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"tags":["param","return"]}]
379
- // Message: Expected JSDoc block lines to not be aligned.
380
-
381
- /**
382
- * Returns the value stored in the process.env for a given
383
- * environment variable.
384
- *
385
- * @param {string} withPercents '%USERNAME%'
386
- * @param {string} withoutPercents 'USERNAME'
387
- * @return {string} 'bob' || '%USERNAME%'
388
- */
389
- function quux () {}
390
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
391
- // Message: Expected JSDoc block lines to not be aligned.
392
-
393
- /**
394
- * Function description
395
- * description with post delimiter.
396
- *
397
- * @param {string} lorem Description.
398
- * @param {int} sit Description multi words.
399
- */
400
- const fn = ( lorem, sit ) => {}
401
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
402
- // Message: Expected JSDoc block lines to be aligned.
403
-
404
- /**
405
- * Function description.
406
- *
407
- * @param {string} lorem Description.
408
- * @param {int} sit Description multi words.
409
- *
410
- * @return {string} Return description.
411
- */
412
- const fn = ( lorem, sit ) => {}
413
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"customSpacings":{"postDelimiter":2,"postTag":3,"postType":2}}]
414
- // Message: Expected JSDoc block lines to be aligned.
415
-
416
- /**
417
- * Function description.
418
- *
419
- * @param {string} lorem Description.
420
- * @param {int} sit Description multi words.
421
- *
422
- * @return {string} Return description.
423
- */
424
- const fn = ( lorem, sit ) => {}
425
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"customSpacings":{"postName":3}}]
426
- // Message: Expected JSDoc block lines to be aligned.
427
-
428
- /**
429
- * Function description.
430
- *
431
- * @param {string} lorem Description.
432
- * @param {int} sit Description multi words.
433
- */
434
- const fn = ( lorem, sit ) => {}
435
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"customSpacings":{"postDelimiter":2,"postTag":3,"postType":2}}]
436
- // Message: Expected JSDoc block lines to not be aligned.
437
-
438
- /**
439
- * Function description.
440
- *
441
- * @param {string} lorem Description.
442
- * @param {int} sit Description multi words.
443
- */
444
- const fn = ( lorem, sit ) => {}
445
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"customSpacings":{"postName":3}}]
446
- // Message: Expected JSDoc block lines to not be aligned.
447
-
448
-
449
- /**\r
450
- * Function description.\r
451
- *\r
452
- * @param {string} lorem Description.\r
453
- * @param {int} sit Description multi words.\r
454
- * @param {string} sth Multi\r
455
- * line description.\r
456
- */\r
457
- const fn = ( lorem, sit ) => {}
458
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
459
- // Message: Expected JSDoc block lines to be aligned.
460
-
461
- /**
462
- * Function description.
463
- *
464
- * @param {string} lorem Description.
465
- * @param {int} sit Description multi
466
- * line with asterisks.
467
- */
468
- const fn = ( lorem, sit ) => {}
469
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
470
- // Message: Expected JSDoc block lines to be aligned.
471
-
472
- /**
473
- * Function description.
474
- *
475
- * @param {string} lorem - Description.
476
- * @param {int} sit - Description multi words.
477
- */
478
- const fn = ( lorem, sit ) => {}
479
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
480
- // Message: Expected JSDoc block lines to not be aligned.
481
-
482
- /**
483
- * Function description.
484
- *
485
- * @param {string} lorem - Description.
486
- * @param {int} sit - Description multi words.
487
- */
488
- const fn = ( lorem, sit ) => {}
489
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"customSpacings":{"postHyphen":2}}]
490
- // Message: Expected JSDoc block lines to not be aligned.
491
-
492
- /**
493
- * Function description.
494
- *
495
- * @param {string} lorem - Description.
496
- * @param {int} sit - Description multi words.
497
- */
498
- const fn = ( lorem, sit ) => {}
499
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"customSpacings":{"postHyphen":2}}]
500
- // Message: Expected JSDoc block lines to not be aligned.
501
-
502
- /**
503
- * Function description.
504
- *
505
- * @param {string} lorem - Description.
506
- * @param {int} sit - Description multi words.
507
- */
508
- const fn = ( lorem, sit ) => {}
509
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"customSpacings":{"postHyphen":2}}]
510
- // Message: Expected JSDoc block lines to be aligned.
511
-
512
- /**
513
- * Function description.
514
- *
515
- * @param {string} lorem - Description.
516
- * @param {int} sit - Description multi words.
517
- */
518
- const fn = ( lorem, sit ) => {}
519
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"customSpacings":{"postHyphen":2}}]
520
- // Message: Expected JSDoc block lines to be aligned.
521
-
522
- /**
523
- * Function description.
524
- *
525
- * @param {string} lorem - Description.
526
- * @param {int} sit - Description multi words.
527
- */
528
- const fn = ( lorem, sit ) => {}
529
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"customSpacings":{"postHyphen":2}}]
530
- // Message: Expected JSDoc block lines to not be aligned.
531
-
532
- /**
533
- * @param {string} lorem Description
534
- * with multiple lines.
535
- */
536
- function quux () {
537
- }
538
- // "jsdoc/check-line-alignment": ["error"|"warn", "any",{"wrapIndent":" "}]
539
- // Message: Expected wrap indent
540
-
541
- /**
542
- * Function description.
543
- *
544
- * @param {string} lorem Description.
545
- * @param {int} sit Description multi
546
- * line with asterisks.
547
- */
548
- const fn = ( lorem, sit ) => {}
549
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"wrapIndent":" "}]
550
- // Message: Expected JSDoc block lines to be aligned.
551
-
552
- /**
553
- * My function.
554
- *
555
- * @param {string} lorem Description.
556
- * @param {int} sit Description multiple
557
- * lines.
558
- */
559
- const fn = ( lorem, sit ) => {}
560
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":" "}]
561
- // Message: Expected JSDoc block lines to not be aligned.
562
-
563
- /**
564
- * @property {boolean} tls_verify_client_certificate - Whether our API should
565
- * enable TLS client authentication
566
- */
567
- function quux () {}
568
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":" "}]
569
- // Message: Expected wrap indent
570
-
571
- /**
572
- * @property {boolean} tls_verify_client_certificate - Whether our API should
573
- * enable TLS client authentication
574
- */
575
- function quux () {}
576
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":""}]
577
- // Message: Expected wrap indent
578
- ````
579
-
580
-
581
-
582
- <a name="user-content-check-line-alignment-passing-examples"></a>
583
- <a name="check-line-alignment-passing-examples"></a>
584
- ## Passing examples
585
-
586
- The following patterns are not considered problems:
587
-
588
- ````js
589
- /**
590
- * Function description.
591
- *
592
- * @param {string} lorem Description.
593
- * @param {int} sit Description multi words.
594
- */
595
- const fn = ( lorem, sit ) => {}
596
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
597
-
598
- /**
599
- * With tabs.
600
- *
601
- * @param {string} lorem Description.
602
- * @param {int} sit Description multi words.
603
- */
604
- const fn = ( lorem, sit ) => {}
605
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
606
-
607
- /**
608
- * Function description.
609
- *
610
- * @param {string} lorem - Description.
611
- * @param {int} sit - Description multi words.
612
- */
613
- const fn = ( lorem, sit ) => {}
614
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
615
-
616
- /**
617
- * @param {string} lorem Description.
618
- * @param {int} sit
619
- */
620
- const fn = ( lorem, sit ) => {}
621
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
622
-
623
- /**
624
- * @param {int} sit
625
- * @param {string} lorem Description.
626
- */
627
- const fn = ( lorem, sit ) => {}
628
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
629
-
630
- /**
631
- * No params.
632
- */
633
- const fn = () => {}
634
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
635
-
636
- const fn = ( lorem, sit ) => {}
637
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
638
-
639
- /**
640
- * Function description.
641
- *
642
- * @param {string} lorem Description.
643
- * @param {int} sit Description multi words.
644
- */
645
- function fn( lorem, sit ) {}
646
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
647
-
648
- const object = {
649
- /**
650
- * Function description.
651
- *
652
- * @param {string} lorem Description.
653
- * @param {int} sit Description multi words.
654
- */
655
- fn( lorem, sit ) {},
656
- }
657
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
658
-
659
- class ClassName {
660
- /**
661
- * Function description.
662
- *
663
- * @param {string} lorem Description.
664
- * @param {int} sit Description multi words.
665
- */
666
- fn( lorem, sit ) {}
667
- }
668
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
669
-
670
- /**
671
- * Function description.
672
- *
673
- * @arg {string} lorem Description.
674
- * @arg {int} sit Description multi words.
675
- */
676
- const fn = ( lorem, sit ) => {}
677
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
678
-
679
- /**
680
- * @namespace
681
- * @property {object} defaults Description.
682
- * @property {int} defaults.lorem Description multi words.
683
- */
684
- const config = {
685
- defaults: {
686
- lorem: 1
687
- }
688
- }
689
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
690
-
691
- /**
692
- * My object.
693
- *
694
- * @typedef {Object} MyObject
695
- *
696
- * @property {string} lorem Description.
697
- * @property {int} sit Description multi words.
698
- */
699
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
700
-
701
- /**
702
- * My object.
703
- *
704
- * @typedef {Object} MyObject
705
- *
706
- * @property {{a: number, b: string, c}} lorem Description.
707
- * @property {Object.<string, Class>} sit Description multi words.
708
- * @property {Object.<string, Class>} amet Description} weird {multi} {{words}}.
709
- * @property {Object.<string, Class>} dolor
710
- */
711
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
712
-
713
- /**
714
- * My object.
715
- *
716
- * @typedef {Object} MyObject
717
- *
718
- * @property {{a: number, b: string, c}} lorem Description.
719
- * @property {Object.<string, Class>} sit Description multi words.
720
- * @property {Object.<string, Class>} amet Description} weird {multi} {{words}}.
721
- * @property {Object.<string, Class>} dolor
722
- */
723
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"tags":["typedef","property"]}]
724
-
725
- /**
726
- * My object.
727
- *
728
- * @template T
729
- * @template W,X,Y,Z
730
- * @template {string} K - K must be a string or string literal
731
- * @template {{ serious(): string }} Seriousalizable - must have a serious method
732
- *
733
- * @param {{a: number, b: string, c}} lorem Description.
734
- */
735
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"tags":["template","param"]}]
736
-
737
- /** @param {number} lorem */
738
- const fn = ( lorem ) => {}
739
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
740
-
741
- /**
742
- * Creates OS based shortcuts for files, folders, and applications.
743
- *
744
- * @param {object} options Options object for each OS.
745
- * @return {boolean} True = success, false = failed to create the icon
746
- */
747
- function quux () {}
748
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
749
-
750
- /**
751
- * Creates OS based shortcuts for files, folders, and applications.
752
- *
753
- * @param {object} options Options object for each OS.
754
- * @return {boolean}
755
- */
756
- function quux () {}
757
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
758
-
759
- /**
760
- * Only return doc.
761
- *
762
- * @return {boolean} Return description.
763
- */
764
- function quux () {}
765
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
766
-
767
- /**
768
- * Not validating without option.
769
- *
770
- * @param {string} lorem Description.
771
- * @param {int} sit Description multi words.
772
- */
773
- const fn = ( lorem, sit ) => {}
774
-
775
- /**
776
- * Creates OS based shortcuts for files, folders, and applications.
777
- *
778
- * @param {object} options Options object for each OS.
779
- * @return {boolean} True = success, false = failed to create the icon
780
- */
781
- function quux (options) {}
782
-
783
- /**
784
- * Creates OS based shortcuts for files, folders, and applications.
785
- *
786
- * @param {object} options Options object for each OS.
787
- * @param {object} other Other.
788
- * @return True = success, false = failed to create the icon
789
- */
790
- function quux () {}
791
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"tags":["param"]}]
792
-
793
- /**
794
- * @param parameter Description.
795
- */
796
- function func(parameter){
797
-
798
- }
799
-
800
- /**
801
- * Function description
802
- * description with post delimiter.
803
- *
804
- * @param {string} lorem Description.
805
- * @param {int} sit Description multi words.
806
- */
807
- const fn = ( lorem, sit ) => {}
808
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"preserveMainDescriptionPostDelimiter":true}]
809
-
810
- /**
811
- * Function description.
812
- *
813
- * @param {string} lorem Description.
814
- * @param {int} sit Description multi words.
815
- *
816
- * @return {string} Return description.
817
- */
818
- const fn = ( lorem, sit ) => {}
819
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"customSpacings":{"postDelimiter":2,"postTag":3,"postType":2}}]
820
-
821
- /**
822
- * Function description.
823
- *
824
- * @param {string} lorem Description.
825
- * @param {int} sit Description multi words.
826
- *
827
- * @return {string} Return description.
828
- */
829
- const fn = ( lorem, sit ) => {}
830
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"customSpacings":{"postDelimiter":2,"postTag":3,"postType":2}}]
831
-
832
- /**
833
- * @param {{
834
- * ids: number[]
835
- * }} params
836
- */
837
- const fn = ({ids}) => {}
838
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
839
-
840
-
841
- /**\r
842
- * Function description.\r
843
- *\r
844
- * @param {string} lorem Description.\r
845
- * @param {int} sit Description multi words.\r
846
- * @param {string} sth Multi\r
847
- * line description.\r
848
- */\r
849
- const fn = ( lorem, sit ) => {}
850
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
851
-
852
- /**
853
- * Function description.
854
- *
855
- * @param lorem Description.
856
- * @param sit Description multi words.
857
- */
858
- const fn = ( lorem, sit ) => {};
859
-
860
- /**
861
- * Function description.
862
- *
863
- * @return Return description.
864
- */
865
- const fn2 = () => {}
866
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
867
-
868
- /**
869
- * Function description.
870
- *
871
- * @param lorem Description.
872
- * @param sit Description multi words.
873
- * @return Return description.
874
- */
875
- const fn = ( lorem, sit ) => {};
876
-
877
- /**
878
- * Function description.
879
- *
880
- * @param lorem Description.
881
- * @param sit Description multi words.
882
- * @returns Return description.
883
- */
884
- const fn2 = ( lorem, sit ) => {};
885
-
886
- /**
887
- * Function description.
888
- *
889
- * @param a Description.
890
- * @param b Description multi words.
891
- * @returns Return description.
892
- */
893
- const fn3 = ( a, b ) => {};
894
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
895
-
896
- /**
897
- * Function description.
898
- *
899
- * @argument lorem Description.
900
- * @return Return description.
901
- */
902
- const fn = ( lorem ) => {};
903
-
904
- /**
905
- * Function description.
906
- *
907
- * @argument lorem Description.
908
- * @returns Return description.
909
- */
910
- const fn2 = ( lorem ) => {};
911
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
912
-
913
- /**
914
- * Function description.
915
- *
916
- * @arg a Description.
917
- * @returns Return description.
918
- */
919
- const fn = ( a ) => {};
920
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
921
-
922
- /**
923
- * Function description.
924
- *
925
- * @arg lorem Description.
926
- * @param sit Return description.
927
- */
928
- const fn = ( lorem, sit ) => {};
929
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
930
-
931
- /**
932
- * Function description.
933
- *
934
- * @arg a Description.
935
- * @argument b Second description.
936
- * @returns Return description.
937
- */
938
- const fn = ( a, b ) => {};
939
- // "jsdoc/check-line-alignment": ["error"|"warn", "always"]
940
-
941
- /**
942
- * @param {string} lorem Description
943
- * with multiple lines.
944
- */
945
- function quux () {
946
- }
947
- // "jsdoc/check-line-alignment": ["error"|"warn", "any",{"wrapIndent":" "}]
948
-
949
- /**
950
- * @param {string} lorem Description
951
- * with multiple lines.
952
- */
953
- function quux () {
954
- }
955
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":" "}]
956
-
957
- /**
958
- * Function description.
959
- *
960
- * @param {string} lorem Description.
961
- * @param {int} sit Description multi
962
- * line with asterisks.
963
- */
964
- const fn = ( lorem, sit ) => {}
965
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"wrapIndent":" "}]
966
-
967
- /**
968
- * Function description.
969
- *
970
- * @param {string} lorem Description.
971
- * @param {int} sit Description multi
972
- * line with
973
- * asterisks.
974
- */
975
- const fn = ( lorem, sit ) => {}
976
- // "jsdoc/check-line-alignment": ["error"|"warn", "always",{"wrapIndent":" "}]
977
-
978
- /**
979
- * @param {
980
- * string | number
981
- * } lorem Description
982
- * with multiple lines.
983
- */
984
- function quux () {
985
- }
986
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":" "}]
987
-
988
- /**
989
- * @param {string|string[]|TemplateResult|TemplateResult[]} event.detail.description -
990
- * Notification description
991
- */
992
- function quux () {}
993
- // "jsdoc/check-line-alignment": ["error"|"warn", "never",{"wrapIndent":" "}]
994
-
995
- /**
996
- * Returns cached value of negative scale of the world transform.
997
- *
998
- * @returns {number} -1 if world transform has negative scale, 1 otherwise.
999
- */
1000
- // "jsdoc/check-line-alignment": ["error"|"warn", "never"]
1001
- ````
1002
-