Skip to content

Commit 9d71578

Browse files
committed
feature: @putout/plugin-split-nested-destructuring: exclude declared
1 parent b8d5f6a commit 9d71578

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/plugin-split-nested-destructuring/lib/split-nested-destructuring.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const report = () => 'Avoid nested destructuring';
1515
export const match = () => ({
1616
'const {__a: {__b}} = __c': matchConst,
1717
'const {__a: {__b: __c}} = __d': matchConst,
18+
'const {__a: {__b = __c}} = __d': matchConst,
1819
});
1920

2021
export const replace = () => ({

packages/plugin-split-nested-destructuring/test/fixture/declared.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@ const {
44
},
55
} = abc;
66

7+
const {
8+
hello: {
9+
m = {},
10+
},
11+
} = abc;
12+
713
const hello = 'world';

0 commit comments

Comments
 (0)