I use Visual Studio Code with Vetur extension, when I right click on my .vue file and chose "Format Document" option Visual Studio Code automatically add the semicolons that intentionally removed them.
How do I stop this?
Enable/Disable Format On SaveOpen up VSCode Command Palette by pressing Ctrl + Shift + P. Search and select Open Settings (UI). Just start typing and it will auto-fill. Once there's a match, you can hit enter immediately, or manually click on the right option.
Settings -> in Search bar type: 'semicolon' -> change values to 'insert' for both JS and TS, save and close. Now every time on save, VSCode will look for missing semicolons inside the file you're in and append them.
VS Code maintains a debug session while the program is running, and pressing the Stop button terminates the program.
Put this in your user settings and it won't change your semis:
"vetur.format.defaultFormatter.js": "vscode-typescript",
Forget the earlier answer, gives me runtime issues.
Install Prettier- code formatter extension and disable the addition of semi colons by unchecking the Prettier:Semi as in the screenshot below
Note : Dont forget to reload your vs code after you install the extension and before u do the config changes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With