一、vs code插件
二、settings.json
//设置区域代码划线
"editor.guides.bracketPairs": true,
//vuter的设置
"vetur.format.defaultFormatter.js": "vscode-typescript",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
//eslint配置,安装Eslint插件后,配置自动转换符合Eslint符合的代码
"eslint.run": "onType",
"eslint.options": {
"extensions": [
".js",
".vue",
".jsx",
".tsx"
]
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
注意:配置eslint插件时需要把vscode的保存格式化禁用
3.setting完整配置
{
"liveServer.settings.donotVerifyTags": true,
"emmet.excludeLanguages": [
"markdown"
],
"open-in-browser.default": "{\"open-in-browser.default\":\"Chrome\"}",
"workbench.colorTheme": "escook Light Soft",
"editor.mouseWheelZoom": true,
"editor.formatOnType": true,
"editor.tabSize": 2,
"emmet.triggerExpansionOnTab": true,
"px-to-vw.viewportWidth": 750,
"editor.guides.bracketPairs": true,
"px-to-rem.px-per-rem": 37.5,
"window.zoomLevel": 2,
"workbench.iconTheme": "vscode-icons",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
//安装Eslint插件后,配置自动转换符合Eslint符合的代码
"eslint.run": "onType",
"eslint.options": {
"extensions": [
".js",
".vue",
".jsx",
".tsx"
]
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}