You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
In this case we don't have anything fancy, the new logic will have to be created from scratch.
This is not a good first issue because it would require to make the AST "flat" and then correctly format. Usually we use recursion to handle these cases but we recently moved away because it's expensive.
If we aim to tackle this, I think we should use the Post-Order solution. (same for chain of call expressions)
In this case we don't have anything fancy, the new logic will have to be created from scratch.
This is not a good first issue because it would require to make the AST "flat" and then correctly format. Usually we use recursion to handle these cases but we recently moved away because it's expensive.
If we aim to tackle this, I think we should use the Post-Order solution. (same for chain of call expressions)
I'm not sure if we need a post order solution here because the formatting only affects the right hand side (and not left hand side of the expression). So it should be possible to use a regular while loop here.
Rome's formatter doesn't break long sequence expressions whereas Prettier does.
Playground
Input
Prettier
Rome
Expected
Rome emits the same formatting for long sequence expression as Prettier.
The text was updated successfully, but these errors were encountered: