Skip to content

Commit f165509

Browse files
committed
- Fix: type is not a definer nor a namepath-based one (so doesn't need its non-existent name read by no-undefined-types for allowable types)
- Fix: Missing `implements` and `yields` in tags with types; add `closureTagsWithTypes` to `tagsWithTypes` (and `yield` to aliased tags with types)
1 parent 9306a52 commit f165509

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/jsdocUtils.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ const namepathDefiningTags = [
128128
'mixin',
129129
'name',
130130
'namespace',
131-
'type',
132131
'typedef',
133132

134133
// MAY BE USEFUL WITHOUT NAMEPATH
@@ -174,6 +173,7 @@ let tagsWithTypes = [
174173
'class',
175174
'constant',
176175
'enum',
176+
'implements',
177177
'member',
178178
'module',
179179
'namespace',
@@ -182,7 +182,12 @@ let tagsWithTypes = [
182182
'returns',
183183
'throws',
184184
'type',
185-
'typedef'
185+
'typedef',
186+
'yields'
187+
];
188+
189+
const closureTagsWithTypes = [
190+
'package', 'private', 'protected', 'public', 'static'
186191
];
187192

188193
const tagsWithTypesAliases = [
@@ -193,10 +198,11 @@ const tagsWithTypesAliases = [
193198
'argument',
194199
'prop',
195200
'return',
196-
'exception'
201+
'exception',
202+
'yield'
197203
];
198204

199-
tagsWithTypes = tagsWithTypes.concat(tagsWithTypesAliases);
205+
tagsWithTypes = tagsWithTypes.concat(tagsWithTypesAliases, closureTagsWithTypes);
200206

201207
const isTagWithType = (tagName) => {
202208
return tagsWithTypes.includes(tagName);

0 commit comments

Comments
 (0)