iflix / standard

:star2: JavaScript Standard Style Guide
http://standardjs.com
MIT License
0 stars 0 forks source link

comma-dangle => always-multiline #8

Open ronny opened 7 years ago

ronny commented 7 years ago

comma-dangle set to always-multiline

Why?

joshgillies commented 7 years ago

I think there's also something to be said about using this rule to ensure cleaner commits.

const test = {
-  one: 1
+  one: 1,
+  two: 2
}

vs.

const test = {
  one: 1,
+  two: 2,
}
joshgillies commented 7 years ago

however, writing arrays like this: const nums = [1,2,3,4,] feels a little weird...

ronny commented 7 years ago

@joshgillies that trailing comma in a single line will error inalways-multiline

joshgillies commented 7 years ago

Ah, ok then! Thanks @ronny 😄

SomeoneWeird commented 7 years ago

@pomke You voted this down, mind explaining why?