报错信息
5 errors and 0 warnings potentially fixable with the `--fix` option.
// 使用“——fix”选项可以修复5个错误和0个警告。
解决步骤
package.json文件:
"scripts": {
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"lint": "eslint --fix --ext .js,.vue src" // 重点是修改这一句
},
下次启动项目之前就先来修复一下代码不规范的地方:
npm run lint
npm run dev