阅读 105

Springboot Vue取消eslint语法限制

** 启动vue项目的时候经常报一大堆错误、但是不影响项目运行、**

这是因为vue对语法的限制过于严格造成的

 > bblee-app@1.0.0 dev /Users/bianlifeng/my-project > webpack-dev-server --inline --progress --config build/webpack.dev.conf.js    95% emitting                                                                               WARNING  Compiled with 1 warnings                                                                                                                             5:00:12 PM       ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 0 spaces but found 2      src/components/Message.vue:46:1     export default {    ^     ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4      src/components/Message.vue:47:1       data() {    ^     ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 2 spaces but found 4      src/components/Message.vue:65:1       }    ^     ✘  http://eslint.org/docs/rules/indent                       Expected indentation of 0 spaces but found 2      src/components/Message.vue:66:1     }    ^     ✘ 23 problems (23 errors, 0 warnings)     复制代码

解决方法:

在build/webpack.base.conf.js文件中,删除注释掉 ...(config.dev.useEslint ? [createLintingRule()] : []), 这一行数据。



作者:java李杨勇
链接:https://juejin.cn/post/7068301906275205150


文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐