-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong formatting of object literal inside ternary operator when using tabs #12517
Comments
Thanks for opening this. I'm also having this issue on version |
Same issue here on v2.7.1. No updates still?! |
piling on with another example:
|
I'm seeing similar behavior in 3.1.1, but but my closing Input someCondition ?
{
a: 1,
b: 2
} : {
c: 3
} Output someCondition
? {
a: 1,
b: 2,
}
: {
c: 3,
}; It also seems to over-indent the closing syntax for functions when they appear in a ternary: playground |
I think the correct behavior here would be to align the someCondition
? {
a: 1,
b: 1,
}
: {
c: 3,
} Admittedly it feels weird for a line to contain |
Sadly this does not work if I'm surprised that this has been an issue since 2018 yet there has not been any updates or attempts with fixing this bug. |
Prettier 2.6.0
Playground link
# Options (if any): --use-tabs
Input:
Output:
Expected behavior:
The text was updated successfully, but these errors were encountered: