vscode 中配置eslint格式化代码


打开设置->设置 搜索 settings.json

 编辑配置

 

//autoFixedOnSave 设置已废弃,采用如下新的设置
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "eslint.format.enable": true,
    //autoFix默认开启,只需输入字符串数组即可
    "eslint.validate": [
        "javascript",
        "vue",
        "html"
    ],

  

 

posted @ 2021-08-19 18:25  玉文  阅读(88)  评论(0编辑  收藏  举报