按照课程所说一步步更改配置项,可是最后一直报错,好像是eslint的问题
95% emitting WARNING Compiled with 3 warnings18:47:09 ✘ http://eslint.org/docs/rules/semi Missing semicolon src\main.js:3:22 import Vue from 'vue' ^ ✘ http://eslint.org/docs/rules/semi Missing semicolon src\main.js:4:24 import App from './App' ^ ✘ http://eslint.org/docs/rules/semi Missing semicolon src\main.js:5:30 import router from './router' ^ ✘ http://eslint.org/docs/rules/semi Missing semicolon src\main.js:7:33 Vue.config.productionTip = false ^ ✘ http://eslint.org/docs/rules/semi Missing semicolon src\main.js:14:3 }) ^ ✘ 5 problems (5 errors, 0 warnings) Errors: 5 http://eslint.org/docs/rules/semi ✘ http://eslint.org/docs/rules/semi Missing semicolon src\router\index.js:1:22 import Vue from 'vue' ^ ✘ http://eslint.org/docs/rules/semi Missing semicolon src\router\index.js:2:32 import Router from 'vue-router' ^ ✘ http://eslint.org/docs/rules/semi Missing semicolon src\router\index.js:4:16 Vue.use(Router) ^ ✘ http://eslint.org/docs/rules/semi Missing semicolon src\router\index.js:8:3 }) ^ ✘ 4 problems (4 errors, 0 warnings) Errors: 4 http://eslint.org/docs/rules/semi ✘ https://google.com/#q=vue%2Fscript-indent Expected indentation of 2 spaces but found 0 spaces src\App.vue:8:1 export default { ^ ✘ https://google.com/#q=vue%2Fscript-indent Expected indentation of 4 spaces but found 2 spaces src\App.vue:9:1 name: 'App' ^ ✘ https://google.com/#q=vue%2Fscript-indent Expected indentation of 2 spaces but found 0 spaces src\App.vue:10:1 } ^ ✘ http://eslint.org/docs/rules/semi Missing semicolon src\App.vue:10:2 } ^ ✘ 4 problems (4 errors, 0 warnings) Errors: 3 https://google.com/#q=vue%2Fscript-indent 1 http://eslint.org/docs/rules/semi You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file.
这种要怎么解决呢
正在回答
同学你好,这些不是报错信息,是由于ESlint检测语法不规范导致的警告信息,不影响程序的运行。
同学如果想要去除这些警告信息,可以找到build下的webpack.base.conf.js文件,将如下代码注释即可
注释上图的代码保存文件之后, 需要重启项目才会生效, 同学可以清除浏览器缓存,然后,使用npm run dev 命令重启项目
如果帮助到了你, 欢迎采纳,祝学习愉快~~~
- 参与学习 人
- 提交作业 209 份
- 解答问题 3299 个
本路径是通过ES6基础知识、运用Zepto、Swiper、fullPag等移动端常用工具包、以及当下流行框架Vue,结合多个实战案例,还原真实开发场景,最终实现手机端购物商城网页开发。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星