且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Visual Studio Code 中使用 TypeScript 和 JavaScript 禁用自动导入的自动分号?

更新时间:2022-12-16 11:20:59

目前没有办法做到这一点,对于 VSCode 1.30.2、TypeScript 3.3.

There is no way of doing that at the moment, for VSCode 1.30.2, TypeScript 3.3.

您可以在此处查看功能请求:https://github.com/Microsoft/TypeScript/issues/19882

You can check out the feature request here: https://github.com/Microsoft/TypeScript/issues/19882

但此功能可能会在 TypeScript 3.4 中出现,因为@RyanCavanaugh 将里程碑更新为 3.4

But this feature may come in TypeScript 3.4, as @RyanCavanaugh updated the milestone to 3.4

同时,我使用semi-standard风格.

此外,纯 standard 样式在 VSCode 中效果不佳,因为对齐方式混乱:

Also, pure standard style does not work well in VSCode as the alignment is messed up:

function foo() {
  const x = {}

    ;['a'].map(x => console.log(x)) // <-- alignment is bad
}