You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This rule auto-fixes f || function () {} to f || () => {}, which is syntactically invalid. Since an arrow function has lower precedence than a function expression, the auto-fix needs to parenthesize it when it’s an operand of most operators: f || (() => {}).
The exceptions are that an unparenthesized arrow function is allowed on the right side of an assignment =, augmenting assignment +=, -=, …, another arrow =>, yield, yield*, spread ..., the middle or right side of a ternary ? :, or either side of a comma ,.
The text was updated successfully, but these errors were encountered:
This rule auto-fixes
f || function () {}
tof || () => {}
, which is syntactically invalid. Since an arrow function has lower precedence than afunction
expression, the auto-fix needs to parenthesize it when it’s an operand of most operators:f || (() => {})
.The exceptions are that an unparenthesized arrow function is allowed on the right side of an assignment
=
, augmenting assignment+=
,-=
, …, another arrow=>
,yield
,yield*
, spread...
, the middle or right side of a ternary? :
, or either side of a comma,
.The text was updated successfully, but these errors were encountered: