这是什么原因
来源:1-9 Vue项目预热 - 项目代码初始化
冲哥_
2021-05-21 11:12:35
webpack如图,fastclick也已经安装
相关代码:
E:\tools\Travel>npm run start
> travel@1.0.0 start E:\tools\Travel
> npm run dev
> travel@1.0.0 dev E:\tools\Travel
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js
13% building modules 32/38 modules 6 active ...e&index=0!E:\tools\Travel\src\App.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
95% emitting
WARNING Compiled with 2 warnings 上午11:09:32
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\Home.vue:2:2
<div>
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\Home.vue:3:2
<div class="home">home</div>
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\Home.vue:5:2
<router-link class="home" to="/list">列表页</router-link>
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\Home.vue:6:2
</div>
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 1 tab
src\pages\home\Home.vue:11:1
name:'Home'
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\Home.vue:11:2
name:'Home'
^
✘ http://eslint.org/docs/rules/key-spacing Missing space before value for key 'name'
src\pages\home\Home.vue:11:7
name:'Home'
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\Home.vue:16:2
.home{
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\Home.vue:17:2
font-size:50px;
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\home\Home.vue:18:2
}
^
✘ http://eslint.org/docs/rules/eol-last Newline required at end of file but not found
src\pages\home\Home.vue:19:9
</style>
^
✘ 11 problems (11 errors, 0 warnings)
Errors:
8 http://eslint.org/docs/rules/no-tabs
1 http://eslint.org/docs/rules/indent
1 http://eslint.org/docs/rules/key-spacing
1 http://eslint.org/docs/rules/eol-last
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\list\List.vue:2:2
<div>list</div>
^
✘ http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 1 tab
src\pages\list\List.vue:7:1
name:'List'
^
✘ http://eslint.org/docs/rules/no-tabs Unexpected tab character
src\pages\list\List.vue:7:2
name:'List'
^
✘ http://eslint.org/docs/rules/key-spacing Missing space before value for key 'name'
src\pages\list\List.vue:7:7
name:'List'
^
✘ http://eslint.org/docs/rules/eol-last Newline required at end of file but not found
src\pages\list\List.vue:13:9
</style>
^
✘ 5 problems (5 errors, 0 warnings)
Errors:
2 http://eslint.org/docs/rules/no-tabs
1 http://eslint.org/docs/rules/indent
1 http://eslint.org/docs/rules/key-spacing
1 http://eslint.org/docs/rules/eol-last
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.
1回答
好帮手慕久久
2021-05-21
同学你好,报错的是eslint语法检测插件,比如下图中的报错,含义就是Home.vue中,div标签前面存在多余的tab缩进:
当代码中空格、缩进的个数与eslint要求不一样时,eslint就会报错。这些格式上的问题,会影响我们开发,所以建议把它禁掉,禁掉方式如下:
祝学习愉快!
相似问题