比较好用的vscode vue 格式化配置.md

个人觉得好用的vue配置

建立在使用vetur插件的基础上

{
    "path-intellisense.mappings": {
        "@": "${workspaceRoot}/src"
    },
    "editor.detectIndentation": false,
    "workbench.editor.enablePreview": false,
    "vetur.format.defaultFormatter.html": "js-beautify-html",
    "vetur.format.defaultFormatter.js": "vscode-typescript",
    "vetur.format.defaultFormatterOptions": {
        "js-beautify-html": {
            "wrap_attributes": "auto"
        },
        "prettyhtml": {
            "printWidth": 100,
            "singleQuote": false,
            "wrapAttributes": false,
            "sortAttributes": false
        }
    },
    "vetur.format.options.tabSize": 4,
    "vetur.format.options.useTabs": true,
    "vetur.format.scriptInitialIndent": true,
    "vetur.format.styleInitialIndent": true,
    "git.autofetch": true,
    "[vue]": {
        "editor.defaultFormatter": "octref.vetur"
    },
}
一个幽默的前端爱好者,记录下自己的心得体会
原文地址:https://www.cnblogs.com/little-oil/p/15169541.html