@@ -33,11 +33,11 @@ function checkImports(imported, context) {
3333}
3434
3535function checkTypeImports ( imported , context ) {
36- for ( const [ module , nodes ] of imported . entries ( ) ) {
36+ Array . from ( imported ) . forEach ( ( [ module , nodes ] ) => {
3737const typeImports = nodes . filter ( ( node ) => node . importKind === 'type' ) ;
3838if ( 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 ) {
4141const message = `'${ module } ' imported multiple times.` ;
4242const sourceCode = context . getSourceCode ( ) ;
4343const fix = getTypeFix ( nodes , sourceCode , context ) ;
@@ -57,11 +57,11 @@ function checkTypeImports(imported, context) {
5757} ) ;
5858}
5959}
60- }
60+ } ) ;
6161}
6262
6363function checkInlineTypeImports ( imported , context ) {
64- for ( const [ module , nodes ] of imported . entries ( ) ) {
64+ Array . from ( imported ) . forEach ( ( [ module , nodes ] ) => {
6565if ( nodes . length > 1 ) {
6666const message = `'${ module } ' imported multiple times.` ;
6767const sourceCode = context . getSourceCode ( ) ;
@@ -81,7 +81,7 @@ function checkInlineTypeImports(imported, context) {
8181} ) ;
8282} ) ;
8383}
84- }
84+ } ) ;
8585}
8686
8787function isComma ( token ) {