VSCode 版本 1.40.1
扩展

settings.json
{
"editor.tabSize": 4,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"extensions.ignoreRecommendations": true,
"workbench.colorCustomizations": {
"activityBar.activeBorder": "#295c8a",
"activityBar.activeBackground": "#295d8a4f"
},
"update.enableWindowsBackgroundUpdates": false,
"cssrem.rootFontSize": 100,
"emmet.includeLanguages": {
"vue-html": "html",
"javascript": "javascriptreact",
"typescript": "typescriptreact"
},
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
},
"html",
"typescript",
"typescriptreact"
],
"git.autofetch": true,
"git.confirmSync": false,
"git.rebaseWhenSync": true,
"prettier.jsxSingleQuote": true,
"prettier.singleQuote": true,
"prettier.semi": false,
"prettier.tabWidth": 4,
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-expand-multiline"
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": true,
"sortAttributes": true
},
"prettier": {
"semi": false,
"singleQuote": true
}
},
"vetur.format.options.tabSize": 4
}
参考
vuejs.github.io/vetur/linti…
github.com/Prettyhtml/…
prettier.io/docs/en/opt…