Requires an extra comma following the final element of an array or object literal.
Types: Boolean
or Object
Values:
true
: validates all arrays and objectsObject
:ignoreSingleValue
: allows single property objects and single element arrays to not require a trailing commaignoreSingleLine
: allows objects and arrays on a single line to not require a trailing comma"requireTrailingComma": true
var foo = [1, 2, 3,];
var bar = {a: "a", b: "b",}
var car = [1];
var dar = {a: "a"};
var car = [1, 2, 3];
var dar = {a: "a", b: "b"};
var foo = [1, 2, 3];
var bar = {a: "a", b: "b"}