Replies: 2 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
-
created an issue instead #15208 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just wondering if anybody can explain the formatting philosophy of converting a line like
into this:
vs. this:
or even
(though I recognize that putting operators at the start of a line is controversial)
it seems like keeping the code on two lines vs. three is more parsimonious in terms of vertical space, and groups the concepts better by dividing the code neatly into variable names, and assigned values. Having
mainData
dangling by itself at the end there just doesn't read that well (to me at least).What do other folks think? Is there a bigger concept at play here that prevents this from being the behavior? Thanks for your time and insights.
My guess is that Prettier is trying to produce the longest line it can without exceeding the maximum line length, but in cases like this my feeling is that balancing the length of the lines it produces or trying to reduce the total number of lines produced would be a prettier result.
Beta Was this translation helpful? Give feedback.
All reactions