29 lines
690 B
Plaintext
Raw Normal View History

Shared coding conventions allow teams to collaborate effectively. This rule raises an issue when the use of parentheses with an arrow function does not conform to the configured requirements.
== Noncompliant Code Example
With the configured defaults forbidding parentheses
----
var foo = (a) => { /* ... */ }; // Noncompliant; remove parens from arg
var bar = (a, b) => { return 0; }; // Noncompliant; remove curly braces from body
----
== Compliant Solution
----
var foo = a => { /* ... */ };
var bar = (a, b) => 0;
----
ifdef::env-github,rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]