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.

Prettier is not formatting javascript file correctly.

See original GitHub issue

So prettier is not formatting javascript file correctly from time to time.

I have to manually reload the editor or change format to typescript then run format with prettier again and it works.

This behavior happened after I updated vscode to the latest version 1.23.1.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
nfantonecommented, May 13, 2018

Same here. Sometimes, it just dies and Format Document does absolutely nothing. Reloading the editor makes it work again for a brief period of time.

0reactions
github-actions[bot]commented, Apr 13, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does Prettier not format code in VS Code? - Stack Overflow
Click on Preferences: Open Settings (JSON) from the suggestion dropdown. Inside the settings.json file, Check if "[html]" key exists. If the key ...
Read more >
How to use Prettier with ESLint and TypeScript in VSCode
Using the above config, Prettier will not format TypeScript code on paste or save but it will format code on paste or save...
Read more >
Ignoring Code - Prettier
Use .prettierignore to ignore (i.e. not reformat) certain files and folders completely. Use “prettier-ignore” comments to ignore parts of files.
Read more >
Using Prettier and ESLint to automate formatting and fixing ...
Even if Prettier does not format your code 100% the way you like, ... ESLint is a JavaScript linting utility that was first...
Read more >
How to configure Prettier and VSCode - Gleb Bahmutov
You can configure JavaScript code auto-formatting with Prettier to work per-project. This allows you to get a consistent formatting without ...
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