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

Support Request: Support storysource to Prettier v1.13.0 #3657

Closed
isoppp opened this Issue May 28, 2018 · 6 comments

Comments

4 participants
@isoppp
Copy link
Contributor

isoppp commented May 28, 2018

Request Support Prettier v1.13.0

Prittier default parser option changed babylon to empty and if settting empty, ouput error.

See: https://prettier.io/blog/2018/05/23/1.13.0.html#don-t-default-to-the-javascript-parser-4528-by-duailibe

Steps to reproduce

New create using storysource project and run.

Out this error:

Error: No parser and no file path given, couldn't infer a parser.

platform and version

  • Mac 10.12.6

  • Node.js v8.9.4

  • "@storybook/vue@^3.4.6"

  • "@storybook/addon-storysource@^3.4.6"

Where to start

https://github.com/storybooks/storybook/blob/master/addons/storysource/src/loader/default-options.js

I tried add parser: 'babylon' in default option. And it works.
But I do not know if this modification alone is enough.

Add:
prettier changed output from error to warning in 1.13.1

@golgistudio

This comment has been minimized.

Copy link

golgistudio commented May 28, 2018

Referencing the related prettier issue.

prettier/prettier#4567

isoppp added a commit to isoppp/storybook that referenced this issue May 30, 2018

isoppp added a commit to isoppp/storybook that referenced this issue May 30, 2018

isoppp added a commit to isoppp/storybook that referenced this issue May 30, 2018

@isoppp isoppp changed the title Support Request: Support storysource to Prettier v0.13.0 Support Request: Support storysource to Prettier v1.13.0 May 30, 2018

@igor-dv

This comment has been minimized.

Copy link
Member

igor-dv commented May 30, 2018

Should we close this?

isoppp added a commit to isoppp/storybook that referenced this issue May 31, 2018

@isoppp

This comment has been minimized.

Copy link
Contributor Author

isoppp commented May 31, 2018

@igor-dv
I think this need fix. But there's no rush.
Because Prettier changed to warning, but will change again error in the future.

Now this is output:

No parser and no filepath given, using 'babylon' the parser now but this will throw an error in the future. Please specify a parser or a filepath so one can be inferred.

And, the structure of the parser has changed in 1.13
see: #3660 (comment) (sorry i made a mistaken. this is incorrect #3659)

But if this commit is enough (lock Prettier version forever) , don't need it.

@Hypnosphi

This comment has been minimized.

Copy link
Member

Hypnosphi commented May 31, 2018

But if this commit is enough

That was a temporary solution until your PR gets merged

isoppp added a commit to isoppp/storybook that referenced this issue May 31, 2018

isoppp added a commit to isoppp/storybook that referenced this issue Jun 1, 2018

@isoppp

This comment has been minimized.

Copy link
Contributor Author

isoppp commented Jun 5, 2018

It was merged, I close this.

@Hypnosphi
Thanks for reviewing many times 🙇

@isoppp isoppp closed this Jun 5, 2018

@Hypnosphi

This comment has been minimized.

Copy link
Member

Hypnosphi commented Jun 10, 2018

Released as 4.0.0-alpha.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment