vscode安装ESlint配置

先安装插件ESLint,后面在设置setting.json中配置加入代码:

{
"files.autoSave": "afterDelay",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"git.path": "E:/git/Git/bin/git.exe",
"window.zoomLevel": 0,
"editor.formatOnSave": false,
"eslint.options":{
"extensins":[
".js",
".vue"
]
},
"eslint.validate": [
"javascript",
{
"language": "html",
"autoFix": true
},
{
"language": "vue",
"autoFix": true
},
],
"eslint.autoFixOnSave": true,
}
项目中安装eslint校验后软件配置好后保存时会自动格式化代码,多按保存,每次会处理一部分校验代码,最后有报红的单独处理即可
posted @ 2019-12-18 09:29  清风引佩下瑶台  阅读(644)  评论(0编辑  收藏  举报