diff --git a/src/rules/importsAsDependencies.js b/src/rules/importsAsDependencies.js index 368fa093c..d2c6dae11 100644 --- a/src/rules/importsAsDependencies.js +++ b/src/rules/importsAsDependencies.js @@ -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 { diff --git a/test/rules/assertions/importsAsDependencies.js b/test/rules/assertions/importsAsDependencies.js index 4b22b3f0c..1c3fbd8b7 100644 --- a/test/rules/assertions/importsAsDependencies.js +++ b/test/rules/assertions/importsAsDependencies.js @@ -102,5 +102,12 @@ export default { */ `, }, + { + code: ` + /** + * @type {null|import('typescript').Program} + */ + `, + }, ], };