- 安装 eslint 插件
- 打开用户配置
文件 -> 首选项 -> 设置
搜索setting.json填写如下配置
{
"workbench.colorTheme": "Atom Material Theme",
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true,
"build/": true,
"temp/": true,
"library/": true,
"**/*.anim": true,
},
"files.associations": {
"*.vue": "html"
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.meta": true,
"**/.history": true,
"**/.idea": true,
"**/idea": true,
"**/logs": true,
"**/target": true,
"**/pid": true,
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true,
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnPaste": false,
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"beautify.config": {
"brace_style": "collapse,preserve-inline"
},
"eslint.codeAction.showDocumentation": {
"enable": true
},
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue"
],
"window.zoomLevel": 0,
"explorer.confirmDelete": false,
"[vue]": {},
"workbench.activityBar.visible": true,
"[json]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace"
},
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)