Fat pipe (`||>`) does not play nice with typescript-eslint v8
Evidence: bbrk24/Trilangle#142
error Expected an assignment or function call and instead saw an expression @typescript-eslint/no-unused-expressions
Hopefully this can be fixed upstream: https://github.com/eslint/eslint/issues/18758
None of the pipelines that are triggering this end up being used as expressions -- the ones that are expressions, such as on the RHS of assignments, are fine. The erroring ones are all of the form
f()
||> .foo = 1
||> .bar = 2
|> x.baz
where the pipeline is used as a statement and the last one is |> rather than ||>. Would it be reasonable to special-case pipeline statements and emit ; rather than ,? I believe that would circumvent this issue.
Would it be reasonable to special-case pipeline statements and emit
;rather than,? I believe that would circumvent this issue.
Yes. Maybe we can use blockContainingStatement to detect this situation.