sveltejs / prettier-plugin-svelte

Format your svelte components using prettier.
MIT License
714 stars 95 forks source link

Breaks destructuring assignment in templates #432

Open tedbyron opened 4 months ago

tedbyron commented 4 months ago

When using array destructuring assignment in a template, this plugin is removing the comma that skips the first item of the array:

{#each arr as [, { item }]}
tedbyron commented 4 months ago

Looks like this destructuring doesn't get changed:

{#each arr as item, i}
  {@const [, { something }] = item}