Skip to content

Commit

Permalink
Exclude flow typeof imports from extraneous dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett authored and ljharb committed Nov 2, 2019
1 parent 1031e1c commit c83a7d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/no-extraneous-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function getModuleRealName(resolved) {

function reportIfMissing(context, deps, depsOptions, node, name) {
// Do not report when importing types
if (node.importKind === 'type' || (node.parent && node.parent.importKind === 'type')) {
if (node.importKind === 'type' || (node.parent && node.parent.importKind === 'type') || node.importKind === 'typeof') {
return;
}

Expand Down

0 comments on commit c83a7d3

Please sign in to comment.