Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set trailing-comma: all in Prettier #418

Open
hyunbinseo opened this issue Jan 23, 2025 · 3 comments
Open

Set trailing-comma: all in Prettier #418

hyunbinseo opened this issue Jan 23, 2025 · 3 comments
Labels
enhancement New feature or request pkg:add sv add

Comments

@hyunbinseo
Copy link
Contributor

Is there a reason why "trailingComma": "none" is set in the template?

  1. Prettier changed its default value from es5 to all in v3.0.0
  2. Trailing comma makes diffs and pull requests easier:

Quote from the Bun 1.2 changelog:

That's why buns new text lock file is a JsonC file which is JSON with support for comments and trailing commas. This makes it much easier to view diffs and pull requests and trailing commas make it much less likely to cause merge conflicts.

@Conduitry
Copy link
Member

I'm personally very much pro trailing comma. I know some members of the team are against them for reasons I cannot understand, I don't know where the numbers sit on how many are for and against.

@benmccann
Copy link
Member

I'm in the anti trailing comma camp. It looks nicer and consistently works in all file formats. I didn't have anything to do with it being set to none and don't know how it originally was decided, but I guess that must means there's at least some other folks out there who prefer not to have it

@manuel3108
Copy link
Member

Looks like this was taken over from create-svelte .

Additionally it does look like most of the repos in this org seem to have trailing-comma: none

Personally I don't have any strong preference over any of this.

@manuel3108 manuel3108 added enhancement New feature or request pkg:add sv add labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:add sv add
Projects
None yet
Development

No branches or pull requests

4 participants