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

Trailing Comma Rule #883

Closed
marcelofabri opened this issue Nov 20, 2016 · 0 comments
Closed

Trailing Comma Rule #883

marcelofabri opened this issue Nov 20, 2016 · 0 comments

Comments

@marcelofabri
Copy link
Collaborator

In collections, it's possible to keep a trailing comma in the end:

let array = [
  1,
  2,
  3,
]

I've seen people that like this pattern (because the last line wouldn't change in a diff if another item is added later) and people who don't (because it's an extra unneeded symbol).

We could have a configuration so both styles (they're exclusive) could be validated in the same rule.

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

No branches or pull requests

2 participants