[ES7] Trailing comma in function parameter list
Currenly a stage 1 proposal. See https://github.com/jeffmo/es-trailing-function-commas.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
Math.max(1,
|
||||
2,
|
||||
3,
|
||||
);
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
Math.max(1, 2, 3);
|
||||
@@ -0,0 +1,8 @@
|
||||
function thisIsAFunctionWithAVeryLongNameAndWayTooManyParameters(
|
||||
thisIsTheFirstParameter, andThisOneIsRelatedToIt,
|
||||
butNotThisOne,
|
||||
andNeitherThis,
|
||||
inFactThereArentThatManyParameters,
|
||||
) {
|
||||
throw null;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
function thisIsAFunctionWithAVeryLongNameAndWayTooManyParameters(thisIsTheFirstParameter, andThisOneIsRelatedToIt, butNotThisOne, andNeitherThis, inFactThereArentThatManyParameters) {
|
||||
throw null;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"optional": ["es7.trailingFunctionCommas"]
|
||||
}
|
||||
Reference in New Issue
Block a user