Skip to content

Commit

Permalink
fix(imports-as-dependencies): don't report TypeScript proper
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Jun 4, 2023
1 parent 785fb26 commit 75b6b8c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rules/importsAsDependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export default iterateJsdoc(({
let mod = nde.element.value.replace(
/^(@[^/]+\/[^/]+|[^/]+).*$/u, '$1',
);
if (mod === 'typescript') {
return;
}

if (!moduleCheck.has(mod)) {
let pkg;
try {
Expand Down
7 changes: 7 additions & 0 deletions test/rules/assertions/importsAsDependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,12 @@ export default {
*/
`,
},
{
code: `
/**
* @type {null|import('typescript').Program}
*/
`,
},
],
};

0 comments on commit 75b6b8c

Please sign in to comment.