Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent Intellisense from inserting semicolons in VS Code

We don't use semicolons in TypeScript. Each time Intellisense in VS code (v1.18.1) inserts a line, it terminates it with ;. Example would be an import statement.

Is it possible to configure VS Code not to append semicolons? Very inefficient right now to have to delete them manually.

like image 252
demisx Avatar asked Dec 06 '17 03:12

demisx


People also ask

How do I fix IntelliSense code in Visual Studio?

Troubleshooting# If you find IntelliSense has stopped working, the language service may not be running. Try restarting VS Code and this should solve the issue. If you are still missing IntelliSense features after installing a language extension, open an issue in the repository of the language extension.


Video Answer


1 Answers

TSLint semicolon rule (has autofix)

TSLint extension for vscode

tslint.json rules section:

"semicolon": [true, "never"]

settings.json Ctrl+,

"tslint.autoFixOnSave": ["semicolon"]

There is an open issue about it https://github.com/Microsoft/TypeScript/issues/19882

like image 103
Alex Avatar answered Oct 06 '22 23:10

Alex