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.

Untitled files and eslintIntegration uses babylon parser

See original GitHub issue

Seems Prettier is not supporting JSON formatting because every time I get errors if I’m trying to format JSON.

Example try to format this code:

{"name": "Benas"}

So why it’s not disabled by default?

I need to do this by myself to disable it with:

  "prettier.disableLanguages": [
    "vue",
    "json"
  ],

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ntottencommented, Oct 29, 2019

This should now be fixed, we use the parser based on the language set in VS Code for untitled files. You can try out version 3.0 preview which has this fix here: https://marketplace.visualstudio.com/items?itemName=prettier.prettier-vscode

0reactions
github-actions[bot]commented, Jun 2, 2021

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

babel/parser
The Babel parser (previously Babylon) is a JavaScript parser used in Babel. ... Set this option to true to always parse files in...
Read more >
@babel/eslint-parser | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Prettier+ - Visual Studio Marketplace
"" - Automatically infers the parser from the input file path. "babel" - Via @babel/parser named babylon until v1.16.0; "babel-flow" - Same as ......
Read more >
vscode 所有的默认配置项_Gabriel_wei的博客
"files.autoSaveDelay": 1000, // 分配给新文件的默认语言模式。 ... formatter using typescript parser from prettier // - vscode-typescript: ts ...
Read more >
vscode 所有的默认配置项- tcanhe - 博客园
675 // - afterDelay: 当文件修改后的时间超过`files. ... 2768 "prettier.parser": "babylon", 2769 2770 // Fit code within this line limit 2771 ...
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