← Back

arrow-parens warning

Requires parenthesis around all arrow function arguments.

Examples

❌  Incorrect

a => {};
a => a;
a => { '\n' };
a.then(foo => {});
a.then(foo => a);
a(foo => { if (true) {} });

✅  Correct

() => {};
(a) => {};
(a) => a;
(a) => { '\n' };
a.then((foo) => {});
a.then((foo) => a);
a((foo) => { if (true) {} });