Closed nicolo-ribaudo closed 2 months ago
Describe the bug
dprint-plugin-typescript version: x.x.x
Input Code
https://dprint.dev/playground/#code/JYMwFAhglA3qYCNYGMD2A7AzqgNgUwDodUBzMABigG4BfGvHTPAAngBMUNt8jSwBGavUZ4YaLLkLEyAJiFA/config/N4XyA/plugin/typescript
if(a){if(b){console.log(0);}}else if(d){console.log(1);}else{console.log(2);}
Expected Output
Something so that if a is false and d is true that code logs 1
a
false
d
true
1
Actual Output
if (a) if (b) console.log(0); else if (d) console.log(1); else console.log(2);
which, when a is false, logs nothing.
Thanks! That's pretty bad. Fixed in 0.90.5
Describe the bug
dprint-plugin-typescript version: x.x.x
Input Code
https://dprint.dev/playground/#code/JYMwFAhglA3qYCNYGMD2A7AzqgNgUwDodUBzMABigG4BfGvHTPAAngBMUNt8jSwBGavUZ4YaLLkLEyAJiFA/config/N4XyA/plugin/typescript
Expected Output
Something so that if
a
isfalse
andd
istrue
that code logs1
Actual Output
which, when
a
isfalse
, logs nothing.