Skip to content
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

improve formatting between long function param and long type param #565

Open
brodybits opened this issue Jun 7, 2021 · 2 comments
Open
Labels
enhancement New feature or request needs-discussion

Comments

@brodybits
Copy link
Owner

prettier/prettier#11032

Prettier 2.2.1
Playground link

--parser babel

Input:

const LongVar = LongLongLongLongLongFun(param, { 
  key1: "value1"
});

type LongType = LongLongLongLongLongLongType<Param, {
  key1: Value1,
}>

Output:

const LongVar = LongLongLongLongLongFun(param, {
  key1: "value1",
});

type LongType = LongLongLongLongLongLongType<
  Param,
  {
    key1: Value1,
  }
>;

Expected behavior:

The output should be same as input I think.

const LongVar = LongLongLongLongLongFun(param, { 
  key1: "value1"
});

type LongType = LongLongLongLongLongLongType<Param, {
  key1: Value1,
}>
@brodybits brodybits added enhancement New feature or request needs-discussion labels Jun 7, 2021
@kbrilla
Copy link

kbrilla commented Jul 8, 2021

image
same happens in class declarations and it really looks bad
Happens after upgrade form 2.2.1 -> 2.3.2

@brodybits
Copy link
Owner Author

same happens in class declarations and it really looks bad

prettier/prettier#11032 (comment)

Shouldn't this be part of issue #444?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-discussion
Projects
None yet
Development

No branches or pull requests

2 participants