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
Hey I'm probably the only person I know with this opinion so I'm assuming Prettier doesn't already have a way to enforce this. I tried looking around through docs but didn't see anything relevant.
What I'm looking for is basically the opposite of bracketSameLine but applied to semicolons for javascript declarations that include multiple chained calls. Here's what I mean.
I want this:
constfoo=myArr.filter().map().reduce();
To be formatted to this:
constfoo=myArr.filter().map().reduce();
This is a convention I use in all my personal projects. The rationale behind it is that the semi-colon serves a similar purpose of ending a declaration line. It works really well with editors like VSCode because it will make that whole section collapsible due to the placement of the semicolon
Does anyone know if this is something already achievable with Prettier or if this would be difficult to add?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey I'm probably the only person I know with this opinion so I'm assuming Prettier doesn't already have a way to enforce this. I tried looking around through docs but didn't see anything relevant.
What I'm looking for is basically the opposite of
bracketSameLine
but applied to semicolons for javascript declarations that include multiple chained calls. Here's what I mean.I want this:
To be formatted to this:
This is a convention I use in all my personal projects. The rationale behind it is that the semi-colon serves a similar purpose of ending a declaration line. It works really well with editors like VSCode because it will make that whole section collapsible due to the placement of the semicolon
Does anyone know if this is something already achievable with Prettier or if this would be difficult to add?
Beta Was this translation helpful? Give feedback.
All reactions