Skip to content

Possible regression: 0.80 removes parens from multiline assignment expressions #519

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

Open
wolever opened this issue May 3, 2023 · 0 comments · May be fixed by #662
Open

Possible regression: 0.80 removes parens from multiline assignment expressions #519

wolever opened this issue May 3, 2023 · 0 comments · May be fixed by #662

Comments

@wolever
Copy link

wolever commented May 3, 2023

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
);
burnnat added a commit to burnnat/dprint-plugin-typescript that referenced this issue Sep 4, 2024
@burnnat burnnat linked a pull request Sep 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant