Suggestion for divergence from prettier - consistent spliting of arguments with arrow functions #10289
RamojusLapinskas
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Given the following code, both prettier and biome will currently split the arguments inconsistently:
Output:
Playground link: https://biomejs.dev/playground/?arrowParentheses=as-needed&tab=formatter&pane=Diagnostics&code=ZgAoADEALAAgAGcAKABoACgAYQAgAD0APgAgAGEAKQApACkAOwAKAAoAZgAoADEALAAgAGgAKABhACAAPQA%2BACAAYQApACkAOwAKAAoAZgAoADEALAAgAGEAIAA9AD4AIABhACkAOwAKAA%3D%3D&language=ts
It appears that only when an arrow function is wrapped once in one of the arguments, the arguments will be split.
I think one of the following options would make more sense:
wrap depth > xin one of the arguments.Beta Was this translation helpful? Give feedback.
All reactions