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
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.
The text was updated successfully, but these errors were encountered:
Discussed in #15196
Originally posted by macgyver August 1, 2023
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.
The text was updated successfully, but these errors were encountered: