Skip to content

Commit e3b0d0c

Browse files
committed
fix(imports-as-dependencies): catch typings as possible publishing source
1 parent 75b6b8c commit e3b0d0c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/rules/importsAsDependencies.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ export default iterateJsdoc(({
6666
let mod = nde.element.value.replace(
6767
/^(@[^/]+\/[^/]+|[^/]+).*$/u, '$1',
6868
);
69-
if (mod === 'typescript') {
70-
return;
71-
}
7269

7370
if (!moduleCheck.has(mod)) {
7471
let pkg;
@@ -81,7 +78,7 @@ export default iterateJsdoc(({
8178
// Ignore
8279
}
8380

84-
if (!pkg || !pkg.types) {
81+
if (!pkg || (!pkg.types && !pkg.typings)) {
8582
mod = `@types/${mod}`;
8683
}
8784

0 commit comments

Comments
 (0)