[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:
Aluísio Augusto Silva Gonçalves
2015-04-06 09:10:44 -03:00
parent 320a39f4c4
commit 584532cc2c
9 changed files with 33 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
Math.max(1,
2,
3,
);

View File

@@ -0,0 +1,3 @@
"use strict";
Math.max(1, 2, 3);

View File

@@ -0,0 +1,8 @@
function thisIsAFunctionWithAVeryLongNameAndWayTooManyParameters(
thisIsTheFirstParameter, andThisOneIsRelatedToIt,
butNotThisOne,
andNeitherThis,
inFactThereArentThatManyParameters,
) {
throw null;
}

View File

@@ -0,0 +1,5 @@
"use strict";
function thisIsAFunctionWithAVeryLongNameAndWayTooManyParameters(thisIsTheFirstParameter, andThisOneIsRelatedToIt, butNotThisOne, andNeitherThis, inFactThereArentThatManyParameters) {
throw null;
}

View File

@@ -0,0 +1,3 @@
{
"optional": ["es7.trailingFunctionCommas"]
}