美文网首页
vscode修复eslint的报错

vscode修复eslint的报错

作者: utf8253 | 来源:发表于2019-04-09 20:19 被阅读0次

具体操作如下:
1、安装添加eslint 和 vetur 插件
2、首选项设置搜索eslint 勾选Auto Fix On Save 并点击edit in setting.json进行设置

{
    "eslint.autoFixOnSave": true,
    "eslint.validate": [
        "javascript",{
            "language": "vue",
            "autoFix": true
        },"html",
        "vue"
    ]
}

3、重启vscode 打开文件 保存时就会自动修复eslint的报错 (大概会修复百分之九十五以上的错误 少有错误需要手动调整 )

相关文章

网友评论

      本文标题:vscode修复eslint的报错

      本文链接:https://www.haomeiwen.com/subject/ftfwiqtx.html