File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -288,11 +288,11 @@ export default function(api) {
288288 let skippedIdentifiers = 0
289289 const removeNewlyUnusedIdentifiers = {
290290 VariableDeclarator ( path ) {
291- if ( path . node . id . type === 'ObjectPattern' ) {
292- // Object destructuring, so we will want to capture all the names
293- // created by the destructuring. This currently doesn't work, but
294- // would be good to improve. All of the names can be collected
295- // like:
291+ if ( [ 'ObjectPattern' , 'ArrayPattern' ] . includes ( path . node . id . type ) ) {
292+ // Object or Array destructuring, so we will want to capture all
293+ // the names created by the destructuring. This currently doesn't
294+ // work, but would be good to improve. All of the names for
295+ // ObjectPattern can be collected like:
296296 //
297297 // path.node.id.properties.map(prop => prop.value.name);
298298 return
You can’t perform that action at this time.
0 commit comments