vscode保存自动格式化代码

vue/typescript

{
    "eslint.autoFixOnSave": true,
    "eslint.run": "onType",
    "vetur.format.defaultFormatterOptions": {
        "prettier": {
            "semi": false,
            "singleQuote": true
        }
    },
    "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
    "vetur.format.defaultFormatter.js": "vscode-typescript",
    "workbench.colorTheme": "Quiet Light",
    "editor.tabSize": 2,
    "eslint.alwaysShowStatus": true,
    "git.autofetch": true,
    "git.confirmSync": false,
    "editor.formatOnSave": true,
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe"
}

保存为settings.json


image.png

替换以前的配置就好

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容