vue-cli3之后 取消关闭 eslint 校验代码

虽然说是 很多用 eslint 做代码规范。。不过我目前来说,上面没人做这个。。。所以很难统一。。先关为敬

在 .eslintrc.js 中修改 删除掉 @vue/prettier 或者只留第一个试试~- -=

module.exports = {
    root: true,
    env: {
        node: true
    },
    extends: ["plugin:vue/essential", "eslint:recommended"],// "@vue/prettier"
    parserOptions: {
        parser: "babel-eslint"
    },
    rules: {
        "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
        "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
    }
};

当然还是得抽时间掌握:

前端科普系列(5):ESLint - 守住优雅的护城河

深入理解 ESlint

 
原文地址:https://www.cnblogs.com/CZheng7/p/13917086.html