Skip to content

formatter: Diff with Prettier on blank line between method chain #19469

@leaysgur

Description

@leaysgur

Input

const x = fn()

.c1();

const y = fn()

.c1()

.c2()


.c3();

Config

{}

Oxfmt output

Oxfmt version: latest

const x =
  fn()

    .c1();

const y = fn()

  .c1()

  .c2()

  .c3();

Oxfmt playground link

https://playground.oxc.rs/?t=formatter&formatterPanels=output%2Cprettier&code=const+x+%3D+fn%28%29%0A%0A.c1%28%29%3B%0A%0Aconst+y+%3D+fn%28%29%0A%0A.c1%28%29%0A%0A.c2%28%29%0A%0A%0A.c3%28%29%3B%0A

Prettier output

Prettier version: 3.8.1

const x = fn().c1();

const y = fn()
  .c1()

  .c2()

  .c3();

Prettier playground link

No response

Additional notes

No response

Metadata

Metadata

Assignees

Labels

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions