Prettier-vscode: Prettier is not formatting javascript file correctly.

Created on 11 May 2018  路  6Comments  路  Source: prettier/prettier-vscode

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.

locked

Most helpful comment

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.

All 6 comments

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.

You may have some troubles with an other extension. see #439

I'm not sure if this is Prettier or TypeScript doing this, but I have this same issue when JS files are generated on compile. The tab spacing is 4 instead of 2; Prettier is formatting the TS files but not the generated JS files, unless I manually save them again.

Any suggestions?

@methodbox can you open another issue. I don't get exactly what you are asking for tho.

I'll close that one due to vscode 1.33 which makes formatter work a bit differently.

Will do.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DanielHabenicht picture DanielHabenicht  路  4Comments

sebastijandumancic picture sebastijandumancic  路  4Comments

bardware picture bardware  路  4Comments

bluemoehre picture bluemoehre  路  3Comments

Connorelsea picture Connorelsea  路  4Comments