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

Change trailing commas config #35

Merged

Conversation

gingermusketeer
Copy link
Member

This changes the default for trailing commas to be :always. The reason I opted for this is so that consistency is enforced.

This also removes the :dynamic option for the same reason as above.

While I think that :always is the better default, due to minimizing diff noise, I do think that we need to a configuration option for this. Thoughts?

Copy link
Member

@bessey bessey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect we'll have some friction over the default, but I definitely agree that removing dynamic is the right thing to do.

Personally, I am happy with either option.

Copy link
Member

@splattael splattael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mjago
Copy link
Member

mjago commented Oct 16, 2017

I think I will personally tend to configure no trailing comma but I'm happy to go with the majority view.

It may be worth noting that the defaults on both prettier and rubocop (I think) is no multiline trailing comma - configuration allowed, so we should expect disapproval.

@mjago mjago self-requested a review October 16, 2017 08:10
@splattael splattael assigned danielma and unassigned danielma Oct 16, 2017
@splattael splattael requested a review from danielma October 16, 2017 08:19
Copy link
Member

@mjago mjago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gingermusketeer I've noticed one small thing - last_has_comma can now disappear altogether

@mjago
Copy link
Member

mjago commented Oct 17, 2017

Thanks @gingermusketeer 👍

@mjago mjago merged commit 57d70ab into ruby-formatter:master Oct 17, 2017
@gingermusketeer gingermusketeer deleted the change-trailing-commas-config branch October 17, 2017 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants