-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Hello,
Is there a way to make coerce to be the preferred strategy, and to not adjust the code when there's a ternary ?
I have code that looks like
{ foo ? <thing1> : <anotherthing2>}
with coerce enabled as the rule, its converting the code to
{ !!foo && <thing1>} and i lose the else.
Is there a way to make coerce apply only when there's no ternary?
For instance, I would like the coerce rule to apply only when I do
{ foo && <thing> }
When I make ternary the default it converts all of the
{ foo && <thing> } to { foo ? <thing>: null }
Is it possible to have ternary and coerce as valid strategies without autofixing?
{ foo ? <thing1> : <anotherthing2>}
{ !!foo && <thing1>}
Thanks for your time!