Code style : unneeded comma
See original GitHub issueAt the end of many arrays and objets there are comma like in this example :
bot.client.write('close_window', {
windowId: window.id,
});
Is there a reason for this ?
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Code Syntax Style: Trailing Commas - JetBrains Rider
Apply trailing comma style with custom Code Cleanup profile · Press Ctrl+Alt+S or choose File | Settings (Windows and Linux) or JetBrains Rider ......
Read more >Trailing commas - JavaScript - MDN Web Docs
Trailing commas (sometimes called "final commas") can be useful when adding new elements, parameters, or properties to JavaScript code.
Read more >Best practices for using trailing commas in JavaScript
A trailing comma, also known as a dangling or terminal comma, is a comma symbol that is typed after the last item of...
Read more >Trailing comma after last line in object - Stack Overflow
Trailing commas are a code-style convention that was introduced to avoid spurious differences in version controls (ie Git) ...
Read more >Why you should enforce Dangling Commas for Multiline ...
We all have different opinions on what code should look like. Most of the time it's a matter of preference based on good...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
New properties and elements can be added on subsequent lines without changing the prior line to add a comma (= cleaner diff)
So, indeed WebStorms 10 allows to not error on these trailing comma. I guess it doesn’t matter that much.