Closed ghost closed 1 year ago
We have lots of things that are different from default prettier because Ruby is a different language with different considerations. (For example, you can't always add a trailing comma in the event of a heredoc.) For that reason, we're going to keep it the same.
I agree that it's not important to be consistent with Prettier Javascript.
What do you think about the "cleaner diffs and easier code manipulations" though? Doesn't that also apply to Ruby too, even if we can't always add a trailing comma?
I agree that that is a concern that some folks have, which is why I provided the option in the first place. I wouldn't have added the option if the argument didn't have merit.
As described in this excellent blog post from Nik Graf, trailing commas result in cleaner diffs and easier code manipulations. That is why Prettier changed their default to "all" with the release of V3. See also this discussion.
The rationale for Javascript applies to Ruby as well. It would be great for
plugin-ruby
to be consistent with Prettier.