jsoverson / grunt-plato

Generate static analysis reports with plato through grunt
MIT License
205 stars 23 forks source link

Remove trailing commas from doc examples #14

Closed m90 closed 10 years ago

m90 commented 10 years ago

I'm a little unsure if this is intended or not, but there are a whole lot of unneeded trailing commas in the documentation examples. This puzzled me quite a bit when reading the docs as it gave me the feeling as if there's something missing.

Maybe this is a personal style choice, but in case not feel free to merge this.

dreamyguy commented 10 years ago

Just noticed the same, was about to fork when I saw @m90 's changes :+1:

jsoverson commented 10 years ago

Merging if it causes concern, but trailing commas are legal and don't cause issues. Most other languages support them and they allow repetitive blocks to be copied and pasted more easily without concern to where you're copying from or pasting to.

dreamyguy commented 10 years ago

Trailing commas make all the JavaScript coming after them break on IE7, which some unfortunate dudes like me need to support. JSHint will complain on trailing commas with its default options. :)

jsoverson commented 10 years ago

Yep, but this is JavaScript in node. Adhering to browser compatible JavaScript (regardless of IE7/8) in node is a burden and should not be a concern.

On a side note, global usage of IE7 has dropped to 0.24%, you should not be supporting IE7 anymore.

IE8 is under 7% and falling; major companies and libraries have already dropped support for it. It's still a cost vs value discussion but is one everyone should be having on a monthly/quarterly basis.