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 {
9494 typeDefScope : Scope ,
9595 isRemoveTarget : ( nodeOrToken : HasLocation ) => boolean ,
9696 ) {
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 ] ) {
9899 let def = variable . defs . find ( ( d ) =>
99100 isRemoveTarget ( d . name as HasLocation ) ,
100101 )
@@ -105,13 +106,15 @@ export function extractGeneric(element: VElement): GenericProcessInfo | null {
105106 )
106107 }
107108 }
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 ] ) {
109111 if ( isRemoveTarget ( reference . identifier as HasLocation ) ) {
110112 removeReference ( reference , typeDefScope )
111113 }
112114 }
113115
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 ] ) {
115118 if ( isRemoveTarget ( scope . block as HasLocation ) ) {
116119 removeScope ( scopeManager , scope )
117120 }
Original file line number Diff line number Diff line change 214214 ],
215215 "name" : " set"
216216 },
217- "kind" : " init" ,
218217 "value" : {
219218 "type" : " FunctionExpression" ,
220219 "start" : 71 ,
522521 }
523522 ]
524523 }
525- }
524+ },
525+ "kind" : " init"
526526 }
527527 ]
528528 }
Original file line number Diff line number Diff line change 118118 "kind" : " let"
119119 },
120120 "specifiers" : [],
121- "source" : null
121+ "source" : null ,
122+ "attributes" : []
122123 },
123124 {
124125 "type" : " ImportDeclaration" ,
Original file line number Diff line number Diff line change 260260 "kind" : " const"
261261 },
262262 "specifiers" : [],
263- "source" : null
263+ "source" : null ,
264+ "attributes" : []
264265 }
265266 ],
266267 "sourceType" : " module" ,
Original file line number Diff line number Diff line change 118118 "kind" : " let"
119119 },
120120 "specifiers" : [],
121- "source" : null
121+ "source" : null ,
122+ "attributes" : []
122123 },
123124 {
124125 "type" : " ImportDeclaration" ,
Original file line number Diff line number Diff line change 118118 "kind" : " let"
119119 },
120120 "specifiers" : [],
121- "source" : null
121+ "source" : null ,
122+ "attributes" : []
122123 },
123124 {
124125 "type" : " VariableDeclaration" ,
Original file line number Diff line number Diff line change 200200 "kind" : " let"
201201 },
202202 "specifiers" : [],
203- "source" : null
203+ "source" : null ,
204+ "attributes" : []
204205 }
205206 ],
206207 "sourceType" : " module" ,
Original file line number Diff line number Diff line change 364364 "kind" : " let"
365365 },
366366 "specifiers" : [],
367- "source" : null
367+ "source" : null ,
368+ "attributes" : []
368369 },
369370 {
370371 "type" : " ImportDeclaration" ,
914915 }
915916 }
916917 ],
917- "source" : null
918+ "source" : null ,
919+ "attributes" : []
918920 },
919921 {
920922 "type" : " ExportNamedDeclaration" ,
10551057 }
10561058 }
10571059 ],
1058- "source" : null
1060+ "source" : null ,
1061+ "attributes" : []
10591062 },
10601063 {
10611064 "type" : " ExportNamedDeclaration" ,
10771080 ],
10781081 "declaration" : null ,
10791082 "specifiers" : [],
1080- "source" : null
1083+ "source" : null ,
1084+ "attributes" : []
10811085 },
10821086 {
10831087 "type" : " VariableDeclaration" ,
Original file line number Diff line number Diff line change 118118 "kind" : " let"
119119 },
120120 "specifiers" : [],
121- "source" : null
121+ "source" : null ,
122+ "attributes" : []
122123 },
123124 {
124125 "type" : " ExportNamedDeclaration" ,
221222 "kind" : " let"
222223 },
223224 "specifiers" : [],
224- "source" : null
225+ "source" : null ,
226+ "attributes" : []
225227 },
226228 {
227229 "type" : " ImportDeclaration" ,
467469 }
468470 }
469471 ],
470- "source" : null
472+ "source" : null ,
473+ "attributes" : []
471474 },
472475 {
473476 "type" : " ExportNamedDeclaration" ,
570573 "kind" : " let"
571574 },
572575 "specifiers" : [],
573- "source" : null
576+ "source" : null ,
577+ "attributes" : []
574578 }
575579 ],
576580 "sourceType" : " module" ,
Original file line number Diff line number Diff line change 178178 "kind" : " const"
179179 },
180180 "specifiers" : [],
181- "source" : null
181+ "source" : null ,
182+ "attributes" : []
182183 },
183184 {
184185 "type" : " VariableDeclaration" ,
You can’t perform that action at this time.
0 commit comments