priceline / omni-slider

A multirange vanilla js slider
https://www.priceline.com
MIT License
63 stars 12 forks source link

Linting Rule on Whitespace? #25

Closed ghost closed 8 years ago

ghost commented 8 years ago

Can we review the proposal of the linting rule on whitespace?

whitespace is a subjective opinion of the developer's style of syntax. Is this rule something worth of governing?

Do you foresee concern(s) that the code would look too weird, if some developers use a lot of whitespace cuz they like the readability, but other developers work better with compact code?

If you foresee any of these concern, any thoughts to how to govern that without linting?

chrisrng commented 8 years ago

Tried to look for documentation why we need this I found Doug Craw's answer here: https://github.com/douglascrockford/JSLint/commit/f819cf3c65d07086cf217c549c577fa77dc65fc9

MikeGertrudes commented 8 years ago

All bow to Douglas Crockford

joshbDev commented 8 years ago

Yeah I'm gonna stick with him. I think that having a hard linter is gonna be the way to go and that having a well-defined, reliable style makes it easier in the long run to read the code without having to context switch based on the dev. Since Priceline uses airBnB's style guide and this is a Priceline OS project, we're gonna stick with the linter we got.

ghost commented 8 years ago

Ok, it's fine. I cannot agree with Airbnb as a bible of JS style guide as an industry standard, but I will comply as long as my contribution to this repo is welcome'd.

I don't have a strong case for whitespace or the last comma in the last object key, even if it seems an anti pattern as a language syntax, and the argument of better diff view can be debated, by what a seasoned developer added an object key and value in the middle of the object? Then the diff would still look streamlined, without the governed last comma in the last object key.

So the last opinion I'd share is that: The governance of linting should be spent on what rules make sense to be governed, but because airBNb published a popular guide and it becomes the pseudo-bible of JavaScript style code of the industry? I am interested in seeing how many people agree to that in the public developer community.

Anyways, opinion is articulated. Good luck.

joshbDev commented 8 years ago

No it's absolutely welcomed and very much appreciated. Again, I think it's just to have a standard and stick with it. Thanks for the passion and comments!

MikeGertrudes commented 8 years ago

@bcVamp agreed. It's more like pick one and go with it. Iterate and flex as we grow, because like you said, a number of different coding styles in the same resources is going to look sloppy.