首页 > 技术文章 > vue关闭ESLint校验

xulinjun 2020-03-15 20:36 原文

在根目录下新建 .eslintrc.js 文件,内容如下:

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

再次启动项目。

推荐阅读