ant-desing-vuex系列2--使用问题汇总
1、 error 'text'/'XXX' is defined but never used 错误
解决方法:
vue cli4去掉eslint 检查器的报错
eslint在编写过程中及其严格,甚至单引号和双引号或者空格注释都会引起报错,导致项目无法正常运行
eslintrc.js
module.exports = {
root: true,
env: {
node: true
},
extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"],//去掉@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"
}
};
或者在安装项目的时候不安装ESLint:
Use ESLint to lint your code? NO