dprint-plugin-typescript icon indicating copy to clipboard operation
dprint-plugin-typescript copied to clipboard

Possible regression: 0.80 removes parens from multiline assignment expressions

Open wolever opened this issue 2 years ago • 0 comments

Per the "explicit newlines" documentation, parens should be maintained around multiline assignment expressions:

const mathResult = (
    1 + 2);
// formats as
const mathResult = (
    1 + 2
);

However, it seems like version 0.80 does not follow this behaviour:

// using https://plugins.dprint.dev/typescript-0.80.0.wasm
const mathResult = (
    1 + 2);
// yields:
const mathResult = 1 + 2;

// using https://plugins.dprint.dev/typescript-0.79.0.wasm
const mathResult = (
    1 + 2);
// yields:
const mathResult = (
    1 + 2
);

wolever avatar May 03 '23 20:05 wolever