vscode 中配置eslint格式化代码
打开设置->设置 搜索 settings.json
编辑配置
//autoFixedOnSave 设置已废弃,采用如下新的设置
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.format.enable": true,
//autoFix默认开启,只需输入字符串数组即可
"eslint.validate": [
"javascript",
"vue",
"html"
],

浙公网安备 33010602011771号