vue-cli 3.0搭建的项目如何去掉eslint规范

首先我们在搭建vue脚手架的时候会有提示问我们是否启用eslint检测的。 Use ESLint to lint your code? no

如果项目已经生成了,我们找到eslintrc.js
vue-cli 3.0搭建的项目如何去掉eslint规范_第1张图片

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" ? "error" : "off",
    "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
  }
};

注销掉 "@vue/prettier"就可以了。

你可能感兴趣的:(vue-cli 3.0搭建的项目如何去掉eslint规范)