dprint / dprint-plugin-typescript

TypeScript and JavaScript code formatting plugin for dprint.
https://dprint.dev/plugins/typescript
MIT License
258 stars 57 forks source link

Odd extra indent in multiline call expression / binary expression #657

Open jakebailey opened 3 months ago

jakebailey commented 3 months ago

Describe the bug

dprint-plugin-typescript version: 0.91.6

A little weird, but this call expression gets indented an extra two times for some reason.

Input Code

const a = !foo || bar(
  baz,
  qux
).prop?.blah === 1234;

const a = !foo || bar(
  baz,
  qux
).prop?.blah;

Expected Output

const a = !foo || bar(
  baz,
  qux
).prop?.blah === 1234;

const a = !foo || bar(
  baz,
  qux
).prop?.blah;

Actual Output

const a = !foo || bar(
      baz,
      qux,
    ).prop?.blah === 1234;

const a = !foo || bar(
  baz,
  qux,
).prop?.blah;