Skip to content

Revisit function literal heuristic introduced in Prettier 1.19 #6921

@rassie

Description

@rassie

Prettier 1.19.1
Playground link

--parser babel
--print-width 100
--single-quote

Input:

stream1$.pipe(
  withLatestFrom(stream2$),
  distinctUntilChanged(),
  debounceTime(50)
)

Output:

stream1$.pipe(withLatestFrom(stream2$), distinctUntilChanged(), debounceTime(50));

Expected behavior:
Function literal heuristic introduced in #6033 is insufficient for RxJS, since it ignores a lot of operators which at their core are functional compositions, but not in syntax. I don't have a solution proposal, but it's breaking existing (and expected) behavior right now.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions