user setting 的配置如下:
{
"workbench.colorTheme": "Monokai",
"editor.matchBrackets": false,
"workbench.iconTheme": "vscode-icons",
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
"suppressLineUncommittedWarning": false,
"suppressNoRepositoryWarning": false,
"suppressUpdateNotice": false,
"suppressWelcomeNotice": true
},
"files.associations": {
"*.vue": "vue"
},
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue",
{
"language": "vue",
"autoFix": true
}
],
"eslint.autoFixOnSave": true,
"editor.tabSize": 2,
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"typescript.format.insertSpaceBeforeFunctionParenthesis": true,
"prettier.singleQuote": true,
"prettier.trailingComma": "none",
"prettier.semi": false,
"prettier.useTabs": false,
"prettier.tabWidth": 2,
"vetur.format.defaultFormatter.js": "prettier",
"vetur.format.defaultFormatter.html": "js-beautify-html"
}
之前格式化一直没问题,vscode更新之后,格式化后,javascript函数的小括号前的空格被去掉,并且vue文件template里的代码根本不被格式化。
本人已经解决 https://juejin.im/post/5a9fae...