question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New release of Prettier breaks formatting

See original GitHub issue

Title. They seem to have added support for Vue single file components upstream: https://github.com/prettier/prettier-vscode/issues/325

I’m now getting “Unexpected token” Prettier errors in HTML comments and Vue attributes (like @change) despite having HTML formatting disabled.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mixedCasecommented, Jan 16, 2018

Huh. I just tested removing the parser setting and it’s now working. Leaving this issue open in case that should not be the case. (Indeed setting parser to Babylon worked before the Prettier update)

0reactions
HerringtonDarkholmecommented, Jan 17, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Options - Prettier
To have Prettier wrap prose to the print width, change this option to "always". If you want Prettier to force all prose blocks...
Read more >
Rationale - Prettier
Prettier collapses multiple blank lines into a single blank line. Empty lines at the start and end of blocks (and whole files) are...
Read more >
Prettier 2.6: new singleAttributePerLine option and new ...
This release includes a new singleAttributePerLine option. This is an option to print only one attribute per line in Vue SFC templates, ...
Read more >
Prettier 2.1: new --embedded-language-formatting option and ...
This release adds a new `--embedded-language-formatting` option, supports new JavaScript/TypeScript features, and includes many bug fixes ...
Read more >
Prettier 2.3. In which assignments are consistent, short keys ...
This release focuses on fixing long-standing issues in the JavaScript printer. Be warned that, unfortunately, reformatting a project with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found