Formatter fails to format uglified files #10126
Labels
Domain: Formatter
The issue relates to the built-in formatter
Help Wanted
You can do this
Suggestion
An idea for TypeScript
VS Code Tracked
There is a VS Code equivalent to this issue
Milestone
TypeScript Version: 1.8.10
I use vscode from the Command Palette to format a javascript file uglified by uglify-js, but it failed. It not format code correctly, and only format partially.
source file

sublime jsFormat formated

vscode formated

You see, It seems like, vscode only add some spaces around brackets, letters, commas etc.
See microsoft/vscode#8914 (comment) and the discussion below for more details. The provided traces clearly show that the tsserver only returns white space (" ") changes. No insertion of new lines.
The text was updated successfully, but these errors were encountered: