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
InstanceScreen.js:161:5: Expected newline between test and consequent of ternary expression.
InstanceScreen.js:161:21: Expected newline between consequent and alternate of ternary expression.
The text was updated successfully, but these errors were encountered:
Hi! Having the same issue. This is somewhat related to #76, as it relates to ternary formatting, but does not imply that the ternary is nested into another.
In other terms: in JSX expressions, formatting multiline ternaries will fire the errors mentioned. For example, such a multiline ternary expression will be formatted as :
<div>
{condition ? (
<div>
This is a multiline div that will cause the formatter to wrongly
format the ternary expression
</div>
) : (
"this one line string could be on the same line than ':', without parentheses"
)}
</div>
Whereas it should be formatted like this to be valid according to standard:
<div>
{condition
? (
<div>
This is a multiline string that will cause the formatter to wrongly
format the ternary expression
</div>
)
: (
"this one line string could also be on the same line than ':', without parentheses"
)}
</div>
The text was updated successfully, but these errors were encountered: