File tree Expand file tree Collapse file tree 22 files changed +95
-173
lines changed
define-model05-with-modifiers
multiple-scripts-with-export01
multiple-scripts-with-export02
multiple-scripts-with-export04
v-bind-same-name-shorthand02-options
v-bind-same-name-shorthand04-with-v-for
v-for-directives-with-destructuring Expand file tree Collapse file tree 22 files changed +95
-173
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ export function extractGeneric(element: VElement): GenericProcessInfo | null {
94
94
typeDefScope : Scope ,
95
95
isRemoveTarget : ( nodeOrToken : HasLocation ) => boolean ,
96
96
) {
97
- for ( const variable of typeDefScope . variables ) {
97
+ // eslint-disable-next-line unicorn/no-useless-spread -- The original array is mutated
98
+ for ( const variable of [ ...typeDefScope . variables ] ) {
98
99
let def = variable . defs . find ( ( d ) =>
99
100
isRemoveTarget ( d . name as HasLocation ) ,
100
101
)
@@ -105,13 +106,15 @@ export function extractGeneric(element: VElement): GenericProcessInfo | null {
105
106
)
106
107
}
107
108
}
108
- for ( const reference of typeDefScope . references ) {
109
+ // eslint-disable-next-line unicorn/no-useless-spread -- The original array is mutated
110
+ for ( const reference of [ ...typeDefScope . references ] ) {
109
111
if ( isRemoveTarget ( reference . identifier as HasLocation ) ) {
110
112
removeReference ( reference , typeDefScope )
111
113
}
112
114
}
113
115
114
- for ( const scope of scopeManager . scopes ) {
116
+ // eslint-disable-next-line unicorn/no-useless-spread -- The original array is mutated
117
+ for ( const scope of [ ...scopeManager . scopes ] ) {
115
118
if ( isRemoveTarget ( scope . block as HasLocation ) ) {
116
119
removeScope ( scopeManager , scope )
117
120
}
Original file line number Diff line number Diff line change 214
214
],
215
215
"name" : " set"
216
216
},
217
- "kind" : " init" ,
218
217
"value" : {
219
218
"type" : " FunctionExpression" ,
220
219
"start" : 71 ,
522
521
}
523
522
]
524
523
}
525
- }
524
+ },
525
+ "kind" : " init"
526
526
}
527
527
]
528
528
}
Original file line number Diff line number Diff line change 118
118
"kind" : " let"
119
119
},
120
120
"specifiers" : [],
121
- "source" : null
121
+ "source" : null ,
122
+ "attributes" : []
122
123
},
123
124
{
124
125
"type" : " ImportDeclaration" ,
Original file line number Diff line number Diff line change 260
260
"kind" : " const"
261
261
},
262
262
"specifiers" : [],
263
- "source" : null
263
+ "source" : null ,
264
+ "attributes" : []
264
265
}
265
266
],
266
267
"sourceType" : " module" ,
Original file line number Diff line number Diff line change 118
118
"kind" : " let"
119
119
},
120
120
"specifiers" : [],
121
- "source" : null
121
+ "source" : null ,
122
+ "attributes" : []
122
123
},
123
124
{
124
125
"type" : " ImportDeclaration" ,
Original file line number Diff line number Diff line change 118
118
"kind" : " let"
119
119
},
120
120
"specifiers" : [],
121
- "source" : null
121
+ "source" : null ,
122
+ "attributes" : []
122
123
},
123
124
{
124
125
"type" : " VariableDeclaration" ,
Original file line number Diff line number Diff line change 200
200
"kind" : " let"
201
201
},
202
202
"specifiers" : [],
203
- "source" : null
203
+ "source" : null ,
204
+ "attributes" : []
204
205
}
205
206
],
206
207
"sourceType" : " module" ,
Original file line number Diff line number Diff line change 364
364
"kind" : " let"
365
365
},
366
366
"specifiers" : [],
367
- "source" : null
367
+ "source" : null ,
368
+ "attributes" : []
368
369
},
369
370
{
370
371
"type" : " ImportDeclaration" ,
914
915
}
915
916
}
916
917
],
917
- "source" : null
918
+ "source" : null ,
919
+ "attributes" : []
918
920
},
919
921
{
920
922
"type" : " ExportNamedDeclaration" ,
1055
1057
}
1056
1058
}
1057
1059
],
1058
- "source" : null
1060
+ "source" : null ,
1061
+ "attributes" : []
1059
1062
},
1060
1063
{
1061
1064
"type" : " ExportNamedDeclaration" ,
1077
1080
],
1078
1081
"declaration" : null ,
1079
1082
"specifiers" : [],
1080
- "source" : null
1083
+ "source" : null ,
1084
+ "attributes" : []
1081
1085
},
1082
1086
{
1083
1087
"type" : " VariableDeclaration" ,
Original file line number Diff line number Diff line change 118
118
"kind" : " let"
119
119
},
120
120
"specifiers" : [],
121
- "source" : null
121
+ "source" : null ,
122
+ "attributes" : []
122
123
},
123
124
{
124
125
"type" : " ExportNamedDeclaration" ,
221
222
"kind" : " let"
222
223
},
223
224
"specifiers" : [],
224
- "source" : null
225
+ "source" : null ,
226
+ "attributes" : []
225
227
},
226
228
{
227
229
"type" : " ImportDeclaration" ,
467
469
}
468
470
}
469
471
],
470
- "source" : null
472
+ "source" : null ,
473
+ "attributes" : []
471
474
},
472
475
{
473
476
"type" : " ExportNamedDeclaration" ,
570
573
"kind" : " let"
571
574
},
572
575
"specifiers" : [],
573
- "source" : null
576
+ "source" : null ,
577
+ "attributes" : []
574
578
}
575
579
],
576
580
"sourceType" : " module" ,
Original file line number Diff line number Diff line change 178
178
"kind" : " const"
179
179
},
180
180
"specifiers" : [],
181
- "source" : null
181
+ "source" : null ,
182
+ "attributes" : []
182
183
},
183
184
{
184
185
"type" : " VariableDeclaration" ,
You can’t perform that action at this time.
0 commit comments