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
New create using storysource project and run.
Out this error:
Error: No parser and no file path given, couldn't infer a parser.
Node.js v8.9.4
"@storybook/vue@^3.4.6"
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
Referencing the related prettier issue.
Should we close this?
@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: https://github.com/storybooks/storybook/pull/3660#issuecomment-393102700 (sorry i made a mistaken. this is incorrect https://github.com/storybooks/storybook/pull/3659)
But if this commit is enough (lock Prettier version forever) , don't need it.
But if this commit is enough
That was a temporary solution until your PR gets merged
It was merged, I close this.
@Hypnosphi
Thanks for reviewing many times :bow:
Released as 4.0.0-alpha.9
Most helpful comment
That was a temporary solution until your PR gets merged