-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Incompatible with Prettier 2.0 because of parser option babylon which has been removed (replaced by babel) #1794
Comments
I'm also using prettier 2.0 and am having troubles when this plugin undoes the formatting in the git repo. |
Anyone news? |
@rnenjoy {
"[vue]": {
// Vetur uses an old version of prettier
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
} This is specific enough that it doesn't mess with my other formatting options and fixes the problem with |
Not an option for me since that affects the whole .vue file and I don't use prettier to format my template, only the script tag. |
For now i went into the extension code, and changed babylon to babel manually. Tell me if you guys need help which file to edit. |
@rnenjoy how do you do that? |
Sorry for the delay: Change 398 |
@rnenjoy just add this line to your .vscode/settings.json file |
Info
Problem
The parser option
babylon
has been removed in Prettier 2.0Error message:
Prettier format failed
[Error - 10:52:04 p.m.] Couldn't resolve parser "babylon"
The fix: https://github.com/vuejs/vetur/blob/master/server/src/modes/script/javascript.ts#L484
Replace
babylon
withbabel
Reproducible Case
Format a Vue File using prettier 2.0
The text was updated successfully, but these errors were encountered: