Gutenberg: Add eslint rule for lambda parameters

Created on 3 May 2017  ·  3Comments  ·  Source: WordPress/gutenberg

Which should we prefer?

const func = param => value;

or

const func = ( param ) => value;

I personally prefer the first style, but either way I think we should codify this into a lint rule.

Good First Issue [Type] Build Tooling [Type] Task

Most helpful comment

My vote would be toward the second, for consistency and ease of maintenance when adding additional arguments.

All 3 comments

My vote would be toward the second, for consistency and ease of maintenance when adding additional arguments.

I second aduth's statement, even though I usually use the top style.

My vote is for the first with @nylen, but can I also vote to allow either?

How about we just use Reason/OCaml? No more parentheses!

Was this page helpful?
0 / 5 - 0 ratings