Proposal: Require dangling commas for multiline objects/arrays on all Javascript mozilla-central code

Kris Maglione kmaglione at mozilla.com
Wed Aug 22 20:42:30 UTC 2018


On Wed, Aug 22, 2018 at 09:29:26PM +0100, Mark Banner wrote:
>I would like to propose that we require dangling commas for multi-line 
>object/arrays in Javascript code for mozilla-central.

+1

I've lost count of the number of times I've hit an obscure 
failure because I added a new element to the end of an array or 
object without realizing the last element didn't have a comma. 
Most of the areas I'm responsible for already require this rule, 
and it's saved me a lot of headaches.

-- 
Kris Maglione

The use of COBOL cripples the mind; its teaching should therefore be
regarded as a criminal offense.
	--Edsger W. Dijkstra



More information about the firefox-dev mailing list