vue vscode 保存时自动验证eslint规则格式化代码

在vscode setting.json中添加如下配置

希望大家快乐开发,另外vscode的git扩展功能也是不错的哦,改天再给大家分享

"eslint.validate": [
        "javascript",
        "javascriptreact",
        {
        "language": "html",
        "autoFix": true
        },
        {
        "language": "vue",
        "autoFix": true
        }
    ],
    "eslint.options": {
    //这里为你项目中配置的.eslintrc.js文件,这样保存时效验的规则就和项目一致了,只需轻轻一按  ctrl+s  完美格式化,麻麻再也不用担心我的格式了
        "configFile": "E:/sixi-pro/DJL/OA/OAUI3/.eslintrc.js"
    }

猜你喜欢

转载自blog.csdn.net/qq_39517820/article/details/80515066
今日推荐