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,219 +0,0 @@
1
- <a name="user-content-implements-on-classes"></a>
2
- <a name="implements-on-classes"></a>
3
- # <code>implements-on-classes</code>
4
-
5
- * [Options](#user-content-implements-on-classes-options)
6
- * [`contexts`](#user-content-implements-on-classes-options-contexts)
7
- * [Context and settings](#user-content-implements-on-classes-context-and-settings)
8
- * [Failing examples](#user-content-implements-on-classes-failing-examples)
9
- * [Passing examples](#user-content-implements-on-classes-passing-examples)
10
-
11
-
12
- Reports an issue with any non-constructor function using `@implements`.
13
-
14
- Constructor functions, whether marked with `@class`, `@constructs`, or being
15
- an ES6 class constructor, will not be flagged.
16
-
17
- To indicate that a function follows another function's signature, one might
18
- instead use `@type` to indicate the `@function` or `@callback` to which the
19
- function is adhering.
20
-
21
- <a name="user-content-implements-on-classes-options"></a>
22
- <a name="implements-on-classes-options"></a>
23
- ## Options
24
-
25
- <a name="user-content-implements-on-classes-options-contexts"></a>
26
- <a name="implements-on-classes-options-contexts"></a>
27
- ### <code>contexts</code>
28
-
29
- Set this to an array of strings representing the AST context (or an object with
30
- `context` and `comment` properties) where you wish the rule to be applied.
31
-
32
- Overrides the default contexts (see below). Set to `"any"` if you want
33
- the rule to apply to any jsdoc block throughout your files (as is necessary
34
- for finding function blocks not attached to a function declaration or
35
- expression, i.e., `@callback` or `@function` (or its aliases `@func` or
36
- `@method`) (including those associated with an `@interface`).
37
-
38
- See the ["AST and Selectors"](#user-content-eslint-plugin-jsdoc-advanced-ast-and-selectors)
39
- section of our README for more on the expected format.
40
-
41
- <a name="user-content-implements-on-classes-context-and-settings"></a>
42
- <a name="implements-on-classes-context-and-settings"></a>
43
- ## Context and settings
44
-
45
- |||
46
- |---|---|
47
- |Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
48
- |Tags|`implements` (prevented)|
49
- |Recommended|true|
50
- |Options|`contexts`|
51
-
52
- <a name="user-content-implements-on-classes-failing-examples"></a>
53
- <a name="implements-on-classes-failing-examples"></a>
54
- ## Failing examples
55
-
56
- The following patterns are considered problems:
57
-
58
- ````js
59
- /**
60
- * @implements {SomeClass}
61
- */
62
- function quux () {
63
-
64
- }
65
- // Message: @implements used on a non-constructor function
66
-
67
- /**
68
- * @implements {SomeClass}
69
- */
70
- function quux () {
71
-
72
- }
73
- // "jsdoc/implements-on-classes": ["error"|"warn", {"contexts":["any"]}]
74
- // Message: @implements used on a non-constructor function
75
-
76
- /**
77
- * @function
78
- * @implements {SomeClass}
79
- */
80
- function quux () {
81
-
82
- }
83
- // "jsdoc/implements-on-classes": ["error"|"warn", {"contexts":["any"]}]
84
- // Message: @implements used on a non-constructor function
85
-
86
- /**
87
- * @callback
88
- * @implements {SomeClass}
89
- */
90
- // "jsdoc/implements-on-classes": ["error"|"warn", {"contexts":["any"]}]
91
- // Message: @implements used on a non-constructor function
92
-
93
- /**
94
- * @implements {SomeClass}
95
- */
96
- function quux () {
97
-
98
- }
99
- // Settings: {"jsdoc":{"tagNamePreference":{"implements":false}}}
100
- // Message: Unexpected tag `@implements`
101
-
102
- class Foo {
103
- /**
104
- * @implements {SomeClass}
105
- */
106
- constructor() {}
107
-
108
- /**
109
- * @implements {SomeClass}
110
- */
111
- bar() {}
112
- }
113
- // "jsdoc/implements-on-classes": ["error"|"warn", {"contexts":["MethodDefinition"]}]
114
- // Message: @implements used on a non-constructor function
115
-
116
- class Foo {
117
- /**
118
- * @implements {SomeClass}
119
- */
120
- constructor() {}
121
-
122
- /**
123
- * @implements {SomeClass}
124
- */
125
- bar() {}
126
- }
127
- // "jsdoc/implements-on-classes": ["error"|"warn", {"contexts":["any"]}]
128
- // Message: @implements used on a non-constructor function
129
- ````
130
-
131
-
132
-
133
- <a name="user-content-implements-on-classes-passing-examples"></a>
134
- <a name="implements-on-classes-passing-examples"></a>
135
- ## Passing examples
136
-
137
- The following patterns are not considered problems:
138
-
139
- ````js
140
- /**
141
- * @implements {SomeClass}
142
- * @class
143
- */
144
- function quux () {
145
-
146
- }
147
-
148
- /**
149
- * @implements {SomeClass}
150
- * @class
151
- */
152
- function quux () {
153
-
154
- }
155
- // "jsdoc/implements-on-classes": ["error"|"warn", {"contexts":["any"]}]
156
-
157
- /**
158
- * @implements {SomeClass}
159
- */
160
- // "jsdoc/implements-on-classes": ["error"|"warn", {"contexts":["any"]}]
161
-
162
- /**
163
- * @implements {SomeClass}
164
- * @constructor
165
- */
166
- function quux () {
167
-
168
- }
169
-
170
- /**
171
- *
172
- */
173
- class quux {
174
- /**
175
- * @implements {SomeClass}
176
- */
177
- constructor () {
178
-
179
- }
180
- }
181
-
182
- /**
183
- *
184
- */
185
- const quux = class {
186
- /**
187
- * @implements {SomeClass}
188
- */
189
- constructor () {
190
-
191
- }
192
- }
193
-
194
- /**
195
- *
196
- */
197
- function quux () {
198
-
199
- }
200
-
201
- /**
202
- *
203
- */
204
- function quux () {
205
-
206
- }
207
- // Settings: {"jsdoc":{"tagNamePreference":{"implements":false}}}
208
-
209
- /**
210
- * @function
211
- * @implements {SomeClass}
212
- */
213
-
214
- /**
215
- * @callback
216
- * @implements {SomeClass}
217
- */
218
- ````
219
-
@@ -1,99 +0,0 @@
1
- <a name="user-content-imports-as-dependencies"></a>
2
- <a name="imports-as-dependencies"></a>
3
- ### <code>imports-as-dependencies</code>
4
-
5
- This rule will report an issue if JSDoc `import()` statements point to a package
6
- which is not listed in `dependencies` or `devDependencies`.
7
-
8
- |||
9
- |---|---|
10
- |Context|everywhere|
11
- |Tags|(Any)|
12
- |Recommended|false|
13
- |Settings||
14
- |Options||
15
-
16
- <a name="user-content-failing-examples"></a>
17
- <a name="failing-examples"></a>
18
- ## Failing examples
19
-
20
- The following patterns are considered problems:
21
-
22
- ````js
23
- /**
24
- * @type {null|import('sth').SomeApi}
25
- */
26
- // Message: import points to package which is not found in dependencies
27
-
28
- /**
29
- * @type {null|import('sth').SomeApi}
30
- */
31
- // Settings: {"jsdoc":{"mode":"permissive"}}
32
- // Message: import points to package which is not found in dependencies
33
-
34
- /**
35
- * @type {null|import('missingpackage/subpackage').SomeApi}
36
- */
37
- // Message: import points to package which is not found in dependencies
38
-
39
- /**
40
- * @type {null|import('@sth/pkg').SomeApi}
41
- */
42
- // Message: import points to package which is not found in dependencies
43
- ````
44
-
45
-
46
-
47
- <a name="user-content-passing-examples"></a>
48
- <a name="passing-examples"></a>
49
- ## Passing examples
50
-
51
- The following patterns are not considered problems:
52
-
53
- ````js
54
- /**
55
- * @type {null|import('eslint').ESLint}
56
- */
57
-
58
- /**
59
- * @type {null|import('eslint/use-at-your-own-risk').ESLint}
60
- */
61
-
62
- /**
63
- * @type {null|import('@es-joy/jsdoccomment').InlineTag}
64
- */
65
-
66
- /**
67
- * @type {null|import(}
68
- */
69
-
70
- /**
71
- * @type {null|import('esquery').ESQueryOptions}
72
- */
73
-
74
- /**
75
- * @type {null|import('@es-joy/jsdoccomment').InlineTag|
76
- * import('@es-joy/jsdoccomment').JsdocBlock}
77
- */
78
-
79
- /**
80
- * @type {null|import('typescript').Program}
81
- */
82
-
83
- /**
84
- * @type {null|import('./relativePath.js').Program}
85
- */
86
-
87
- /**
88
- * @type {null|import('fs').PathLike}
89
- */
90
-
91
- /**
92
- * @type {null|import('fs/promises').FileHandle}
93
- */
94
-
95
- /**
96
- * @type {null|import('node:fs').PathLike}
97
- */
98
- ````
99
-
@@ -1,400 +0,0 @@
1
- <a name="user-content-informative-docs"></a>
2
- <a name="informative-docs"></a>
3
- # <code>informative-docs</code>
4
-
5
- * [Options](#user-content-informative-docs-options)
6
- * [`aliases`](#user-content-informative-docs-options-aliases)
7
- * [`uselessWords`](#user-content-informative-docs-options-uselesswords)
8
- * [Context and settings](#user-content-informative-docs-context-and-settings)
9
- * [Failing examples](#user-content-informative-docs-failing-examples)
10
- * [Passing examples](#user-content-informative-docs-passing-examples)
11
-
12
-
13
- Reports on JSDoc texts that serve only to restart their attached name.
14
-
15
- Devs sometimes write JSDoc descriptions that add no additional information just to fill out the doc:
16
-
17
- ```js
18
- /** The user id. */
19
- let userId;
20
- ```
21
-
22
- Those "uninformative" docs comments take up space without being helpful.
23
- This rule requires all docs comments contain at least one word not already in the code.
24
-
25
- <a name="user-content-informative-docs-options"></a>
26
- <a name="informative-docs-options"></a>
27
- ## Options
28
-
29
- <a name="user-content-informative-docs-options-aliases"></a>
30
- <a name="informative-docs-options-aliases"></a>
31
- ### <code>aliases</code>
32
-
33
- The `aliases` option allows indicating words as synonyms (aliases) of each other.
34
-
35
- For example, with `{ aliases: { emoji: ["smiley", "winkey"] } }`, the following comment would be considered uninformative:
36
-
37
- ```js
38
- /** A smiley/winkey. */
39
- let emoji;
40
- ```
41
-
42
- The default `aliases` option is:
43
-
44
- ```json
45
- {
46
- "a": ["an", "our"]
47
- }
48
- ```
49
-
50
- <a name="user-content-informative-docs-options-uselesswords"></a>
51
- <a name="informative-docs-options-uselesswords"></a>
52
- ### <code>uselessWords</code>
53
-
54
- Words that are ignored when searching for one that adds meaning.
55
-
56
- For example, with `{ uselessWords: ["our"] }`, the following comment would be considered uninformative:
57
-
58
- ```js
59
- /** Our text. */
60
- let text;
61
- ```
62
-
63
- The default `uselessWords` option is:
64
-
65
- ```json
66
- ["a", "an", "i", "in", "of", "s", "the"]
67
- ```
68
-
69
- <a name="user-content-informative-docs-context-and-settings"></a>
70
- <a name="informative-docs-context-and-settings"></a>
71
- ## Context and settings
72
-
73
- |||
74
- |---|---|
75
- |Context|everywhere|
76
- |Tags|any|
77
- |Recommended|false|
78
- |Settings||
79
- |Options|`aliases`, `uselessWords`|
80
-
81
- <a name="user-content-informative-docs-failing-examples"></a>
82
- <a name="informative-docs-failing-examples"></a>
83
- ## Failing examples
84
-
85
- The following patterns are considered problems:
86
-
87
- ````js
88
- /** the */
89
- let myValue = 3;
90
- // Message: This description only repeats the name it describes.
91
-
92
- /** The user id. */
93
- let userId: string;
94
- // Message: This description only repeats the name it describes.
95
-
96
- /** the my value */
97
- let myValue = 3;
98
- // Message: This description only repeats the name it describes.
99
-
100
- /** value **/
101
- let myValue,
102
- count = 3;
103
- // Message: This description only repeats the name it describes.
104
-
105
- let myValue,
106
- /** count **/
107
- count = 3;
108
- // Message: This description only repeats the name it describes.
109
-
110
- /**
111
- * the foo.
112
- */
113
- function foo() {}
114
- // Message: This description only repeats the name it describes.
115
-
116
- /**
117
- * the value foo.
118
- */
119
- const value = function foo() {}
120
- // Message: This description only repeats the name it describes.
121
-
122
- const value = {
123
- /**
124
- * the prop.
125
- */
126
- prop: true,
127
- }
128
- // Message: This description only repeats the name it describes.
129
-
130
- /**
131
- * name
132
- */
133
- class Name {}
134
- // Message: This description only repeats the name it describes.
135
-
136
- /**
137
- * abc def
138
- */
139
- const abc = class Def {}
140
- // Message: This description only repeats the name it describes.
141
-
142
- class Abc {
143
- /** the abc def! */
144
- def;
145
- }
146
- // Message: This description only repeats the name it describes.
147
-
148
- const _ = class Abc {
149
- /** the abc def! */
150
- def;
151
- }
152
- // Message: This description only repeats the name it describes.
153
-
154
- class Abc {
155
- /** the abc def! */
156
- def() {};
157
- }
158
- // Message: This description only repeats the name it describes.
159
-
160
- class Abc {
161
- /** def */
162
- accessor def;
163
- }
164
- // Message: This description only repeats the name it describes.
165
-
166
- class Abc {
167
- /** def */
168
- def() {}
169
- }
170
- // Message: This description only repeats the name it describes.
171
-
172
- class Abc {
173
- /** def */
174
- abstract accessor def;
175
- }
176
- // Message: This description only repeats the name it describes.
177
-
178
- class Abc {
179
- /** def */
180
- abstract def();
181
- }
182
- // Message: This description only repeats the name it describes.
183
-
184
- class Abc {
185
- /** def */
186
- abstract def;
187
- }
188
- // Message: This description only repeats the name it describes.
189
-
190
- /** abc */
191
- namespace Abc {}
192
- // Message: This description only repeats the name it describes.
193
-
194
- class Abc {
195
- /** def */
196
- def();
197
- def() {}
198
- }
199
- // Message: This description only repeats the name it describes.
200
-
201
- /** abc */
202
- declare function abc();
203
- // Message: This description only repeats the name it describes.
204
-
205
- /** abc */
206
- enum Abc {}
207
- // Message: This description only repeats the name it describes.
208
-
209
- enum Abc {
210
- /** def */
211
- def,
212
- }
213
- // Message: This description only repeats the name it describes.
214
-
215
- /** def */
216
- interface Def {}
217
- // Message: This description only repeats the name it describes.
218
-
219
- /** def */
220
- type Def = {};
221
- // Message: This description only repeats the name it describes.
222
-
223
- /**
224
- * count
225
- *
226
- * @description the value
227
- */
228
- let value = 3;
229
- // Message: This tag description only repeats the name it describes.
230
-
231
- /** @param {number} param - the param */
232
- function takesOne(param) {}
233
- // Message: This tag description only repeats the name it describes.
234
-
235
- /** @other param - takes one */
236
- function takesOne(param) {}
237
- // Message: This tag description only repeats the name it describes.
238
-
239
- /**
240
- * takes one
241
- * @other param - takes one
242
- */
243
- function takesOne(param) {}
244
- // Message: This description only repeats the name it describes.
245
-
246
- /**
247
- * - takes one
248
- * @other param - takes one
249
- */
250
- function takesOne(param) {}
251
- // Message: This description only repeats the name it describes.
252
- ````
253
-
254
-
255
-
256
- <a name="user-content-informative-docs-passing-examples"></a>
257
- <a name="informative-docs-passing-examples"></a>
258
- ## Passing examples
259
-
260
- The following patterns are not considered problems:
261
-
262
- ````js
263
- /** */
264
- let myValue = 3;
265
-
266
- /** count */
267
- let myValue = 3;
268
-
269
- /** Informative info user id. */
270
- let userId: string;
271
-
272
- let myValue,
273
- /** count value **/
274
- count = 3;
275
-
276
- /**
277
- * Does X Y Z work.
278
- */
279
- function foo() {}
280
-
281
- const value = {
282
- /**
283
- * the truthiness of the prop.
284
- */
285
- prop: true,
286
- }
287
-
288
- const value = {
289
- /**
290
- * the truthiness of the prop.
291
- */
292
- ['prop']: true,
293
- }
294
-
295
- /**
296
- * abc def ghi
297
- */
298
- const abc = function def() {}
299
-
300
- /**
301
- * name extra
302
- */
303
- class Name {}
304
-
305
- /**
306
- * abc name extra
307
- */
308
- const abc = class Name {}
309
-
310
- class Abc {
311
- /** ghi */
312
- def;
313
- }
314
-
315
- class Abc {
316
- /** ghi */
317
- accessor def;
318
- }
319
-
320
- class Abc {
321
- /** ghi */
322
- def() {}
323
- }
324
-
325
- class Abc {
326
- /** ghi */
327
- abstract accessor def;
328
- }
329
-
330
- class Abc {
331
- /** ghi */
332
- abstract def();
333
- }
334
-
335
- class Abc {
336
- /** ghi */
337
- abstract def;
338
- }
339
-
340
- /** abc */
341
- namespace Def {}
342
-
343
- class Abc {
344
- /** ghi */
345
- def();
346
- def() {}
347
- }
348
-
349
- /** abc */
350
- declare function def();
351
-
352
- /** abc */
353
- enum Def {}
354
-
355
- enum Abc {
356
- /** def */
357
- ghi,
358
- }
359
-
360
- /** abc */
361
- interface Def {}
362
-
363
- /** abc */
364
- type Def = {};
365
-
366
- /** abc */
367
- type Def = {};
368
-
369
- /**
370
- * count
371
- *
372
- * @description increment value
373
- */
374
- let value = 3;
375
-
376
- /**
377
- * count
378
- *
379
- * @unknownTag - increment value
380
- */
381
- let value = 3;
382
-
383
- /**
384
- * @other param - takes one two
385
- */
386
- function takesOne(param) {}
387
-
388
- /**
389
- * takes abc param
390
- */
391
- function takesOne(param) {}
392
-
393
- /**
394
- * @class
395
- *
396
- * @param {number} value - Some useful text
397
- */
398
- function MyAmazingThing(value) {}
399
- ````
400
-