Trailing commas in function arguments
See original GitHub issueWhat about trailing commas here?
const hero = (
firstName,
lastName,
birthYear,
superPower, // <-- this one
) => {
// ....
};
It needs http://babeljs.io/docs/plugins/syntax-trailing-function-commas/ and it’s based on this proposal
Does AirBnB encourages the use of trailing commas here?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
10. Trailing commas in function parameter lists and calls
The ECMAScript 2017 feature “Trailing commas in function parameter lists and calls” was proposed by Jeff Morrison. 10.1 Overview #. Trailing commas in...
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 >PHP 8.0: Trailing commas are allowed in parameter lists and ...
PHP 8.0 syntax allows to leave a trailing-comma in parameter lists and closure use lists. function foo(string $foo, string $bar,) {} function() use...
Read more >PHP 7.3: Trailing Commas in Function Calls - Laravel News
In PHP 7.3, trailing commas in function calls will be valid syntax. That is to say, you can use trailing commas when calling...
Read more >Trailing commas in function arguments - Learning TypeScript 2.x
Trailing commas are the commas that are used after the last argument of a function. Using a comma after the last parameter of...
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
eslint v3.6.0 now supports this, but the
comma-dangle
rule does not, just yet. This is now waiting on https://github.com/eslint/eslint/pull/7181.@ljharb fyi this is now available