2020 05 22 vscode更新(V1.45.1)
{
//设置按tab有2个空格的缩进
"editor.tabSize": 2,
// prettier:是否在每行末尾加上分号
"prettier.semi": true,
//格式化以单引号为主
"prettier.singleQuote": false,
//将>多行JSX元素放在最后一行的末尾,而不是单独放在下一行
"prettier.jsxBracketSameLine": false,
//代码错误实时提示
"eslint.validate":["javascript","javascriptreact","vue"],
//控制编辑器是否在用户键入、粘贴或移动行时自动调整缩进。必须安装包含此语言缩进规则的扩展。
"editor.autoIndent": "full",
"files.associations": {
"*.ejs": "html"
},
"eslint.options": {
"plugins":["html"]
},
//保存自动在末尾加空行
"files.insertFinalNewline": true,
// "javascript.format.insertSpaceBeforeFunctionParenthesis": true,//函数名与后面的括号有一个空格
// vetur:对html的内容使用js-beautify-html
"vetur.format.defaultFormatter.html": "prettier",// prettier // js-beautify-html
//格式化 vue 及标签内属性如何不自动换行
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "auto"
},
"prettyhtml": {
"printWidth": 100,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
},
"prettier": {
"semi": true,
"singleQuote": false
}
},
"prettier.trailingComma": "none",
"prettier.arrowParens": "avoid",
"vetur.format.defaultFormatter.js": "prettier",// vscode-typescript
// vue文件与HTML关联
"emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html"
},
// vue文件与HTML关联,v1.15.1之后这样设置:
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"vue-html": "html",
"vue": "html"
},
"window.zoomLevel": 1,
// "javascript.updateImportsOnFileMove.enabled": "always",
"workbench.colorTheme": "Visual Studio Light",
//保存时自动格式化 ctrl+s保存时自动修正格式错误的js代码
// "editor.codeActionsOnSave": {
// "source.fixAll.eslint": true
// },
"editor.formatOnSave": true,
"editor.formatOnType": true,
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
}
}