@@ -33,11 +33,11 @@ function checkImports(imported, context) {
33
33
}
34
34
35
35
function checkTypeImports ( imported , context ) {
36
- for ( const [ module , nodes ] of imported . entries ( ) ) {
36
+ Array . from ( imported ) . forEach ( ( [ module , nodes ] ) => {
37
37
const typeImports = nodes . filter ( ( node ) => node . importKind === 'type' ) ;
38
38
if ( nodes . length > 1 ) {
39
- const someInlineTypeImports = nodes . filter ( ( node ) => node . specifiers . some ( ( spec ) => spec . importKind === 'type' ) ) ;
40
- if ( typeImports . length > 0 && someInlineTypeImports . length > 0 ) {
39
+ const someInlineTypeImports = nodes . some ( ( node ) => node . specifiers . some ( ( spec ) => spec . importKind === 'type' ) ) ;
40
+ if ( typeImports . length > 0 && someInlineTypeImports ) {
41
41
const message = `'${ module } ' imported multiple times.` ;
42
42
const sourceCode = context . getSourceCode ( ) ;
43
43
const fix = getTypeFix ( nodes , sourceCode , context ) ;
@@ -57,11 +57,11 @@ function checkTypeImports(imported, context) {
57
57
} ) ;
58
58
}
59
59
}
60
- }
60
+ } ) ;
61
61
}
62
62
63
63
function checkInlineTypeImports ( imported , context ) {
64
- for ( const [ module , nodes ] of imported . entries ( ) ) {
64
+ Array . from ( imported ) . forEach ( ( [ module , nodes ] ) => {
65
65
if ( nodes . length > 1 ) {
66
66
const message = `'${ module } ' imported multiple times.` ;
67
67
const sourceCode = context . getSourceCode ( ) ;
@@ -81,7 +81,7 @@ function checkInlineTypeImports(imported, context) {
81
81
} ) ;
82
82
} ) ;
83
83
}
84
- }
84
+ } ) ;
85
85
}
86
86
87
87
function isComma ( token ) {
0 commit comments