Formater weighting for arrow?

I am opening a bikeshed here but just thinking this morning that
I’d like to see -> have more weight for line breaks than the introduction of function arguments

  !isItemComplete(capability)->Option.predicate(
            `This ${gloss(Capability)} is not complete`
          )

puts the introduction of both steps on one line but the predicate function on three lines when it could be?

  !isItemComplete(capability)
    ->Option.predicate(`This ${gloss(Capability)} is not complete`)

I think line width concerns are overstated with 4k monitors but 1 idea per line is nice

Thanks
A

5 Likes

I think prettier has some almost perfect heuristics in this regard and I’d love to see them adopted in the formatter.

Prettier does introduce multiple valid outputs for the same code (depending on where the user puts a line break) but it’s well worth it IMO.