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 results in },])
contortion
#133
Labels
rule change 👩⚖️
Suggest a style guide rule change
Comments
Yup, I don't like it either 😬 |
Yes, one would think |
These all look reasonable: Item.find_by_sql(
[
sql,
{
user_id: user.id,
answer: answer,
},
]
).uniq Item.find_by_sql([
sql,
{
user_id: user.id,
answer: answer,
},
]).uniq Item.find_by_sql([
sql,
{user_id: user.id, answer: answer},
]).uniq Item.find_by_sql([sql, {user_id: user.id, answer: answer}]).uniq
|
Pretty sure we fixed this in a7156b1 |
casperisfine
pushed a commit
to casperisfine/standard
that referenced
this issue
Aug 31, 2022
These cops used to be configured with `EnforcedStyleForMultiline: consistent_comma` but it was changed in standardrb@a7156b1 because it can cause some weird contortions, see: standardrb#133 I totally agree that this cop resulting in such horrible contorsion is broken, but I don't understand why that would justify to switch to a different style rather than to just disable the cop. Trailing comma in multiline hashes & co have the major advantage of reducing diff noise when adding or removing an element.
casperisfine
pushed a commit
to casperisfine/standard
that referenced
this issue
Aug 31, 2022
These cops used to be configured with `EnforcedStyleForMultiline: consistent_comma` but it was changed in standardrb@a7156b1 because it can cause some weird contortions, see: standardrb#133 I totally agree that this cop resulting in such horrible contorsion is broken, but I don't understand why that would justify to switch to a different style rather than to just disable the cop. Trailing comma in multiline hashes & co have the major advantage of reducing diff noise when adding or removing an element.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Standard keeps slamming the final
,
into this and I hate it:There's no way anyone thinks
},])
is preferable in this case, right?The text was updated successfully, but these errors were encountered: