haxe-formatter
haxe-formatter copied to clipboard
Add wrapping configuration for comparison operators
Describe the Feature
There is no way to configure wrapping for comparison operators, to allow prettier long if conditions. I have this code:
if (this.actionsByPriority.indexOf(action) < this.actionsByPriority.indexOf(availableAction) {}
Desired output
if (
this.actionsByPriority.indexOf(action) <
this.actionsByPriority.indexOf(availableAction)
) {}
can't say I find your desired output easier to read, especially if you had multiple compare operations in a single if condition.
what would look prettier is to extract those terms into variables before comparing, but that is beyond the scope of a formatter.