Skip to content

Commit 2afd64f

Browse files
committed
chore: update
1 parent 67a0350 commit 2afd64f

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

src/commands/to-destructuring.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,94 +9,94 @@ run(
99
const foo = bar.foo`,
1010
output: $`
1111
const { foo } = bar`,
12-
errors: ['command-removal', 'command-fix'],
12+
errors: ['command-fix'],
1313
},
1414
{
1515
code: $`
1616
/// to-destructuring
1717
const baz = bar.foo`,
1818
output: $`
1919
const { foo: baz } = bar`,
20-
errors: ['command-removal', 'command-fix'],
20+
errors: ['command-fix'],
2121
},
2222
{
2323
code: $`
2424
/// to-destructuring
2525
const foo = bar?.foo`,
2626
output: $`
2727
const { foo } = bar ?? {}`,
28-
errors: ['command-removal', 'command-fix'],
28+
errors: ['command-fix'],
2929
},
3030
{
3131
code: $`
3232
/// to-destructuring
3333
const foo = bar[1]`,
3434
output: $`
3535
const [,foo] = bar`,
36-
errors: ['command-removal', 'command-fix'],
36+
errors: ['command-fix'],
3737
},
3838
{
3939
code: $`
4040
/// to-destructuring
4141
const foo = bar?.[0]`,
4242
output: $`
4343
const [foo] = bar ?? []`,
44-
errors: ['command-removal', 'command-fix'],
44+
errors: ['command-fix'],
4545
},
4646
{
4747
code: $`
4848
/// to-destructuring
4949
const foo = bar().foo`,
5050
output: $`
5151
const { foo } = bar()`,
52-
errors: ['command-removal', 'command-fix'],
52+
errors: ['command-fix'],
5353
},
5454
{
5555
code: $`
5656
/// to-destructuring
5757
const foo = bar()?.foo`,
5858
output: $`
5959
const { foo } = bar() ?? {}`,
60-
errors: ['command-removal', 'command-fix'],
60+
errors: ['command-fix'],
6161
},
6262
{
6363
code: $`
6464
/// to-destructuring
6565
foo = bar.foo`,
6666
output: $`
6767
;({ foo } = bar)`,
68-
errors: ['command-removal', 'command-fix'],
68+
errors: ['command-fix'],
6969
},
7070
{
7171
code: $`
7272
/// to-destructuring
7373
baz = bar.foo`,
7474
output: $`
7575
;({ foo: baz } = bar)`,
76-
errors: ['command-removal', 'command-fix'],
76+
errors: ['command-fix'],
7777
},
7878
{
7979
code: $`
8080
/// to-destructuring
8181
foo = bar[0]`,
8282
output: $`
8383
;([foo] = bar)`,
84-
errors: ['command-removal', 'command-fix'],
84+
errors: ['command-fix'],
8585
},
8686
{
8787
code: $`
8888
/// to-destructuring
8989
foo = bar().foo`,
9090
output: $`
9191
;({ foo } = bar())`,
92-
errors: ['command-removal', 'command-fix'],
92+
errors: ['command-fix'],
9393
},
9494
{
9595
code: $`
9696
/// to-destructuring
9797
baz = bar().foo`,
9898
output: $`
9999
;({ foo: baz } = bar())`,
100-
errors: ['command-removal', 'command-fix'],
100+
errors: ['command-fix'],
101101
},
102102
)

src/commands/to-destructuring.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export const toDestructuring: Command = {
3434
let str = isArray ? `[${left}] = ${right}` : `{ ${left} } = ${right}`
3535
str = isDeclaration ? `${node.kind} ${str}` : `;(${str})`
3636

37-
ctx.removeComment()
3837
ctx.report({
3938
node,
4039
message: 'Convert to destructuring',

0 commit comments

Comments
 (0)