Skip to content

Conversation

@AnNOtis
Copy link
Contributor

@AnNOtis AnNOtis commented Jan 24, 2016

see #3

Copy link
Contributor

Choose a reason for hiding this comment

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

Trailing comma, please remove

@davidLeonardi
Copy link
Contributor

Thanks for this contribution.
Sorry for being a codenazi about the trailing commas, but I think that trailing commas should not be allowed. Anyone else has an opinion on this? I get that it only used to break IE, but still i find it's not really correct JS.
@johannhof @AnNOtis @helielson opinions wanted!

@AnNOtis
Copy link
Contributor Author

AnNOtis commented Jan 24, 2016

Currently, our eslint configuration enforce trailing comma.
It's base on airbnb/javascript style guide.
More informations 👉 https://github.com/airbnb/javascript#commas

@davidLeonardi
Copy link
Contributor

My personal opinion on that is that it's wrong, and should be changed in the linting settings. This is probably one of the points where i disagree with the airbnb styleguide.
Citing from the interwebs:
"Using ES6 syntax implies full support for ES5. As well as that, today’s transpilers like babel remove the last comma anyway".
So what this tells us, is that babel fixes this for us. Why not simply adhere to the language then?

@davidLeonardi
Copy link
Contributor

Either way, i'd say we should match what ReactNative has.
Seems they allow trailing commas. :(
@AnNOtis do you have a clue what styleguide they adopt?

@davidLeonardi
Copy link
Contributor

Anyhow, as trailing commas match RN's style, i'll consider this a go.

davidLeonardi added a commit that referenced this pull request Jan 24, 2016
Convert index.js and ./components to ES6
@davidLeonardi davidLeonardi merged commit 63b8dde into react-native-simple-router-community:master Jan 24, 2016
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.

2 participants