1.安装chinses中文语言包!
2.安装eslint javascript代码规范!
3.安装less预编译!
4.安装vue-vscode-snippets 定制化修改
5.安装vetur代码格式化!
6.vue 2 Snippetsvetur vue语法高亮!
7.配置eslint保存后调整成eslint的规范
.
添加如下代码:
{
"emmet.triggerExpansionOnTab": true,
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"files.associations": {
"*.vue": "vue"
},
"workbench.colorTheme": "Visual Studio Dark",
"git.autofetch": true,
"workbench.startupEditor": "newUntitledFile",
"window.zoomLevel": 0,
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"html",
{
"language": "vue",
"autoFix": true
},
"vue",
],
"eslint.options": {
"extensions": [
".js",
".vue"
]
},
//为了符合eslint的两个空格间隔原则
"editor.tabSize": 2,
"extensions.ignoreRecommendations": false,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
"[javascript]": {
"editor.defaultFormatter": "HookyQR.beautify"
},
"eslint.alwaysShowStatus": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
}