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
Interesting, it seems Prettier JS allows ternaries with "simple" conditionals (like a single boolean variable) to be printed like our plugin does, but not more complex ones. I will have to take a look at their heuristic to replicate their behavior.
I don't think it's worth investing time in this. I'm fine with you just choosing one variant and sticking with it. I don't see a reason to have two different types of printing for the (almost) same type of code. Why complicate things? So for me this issue can be closed. I'll leave the decision to you. :)
Activity
jtkiesel commentedon May 20, 2026
Interesting, it seems Prettier JS allows ternaries with "simple" conditionals (like a single boolean variable) to be printed like our plugin does, but not more complex ones. I will have to take a look at their heuristic to replicate their behavior.
boris-petrov commentedon May 20, 2026
I don't think it's worth investing time in this. I'm fine with you just choosing one variant and sticking with it. I don't see a reason to have two different types of printing for the (almost) same type of code. Why complicate things? So for me this issue can be closed. I'll leave the decision to you. :)