Skip to content

Commit

Permalink
fix(linter): do not remap namespace import specifiers as import speci…
Browse files Browse the repository at this point in the history
…fiers (#12954)
  • Loading branch information
meeroslav authored Nov 2, 2022
1 parent 091cd4d commit d59bd10
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ export default createESLintRule<Options, MessageIds>({
return;
}

const imports = specifiers.map((s) => s.imported.name);
const imports = specifiers
.filter((s) => s.type === 'ImportSpecifier')
.map((s) => s.imported.name);

// process each potential entry point and try to find the imports
const importsToRemap = [];
Expand Down Expand Up @@ -313,7 +315,9 @@ export default createESLintRule<Options, MessageIds>({
return;
}
// imported JS functions to remap
const imports = specifiers.map((s) => s.imported.name);
const imports = specifiers
.filter((s) => s.type === 'ImportSpecifier')
.map((s) => s.imported.name);

// process each potential entry point and try to find the imports
const importsToRemap = [];
Expand Down

0 comments on commit d59bd10

Please sign in to comment.