eslint-plugin-jsdoc 65.2.1 → 65.2.2
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.
package/package.json
CHANGED
|
@@ -359,7 +359,51 @@ export default iterateJsdoc(({
|
|
|
359
359
|
];
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
-
|
|
362
|
+
if (declaration.type === 'TSImportEqualsDeclaration') {
|
|
363
|
+
return [
|
|
364
|
+
`${prefix}.${declaration.id.name}`,
|
|
365
|
+
];
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if (declaration.type === 'TSEnumDeclaration') {
|
|
369
|
+
return [
|
|
370
|
+
`${prefix}.${declaration.id.name}`,
|
|
371
|
+
...declaration.body.members.map((member) => {
|
|
372
|
+
// Only handle Identifier member names, not string literals.
|
|
373
|
+
if (member.id.type !== 'Identifier') {
|
|
374
|
+
return '';
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
return `${prefix}.${declaration.id.name}.${member.id.name}`;
|
|
378
|
+
}).filter(Boolean),
|
|
379
|
+
];
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
if (declaration.type === 'VariableDeclaration') {
|
|
383
|
+
return declaration.declarations.flatMap((declarator) => {
|
|
384
|
+
// Destructuring patterns are not handled.
|
|
385
|
+
if (declarator.id.type !== 'Identifier') {
|
|
386
|
+
return [];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
return [
|
|
390
|
+
`${prefix}.${declarator.id.name}`,
|
|
391
|
+
];
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
if (declaration.type === 'FunctionDeclaration' || declaration.type === 'TSDeclareFunction') {
|
|
396
|
+
/* c8 ignore next 3 -- Guard for anonymous default-exported functions which can't exist in a namespace. */
|
|
397
|
+
if (!declaration.id) {
|
|
398
|
+
return [];
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
return [
|
|
402
|
+
`${prefix}.${declaration.id.name}`,
|
|
403
|
+
];
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// Fallback for unhandled declaration types.
|
|
363
407
|
return [];
|
|
364
408
|
});
|
|
365
409
|
};
|