File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -111,19 +111,19 @@ function getInlineTypeFix(nodes, sourceCode) {
111
111
const nodeClosingBrace = nodeTokens . find ( token => isPunctuator ( token , '}' ) ) ;
112
112
// const preferInline = context.options[0] && context.options[0]['prefer-inline'];
113
113
if ( nodeClosingBrace ) {
114
- for ( const node of rest ) {
114
+ rest . forEach ( ( node ) => {
115
115
// these will be all Type imports, no Value specifiers
116
116
// then add inline type specifiers to importKind === 'type' import
117
- for ( const specifier of node . specifiers ) {
117
+ node . specifiers . forEach ( ( specifier ) => {
118
118
if ( specifier . importKind === 'type' ) {
119
119
fixes . push ( fixer . insertTextBefore ( nodeClosingBrace , `, type ${ specifier . local . name } ` ) ) ;
120
120
} else {
121
121
fixes . push ( fixer . insertTextBefore ( nodeClosingBrace , `, ${ specifier . local . name } ` ) ) ;
122
122
}
123
- }
123
+ } ) ;
124
124
125
125
fixes . push ( fixer . remove ( node ) ) ;
126
- }
126
+ } ) ;
127
127
} else {
128
128
// we have a default import only
129
129
const defaultSpecifier = firstImport . specifiers . find ( ( spec ) => spec . type === 'ImportDefaultSpecifier' ) ;
You can’t perform that action at this time.
0 commit comments