未配置Visual Studio Code自动格式化程序

时间:2019-07-19 05:06:46

标签: vue.js visual-studio-code formatting

我最近开始在VueJS中工作。我为此使用Visual Studio代码。 tslint.json中有一些规则,例如结尾逗号和单引号。 但是,每当我使用VS代码自动格式化程序时,它都会删除所有结尾的逗号,并将单引号替换为双引号。

在其他一些帖子之后,我也在setting.json中进行了一些更改,但没有任何变化。格式化程序的行为相同。

当前,我的setting.json看起来像这样。

{
    "window.zoomLevel": 0,
    "explorer.confirmDragAndDrop": false,
    "typescript.updateImportsOnFileMove.enabled": "never",
    "editor.tabSize": 2,
    "editor.autoClosingBrackets": "always",
    "typescript.preferences.quoteStyle": "single",
    "javascript.preferences.quoteStyle": "single",
    "prettier.jsxSingleQuote": true,
    "prettier.singleQuote": true,
    "prettier.trailingComma": "all",
    "vetur.format.defaultFormatter.js": "vscode-typescript"
}

我们非常感谢快速帮助。

0 个答案:

没有答案
相关问题