prettier / prettier

Prettier is an opinionated code formatter.
https://prettier.io
MIT License
49.3k stars 4.34k forks source link

[[call]] property is stripped out for flow types. #4903

Closed dashed closed 6 years ago

dashed commented 6 years ago

Prettier 1.13.7 Playground link

Input:

// @flow

type Sample = {
  [[call]]: $npm$styledComponents$Call<NativeComponentListKeys>
}

Output:

// @flow

type Sample = {};

Expected behavior:

[[call]] property shouldn't be stripped out for flow types.

ikatyang commented 6 years ago

FYI, we're waiting for the flow-parser@0.77 release (#4869).

dashed commented 6 years ago

@ikatyang Ah I see. Thanks for the prompt response! 👍

bradennapier commented 6 years ago

I see this was successfully setup for 1.14.1 - any idea on release? This is killin me right now and i have to turn off prettier for the whole team or it breaks almost everything since we depend on that feature now.

Appreciate y'all being prompt on getting it going though!! Awesome as usual team!

j-f1 commented 6 years ago

@bradennapier We’re currently working on a PR (#4869), and we’ll probably release the new version soon after we finish that PR.

ikatyang commented 6 years ago

@bradennapier As a temporary workaround, you could put an ignore comment in front of it:

Prettier 1.14.0 Playground link

--parser babylon

Input:

// prettier-ignore
type Sample = {
  [[call]]: $npm$styledComponents$Call<NativeComponentListKeys>
}

Output:

// prettier-ignore
type Sample = {
  [[call]]: $npm$styledComponents$Call<NativeComponentListKeys>
}