@@ -35,11 +35,11 @@ function checkImports(imported, context) {
3535}
3636
3737function checkTypeImports ( imported , context ) {
38- for ( const [ module , nodes ] of imported . entries ( ) ) {
38+ Array . from ( imported ) . forEach ( ( [ module , nodes ] ) => {
3939 const typeImports = nodes . filter ( ( node ) => node . importKind === 'type' ) ;
4040 if ( nodes . length > 1 ) {
41- const someInlineTypeImports = nodes . filter ( ( node ) => node . specifiers . some ( ( spec ) => spec . importKind === 'type' ) ) ;
42- if ( typeImports . length > 0 && someInlineTypeImports . length > 0 ) {
41+ const someInlineTypeImports = nodes . some ( ( node ) => node . specifiers . some ( ( spec ) => spec . importKind === 'type' ) ) ;
42+ if ( typeImports . length > 0 && someInlineTypeImports ) {
4343 const message = `'${ module } ' imported multiple times.` ;
4444 const sourceCode = context . getSourceCode ( ) ;
4545 const fix = getTypeFix ( nodes , sourceCode , context ) ;
@@ -59,11 +59,11 @@ function checkTypeImports(imported, context) {
5959 } ) ;
6060 }
6161 }
62- }
62+ } ) ;
6363}
6464
6565function checkInlineTypeImports ( imported , context ) {
66- for ( const [ module , nodes ] of imported . entries ( ) ) {
66+ Array . from ( imported ) . forEach ( ( [ module , nodes ] ) => {
6767 if ( nodes . length > 1 ) {
6868 const message = `'${ module } ' imported multiple times.` ;
6969 const sourceCode = context . getSourceCode ( ) ;
@@ -83,7 +83,7 @@ function checkInlineTypeImports(imported, context) {
8383 } ) ;
8484 } ) ;
8585 }
86- }
86+ } ) ;
8787}
8888
8989function isComma ( token ) {
0 commit comments