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

Enable more trailing commas, particularly in function parameters and calls #662

Open
eefi opened this issue Oct 27, 2021 · 1 comment · May be fixed by #822
Open

Enable more trailing commas, particularly in function parameters and calls #662

eefi opened this issue Oct 27, 2021 · 1 comment · May be fixed by #822

Comments

@eefi
Copy link

eefi commented Oct 27, 2021

I'd like to suggest changing the Prettier trailingComma setting from es5 to all for the next gts release with breaking changes.

https://prettier.io/docs/en/options.html#trailing-commas

In particular, this would enable trailing commas in multiline function parameter lists and calls, which can help reduce commit diff noise.

The Prettier docs note that this requires ES2017 and TypeScript 2.7, but gts already specifies ES2018 and TypeScript 4.x.

@calebegg
Copy link
Member

+1 to this. The internal prettier config at Google uses trailingComma: 'all'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants