Skip to content

Commit

Permalink
fix(imports-as-dependencies): catch typings as possible publishin…
Browse files Browse the repository at this point in the history
…g source
  • Loading branch information
brettz9 committed Jun 4, 2023
1 parent 75b6b8c commit e3b0d0c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/rules/importsAsDependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ export default iterateJsdoc(({
let mod = nde.element.value.replace(
/^(@[^/]+\/[^/]+|[^/]+).*$/u, '$1',
);
if (mod === 'typescript') {
return;
}

if (!moduleCheck.has(mod)) {
let pkg;
Expand All @@ -81,7 +78,7 @@ export default iterateJsdoc(({
// Ignore
}

if (!pkg || !pkg.types) {
if (!pkg || (!pkg.types && !pkg.typings)) {
mod = `@types/${mod}`;
}

Expand Down

0 comments on commit e3b0d0c

Please sign in to comment.