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.

Formatter does not work in latest version - or works but takes 7-10s

See original GitHub issue

I generally use WebStorm or Atom as my editor, but we recently switched to using prettier across our repos for standardization. I wanted to get VS code set up with prettier, but after 2 hours I can’t seem to get it to format code at all.

VSCode Version: Version 1.19.3 (1.19.3) Prettier plugin: 1.1.2

We are using prettier-eslint, here’s the user settings:

// Place your settings in this file to overwrite the default settings
{
	"editor.formatOnSave": true,
	"prettier.eslintIntegration": true,
	"eslint.autoFixOnSave": false,
	// "javascript.format.enable": false,
}

I’ve tried various combinations of the javascript.format.enable, eslint.autoFixOnSave and different settings for saving, but none of them seem to actually format the code.

With the combination above I can get the code to format, but it takes an average of 8s to fix one incorrect line. I opened the same file in Atom and it fixed the same issue almost instantaneous to me hitting the save key.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
harleygurucommented, Jul 30, 2018

right, simply disable beautify, it should work!

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

"Prettier - Code formatter" is not working in Visual Studio code
I have installed this code format: Prettier - Code formatter Successfully installed but not working,. I also tried to use the command ext ......
Read more >
how formatter deals with new lines in conditional expressions ...
Part Number: CODECOMPOSER Hi all, When I have new lines like these: if ((conditional1) &&(conditional2) &&(conditional3)) I can see that the ...
Read more >
How To Format Code with Prettier in Visual Studio Code
To work with Prettier in Visual Studio Code, you'll need to install the extension. To do this, search for Prettier - Code Formatter...
Read more >
Apply formatting rules | ReSharper Documentation - JetBrains
In short, you can always use Ctrl+Alt+Enter , but there are a few details and alternatives described below. tip. If reformatting C# code...
Read more >
Zapier Formatter: Automatically format text the way you want
You export data out of one app, try to import it into another—and it looks perfect, right until it doesn't. Turns out, the...
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