Open yanovich opened 3 years ago
+1
Hi! Having the same issue. This is somewhat related to https://github.com/sheerun/prettier-standard/issues/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>
Note: I am also using the prettier-standard extension for vscode, which may be interfering with this.
Anyhow, thanks for this great package!
Louis
+1
I am having the same issue as well and I can't use the package because of this, as it is interfering with the standard linter.