bug: Combining function bindings with comments causes unnecessary parentheses to be inserted

#500

Issue

Open
B
baseballyama
Jul 22, 2025, 5:21 AM
<Foo
  bind:value={
    // eslint-disable-next-line @typescript-eslint/no-unsafe-return -- ignore
    () => bar ?? '',
    (v) => {
      bar = v;
    }
  }
/>

Formatting the above code results in the following code.

<Foo
  bind:value={
    // eslint-disable-next-line @typescript-eslint/no-unsafe-return -- ignore
    (() => bar ?? '',
    (v) => {
      bar = v;
    }
  }
/>

I believe parentheses before () => bar ?? '' is unnecessary.

Info

Assignees None
Labels None
Milestone None