visual-studio-code - 防止 Intellisense 在 VS Code 中插入分号

标签 visual-studio-code vscode-settings

我们不在 TypeScript 中使用分号。每次 VS 代码 (v1.18.1) 中的 Intellisense 插入一行时,它都会以 ; 终止它.示例是导入语句。

是否可以将 VS Code 配置为不附加分号?现在必须手动删除它们非常低效。

最佳答案

TSLint semicolon rule (有自动修复)

TSLint extension for vscode
tslint.json规则部分:

"semicolon": [true, "never"]

settings.json Ctrl+,

"tslint.autoFixOnSave": ["semicolon"]

有一个关于它的未解决问题 https://github.com/Microsoft/TypeScript/issues/19882

关于visual-studio-code - 防止 Intellisense 在 VS Code 中插入分号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47666209/

相关文章:

visual-studio-code - VS 代码 : How to access debug variables from within extension?

Flutter Icons 小部件在 vscode 中没有预览

visual-studio-code - 去掉vscode中文件名后的 "M"标记

javascript - 我的 jsconfig.json 在 Visual Studio Code 中不起作用吗?

visual-studio-code - vscode : how to make text after snippet *not* selected?

ubuntu - 如何在 VSCode 中更改空间的大小?

typescript - VSCode 的 "Restart TS server"在哪里?

python - Visual Studio Code 无法识别我的 anaconda 包和模块

node.js - 文件 : 'package.json' severity: 'Warning' message: 'Problems loading reference ' ': Unable to load schema from '' : Unable to to connect to

visual-studio-code - 任务栏中的 VSCode 图标为空白