Skip to content

Commit 75b6b8c

Browse files
committedJun 4, 2023
fix(imports-as-dependencies): don't report TypeScript proper
1 parent 785fb26 commit 75b6b8c

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
 

‎src/rules/importsAsDependencies.js

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export default iterateJsdoc(({
6666
let mod = nde.element.value.replace(
6767
/^(@[^/]+\/[^/]+|[^/]+).*$/u, '$1',
6868
);
69+
if (mod === 'typescript') {
70+
return;
71+
}
72+
6973
if (!moduleCheck.has(mod)) {
7074
let pkg;
7175
try {

‎test/rules/assertions/importsAsDependencies.js

+7
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,12 @@ export default {
102102
*/
103103
`,
104104
},
105+
{
106+
code: `
107+
/**
108+
* @type {null|import('typescript').Program}
109+
*/
110+
`,
111+
},
105112
],
106113
};

0 commit comments

Comments
 (0)
Please sign in to comment.