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
The trailingComma setting (Prettier docs) is one that has changed in every major Prettier version from 1 to 3, and can't please everyone. I see reasonable arguments for all of these, and given tsv's policy to "just copy Svelte", I made 'none' the behavior in v0.2. I think this is probably the most off-beat choice in Svelte's .prettierrc hence this post about it. Discussion is welcome, but note the wontfix tag - tsv diverging from Svelte's explicit choices is unlikely to change. Your feedback here could be a signal to its maintainers but I'm intentionally tying my hands on choices like these.
'all' (Prettier's default v3+ and tsv's initial v0.1 behavior)
obj={
a,
b,}fn(a,b,)
'es5' (MDsveX, , Prettier v2)
obj={
a,
b,}fn(a,b)
Overall, tsv prioritizes readability over writability, and aims to fit smoothly into the official Svelte repos. I'm good with 'none' personally, and things have historically worked out well when I defer conflicting choices to the official Svelte patterns.
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The
trailingCommasetting (Prettier docs) is one that has changed in every major Prettier version from 1 to 3, and can't please everyone. I see reasonable arguments for all of these, and given tsv's policy to "just copy Svelte", I made'none'the behavior in v0.2. I think this is probably the most off-beat choice in Svelte's .prettierrc hence this post about it. Discussion is welcome, but note thewontfixtag - tsv diverging from Svelte's explicit choices is unlikely to change. Your feedback here could be a signal to its maintainers but I'm intentionally tying my hands on choices like these.'none'(Svelte & SvelteKit, Prettier v1, tsv's v0.2 behavior)'all'(Prettier's default v3+ and tsv's initial v0.1 behavior)'es5'(MDsveX, , Prettier v2)Overall, tsv prioritizes readability over writability, and aims to fit smoothly into the official Svelte repos. I'm good with
'none'personally, and things have historically worked out well when I defer conflicting choices to the official Svelte patterns.All reactions