@@ -138,10 +138,18 @@ const hasDefinedTypeReturnTag = (tag) => {
138
138
139
139
const tagsWithMandatoryType = [
140
140
// These both show curly brackets in the doc signature and examples
141
+ // "typeExpression"
141
142
'implements' ,
143
+
144
+ // "typeName"
142
145
'type' ,
143
146
] ;
144
147
148
+ // All of these have a signature with "type" except for
149
+ // `augments`/`extends` ("namepath")
150
+ // `param`/`arg`/`argument` (no signature)
151
+ // `property`/`prop` (no signature)
152
+ // `modifies` (undocumented)
145
153
const tagsWithOptionalType = [
146
154
// These have the example showing curly brackets but not in their doc signature, e.g.: https://jsdoc.app/tags-enum.html
147
155
'enum' ,
@@ -151,6 +159,7 @@ const tagsWithOptionalType = [
151
159
152
160
// These do not show curly brackets in either the signature or examples
153
161
'augments' , 'extends' ,
162
+
154
163
'class' , 'constructor' ,
155
164
'constant' , 'const' ,
156
165
@@ -170,6 +179,7 @@ const tagsWithOptionalType = [
170
179
171
180
// Todo: Omit these GCC specific items when in non-GCC mode after landing https://github.com/gajus/eslint-plugin-jsdoc/issues/356
172
181
// Shows the signature with curly brackets but not in the example
182
+ // "typeExpression"
173
183
'package' ,
174
184
'private' ,
175
185
'protected' ,
@@ -184,16 +194,15 @@ const tagsWithOptionalType = [
184
194
'modifies' ,
185
195
] ;
186
196
187
- // None of these show as having curly brackets for their name/namepath,
188
- // except for `member`/`var` (which show in their example)
197
+ // None of these show as having curly brackets for their name/namepath
189
198
const namepathDefiningTags = [
190
- // These appears to require a "name" in their signature, albeit these
191
- // are somewhat different from other "names" (including as described
199
+ // These appear to require a "name" in their signature, albeit these
200
+ // are somewhat different from other "name"'s (including as described
192
201
// at https://jsdoc.app/about-namepaths.html )
193
202
'external' , 'host' ,
194
203
'event' ,
195
204
196
- // These allow for "names" in their signature, but indicate as optional
205
+ // These allow for "name"'s in their signature, but indicate as optional
197
206
'class' , 'constructor' ,
198
207
'constant' , 'const' ,
199
208
'function' , 'func' , 'method' ,
@@ -217,7 +226,7 @@ const tagsWithOptionalNamepath = [
217
226
...namepathDefiningTags ,
218
227
219
228
// `borrows` has a different format, however, so needs special parsing;
220
- // seems to require both, and as "namepaths"
229
+ // seems to require both, and as "namepath"'s
221
230
'borrows' ,
222
231
223
232
// Signature seems to require a "name" (of an event) and no counter-examples
@@ -237,7 +246,7 @@ const tagsWithOptionalNamepath = [
237
246
// Signature seems to require a "OtherObjectPath" with no counter-examples
238
247
'mixes' ,
239
248
240
- // Signature allows for namepath or text
249
+ // Signature allows for " namepath" or text
241
250
'see' ,
242
251
] ;
243
252
0 commit comments