๐ Chained function are forced on new line when there is an operation as parameter
Closed this issue ยท 2 comments
oom- commented
Environment information
See playground link
Configuration
See playground link
Issue
When there is an operation in the parameter of the chained function, it's forced back to the beginning of the line instead of keeping it on the same line.
I think this issue could be related: #1039
Playground links
Code of Conduct
- I agree to follow Biome's Code of Conduct
arendjr commented
In the playground links, you can see that Prettier's behavior is the same, so it looks to me like this is by design. If I'm not mistaken, the rationale is that there shouldn't be too much information on a single line.
ematipico commented
There are different heuristics inside a "member chain". One of them checks where the chain contains complex expressions, and if so, the whole chain goes on multiple lines regardless of the line width.