File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -247,24 +247,24 @@ const create = context => {
247
247
let importedNames = [ ] ;
248
248
if ( node . type === 'ImportDeclaration' ) {
249
249
importedNames = node . specifiers
250
- . filter ( s => s . type === 'ImportSpecifier' || s . type === 'ImportDefaultSpecifier' )
251
- . map ( s => ( {
252
- localName : s . local . name ,
253
- importedName : s . type === 'ImportDefaultSpecifier' ? 'default' : s . imported . name ,
250
+ . filter ( specifier => specifier . type === 'ImportSpecifier' || specifier . type === 'ImportDefaultSpecifier' )
251
+ . map ( specifier => ( {
252
+ localName : specifier . local . name ,
253
+ importedName : specifier . type === 'ImportDefaultSpecifier' ? 'default' : specifier . imported . name ,
254
254
} ) ) ;
255
255
} else if ( node . type === 'VariableDeclarator' && node . id . type === 'ObjectPattern' ) {
256
256
importedNames = node . id . properties
257
- . map ( p => {
258
- if ( p . type === 'RestElement' ) {
257
+ . map ( property => {
258
+ if ( property . type === 'RestElement' ) {
259
259
return {
260
- localName : p . argument . name ,
260
+ localName : property . argument . name ,
261
261
importedName : undefined ,
262
262
} ;
263
263
}
264
264
265
265
return {
266
- localName : p . value . name ,
267
- importedName : p . key . name ,
266
+ localName : property . value . name ,
267
+ importedName : property . key . name ,
268
268
} ;
269
269
} ) ;
270
270
}
You can’t perform that action at this time.
0 commit comments