Trailing comma added after comment in call expression
See original GitHub issueIssue Analytics
- State:
- Created 7 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
Trailing commas - JavaScript - MDN Web Docs
JavaScript allows trailing commas wherever a comma-separated list of values is accepted and more values may be expected after the last item.
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 in JavaScript function call - Stack Overflow
The rule on trailing commas for function call arguments states: 7.15 Functions with multiline signatures, or invocations, should be indented ...
Read more >Trailing commas in all expression lists - Pitches - Swift Forums
The problem is that current Swift does not accept a comma after the last expression in an argument list. It is possible to...
Read more >Code Syntax Style: Trailing Commas - JetBrains Rider
When multiple items are separated by the comma (object, array, and collection initializers, as well as enums and switch expressions) , C# allows ......
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 Free
Top 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
Pretty sure this is the same issue, but with trailing commas enabled:
I noticed when I saw a line that had fifteen trailing commas; on subsequent runs, prettier just keeps adding them 😂
The reason
works is because
// example
has a special type “line-suffix” with special logic. Otherwise if youjoin(",", elements)
it would put the,
after the comment like it happens for the trailing comment here.