Skip to content

Commit 2bfe7d8

Browse files
committed
Cleanup after merging
1 parent 982debb commit 2bfe7d8

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

src/jsdocUtils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ const potentiallyEmptyNamepathTags = [
197197
'see',
198198

199199
// GCC syntax allows typedef to be named through variable declaration rather than jsdoc name
200-
'typedef'
200+
'typedef',
201201
];
202202

203203
const isPotentiallyEmptyNamepathTag = (tag) => {
@@ -249,7 +249,7 @@ const potentiallyEmptyTypeTags = [
249249
'return', 'returns',
250250
'throws', 'exception',
251251
'yields', 'yield',
252-
'package', 'private', 'protected', 'public', 'static'
252+
'package', 'private', 'protected', 'public', 'static',
253253
];
254254

255255
const isPotentiallyEmptyTypeTag = (tag) => {
@@ -263,7 +263,7 @@ const isTagWithType = (tagName) => {
263263
const tagsWithMandatoryNamepathOrType = [
264264
'augments', 'extends',
265265
'param', 'arg',
266-
'typedef'
266+
'typedef',
267267
];
268268
const isTagWithMandatoryNamepathOrType = (tagName) => {
269269
return tagsWithMandatoryNamepathOrType.includes(tagName);

src/rules/validTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default iterateJsdoc(({
6464
const hasType = Boolean(tag.type);
6565
const mustHaveType = utils.isTagWithType(tag.tag) && !utils.isPotentiallyEmptyTypeTag(tag.tag);
6666

67-
const hasNamePath = Boolean(tag.name);
67+
const hasNamePath = Boolean(tag.name) && !(tag.tag === 'see' && !checkSeesForNamepaths);
6868
const mustHaveNamepath = utils.isNamepathTag(tag.tag, checkSeesForNamepaths) &&
6969
!utils.passesEmptyNamepathCheck(tag, allowEmptyNamepaths);
7070

test/rules/assertions/validTypes.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ export default {
183183
message: 'Tag @callback must have a namepath',
184184
}],
185185
options: [{
186-
allowEmptyNamepaths: false
186+
allowEmptyNamepaths: false,
187187
}],
188188
},
189189
{
@@ -196,9 +196,9 @@ export default {
196196
errors: [
197197
{
198198
line: 3,
199-
message: 'Syntax error in type: str%ng'
200-
}
201-
]
199+
message: 'Syntax error in type: str%ng',
200+
},
201+
],
202202
},
203203
{
204204
code: `
@@ -209,9 +209,9 @@ export default {
209209
errors: [
210210
{
211211
line: 3,
212-
message: 'Syntax error in type: str%ng'
213-
}
214-
]
212+
message: 'Syntax error in type: str%ng',
213+
},
214+
],
215215
},
216216
{
217217
code: `
@@ -222,9 +222,9 @@ export default {
222222
errors: [
223223
{
224224
line: 3,
225-
message: 'Syntax error in type: UserStr%ng'
226-
}
227-
]
225+
message: 'Syntax error in type: UserStr%ng',
226+
},
227+
],
228228
},
229229
{
230230
code: `
@@ -236,9 +236,9 @@ export default {
236236
errors: [
237237
{
238238
line: 3,
239-
message: 'Tag @extends must have either a type or namepath'
240-
}
241-
]
239+
message: 'Tag @extends must have either a type or namepath',
240+
},
241+
],
242242
},
243243
{
244244
code: `
@@ -250,10 +250,10 @@ export default {
250250
errors: [
251251
{
252252
line: 3,
253-
message: 'Tag @type must have a type'
254-
}
255-
]
256-
}
253+
message: 'Tag @type must have a type',
254+
},
255+
],
256+
},
257257
],
258258
valid: [
259259
{
@@ -403,38 +403,38 @@ export default {
403403
* @constant {string}
404404
*/
405405
const FOO = 'foo';
406-
`
406+
`,
407407
},
408408
{
409409
code: `
410410
/**
411411
* @extends Foo
412412
*/
413413
class Bar {};
414-
`
414+
`,
415415
},
416416
{
417417
code: `
418418
/**
419419
* @extends {Foo<String>}
420420
*/
421421
class Bar {};
422-
`
422+
`,
423423
},
424424
{
425425
code: `
426426
/**
427427
* @typedef {number|string} UserDefinedType
428428
*/
429-
`
429+
`,
430430
},
431431
{
432432
code: `
433433
/**
434434
* @typedef {number|string}
435435
*/
436436
let UserDefinedGCCType;
437-
`
438-
}
437+
`,
438+
},
439439
],
440440
};

0 commit comments

Comments
 (0)