noelhx
noelhx

Reputation: 111

Why does Shift-Alt-F in vsc remove all semi-colons from my javascript code?

When I use the Shift-Alt-F command in Visual Studio Code on a javascript file, it removes all of the semi-colons at the end of all of my statements in that file. Why is that?

I can create a new file, say, myFile.js, and enter in a single line as such:

var myVar = 10;

If I then press 'Shift-Alt-F', it immediately changes my code to be

var myVar = 10

if I do this on a large file with lots of code, it pretty much ruins my day, and makes me go back to Notepad++.

This is a stock installation, with no modifications by me. Windows 2012 R2.

Is it me? The language mode says I am in Javascript.

Upvotes: 1

Views: 1307

Answers (1)

Avin Zarlez
Avin Zarlez

Reputation: 1682

I looked around and found this bug report: https://github.com/Microsoft/vscode/issues/615

It turns out this error is caused by a plugin called JavaScript Standard Format:

https://marketplace.visualstudio.com/items?itemName=chenxsan.vscode-standard-format

Assuming you have that plugin, remove it and you should be fine.

Upvotes: 1

Related Questions