Skip to content

[v14] fix: Explicitly set the prettier parser to 'babylon' #1323

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

Merged
merged 1 commit into from
May 28, 2018
Merged

[v14] fix: Explicitly set the prettier parser to 'babylon' #1323

merged 1 commit into from
May 28, 2018

Conversation

edmorley
Copy link

Since as of Prettier 1.13.0 there is no longer a default:
prettier/prettier#4528

The parser option has been supported since prettier v0.0.10, so this won't break users whose lockfile still references a pre-1.13.0 release of prettier:
https://github.com/prettier/prettier/blob/1.13.0/src/main/core-options.js#L89

This is the v14 branch backport of:
vuejs/component-compiler-utils#15

Whilst #1322 is the more important PR for us, since it will help fix the Neutrino 8 (stable) branch, this PR:

  • fixes Neutrino master (which is still using vue-loader 14 until we have a chance to update to v15),
  • prevents the inconsistent situation where the error is fixed on vue-loader v13 and v15, but not v14.

Since as of Prettier 1.13.0 there is no longer a default:
prettier/prettier#4528

The `parser` option has been supported since prettier v0.0.10, so
this won't break users whose lockfile still references a pre-1.13.0
release of prettier:
https://github.com/prettier/prettier/blob/1.13.0/src/main/core-options.js#L89

This is the `v14` branch backport of:
vuejs/component-compiler-utils#15
@yyx990803 yyx990803 merged commit 2f7f414 into vuejs:v14 May 28, 2018
@edmorley edmorley deleted the v14-prettier-hotfix branch May 28, 2018 19:33
@edmorley
Copy link
Author

Many thanks :-)

edmorley added a commit to neutrinojs/neutrino that referenced this pull request May 28, 2018
To fix the Vue preset failures on master due to the Prettier
breaking API change in 1.13.0:
vuejs/component-compiler-utils#15
 vuejs/vue-loader#1323

The lockfile has been updated manually since Renovate's weekly PR
isn't currently working:
renovatebot/renovate#2033

Fixes #913.
edmorley added a commit to neutrinojs/neutrino that referenced this pull request May 28, 2018
To fix the Vue preset failures on master due to the Prettier
breaking API change in 1.13.0:
vuejs/component-compiler-utils#15
vuejs/vue-loader#1323

Closes #913.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants