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