Describe the bug
When any of else-if sections is multiline, the whole if/else-if/else block should have braces. Currently, braces are applied to the final else, but not to the initial if.
dprint-plugin-typescript version: 0.95.11
Input Code
if (cond1)
a = 1;
else if (cond2) {
a = 2;
b = 1;
} else
a = 3;
Expected Output
if (cond1) {
a = 1;
} else if (cond2) {
a = 2;
b = 1;
} else {
a = 3;
}
Actual Output
if (cond1)
a = 1;
else if (cond2) {
a = 2;
b = 1;
} else {
a = 3;
}
Describe the bug
When any of else-if sections is multiline, the whole if/else-if/else block should have braces. Currently, braces are applied to the final
else, but not to the initialif.dprint-plugin-typescript version: 0.95.11
Input Code
Expected Output
Actual Output