disallow trailing commas in array/object literals (es/no-trailing-commas)

This rule reports ES5 trailing commas in array/object literals as errors.

Examples

⛔ Examples of incorrect code for this rule:

/*eslint es/no-trailing-commas: error */ var a = [1, 2,] var b = { x: 1, y: 2, }
Now loading...

📚 References

Last Updated: 8/27/2019, 11:29:02 AM