【Trailing spaces not allowed no-trailing-spaces】报错
当我们用 Eslint 插件检测我们代码的规范的时候,有时候会遇到 “Trailing spaces not allowed no-trailing-spaces”报错,意思是空格不允许,多了空格,错误如下:
D:\MyCodes\simulation-project\src\views\Register.vue61:6 error Trailing spaces not allowed no-trailing-spaces✖ 1 problem (1 error, 0 warnings)1 error and 0 warnings potentially fixable with the `--fix` option.
这不是你的代码逻辑有错,而是你的代码不符合这个 Eslint 的规范
在这里我不想通过配置,屏蔽 Eslint 的检测,因为在公司中我们还是要符合规范的,这样与我们的初衷相违背。
解决:
- 哪个组件?Register.vue组件,去这里改错
- 第几行?error前面的61:6代表错误位置是61行第6个位置
- 找到这个位置把鼠标放在这一行的末尾,删除多余空格
- 重新保存代码即可。
总结:
- 解决这类问题主要还是找到第几行出了错,一般都是多或者少空格(space)。
【Trailing spaces not allowed no-trailing-spaces】报错相关推荐
- composer PHP Fatal error: Allowed memory size of 报错解决
执行以下命令(安装多线程) php composer.phar require hirak/prestissimo 出现以下提示 PHP Fatal error: Allowed memory siz ...
- 【GitLab】gitlab上配置webhook后,点击测试报错:Requests to the local network are not allowed...
gitlab上配置webhook后,点击测试报错: Requests to the local network are not allowed 操作如下: 报错: 错误原因: gitlab 10.6 ...
- 关于vue使用eslint规范报Trailing Spaces not Allowed错误解决办法!
Always Getting an Error of "Trailing Spaces not Allowed" in VueJS(在Vue中总会出现"不允许尾随空格&q ...
- Error:Trailing spaces not allowed no-trailing-spaces
Error:Trailing spaces not allowed no-trailing-spaces 报错如下 解决办法 这是空格多了,删除多余的空格就可以了 或者直接格式化文档 即可解决
- vue项目中eslint检查警告——“Trailing spaces not allowed”
在VSCode中开发Vue项目,eslint检查警告:"Trailing spaces not allowed",这是在警告代码后面有多余的空格导致的,删除空格即可. 转载于:ht ...
- vue语法检查工具eslint报错小记(error Unexpected trailing comma、Extra semicolon、error ‘loadingInstance‘ is nev)
vue语法检查工具eslint报错小记 vue项目开发中开启语法检查工具eslint,尤其是接手别人的代码继续开发时,如果不注意语法习惯,项目运行时会出现一堆warning.error,乍一看就头大, ...
- org.xml.sax.SAXParseException: Content is not allowed in trailing section
2019独角兽企业重金招聘Python工程师标准>>> org.xml.sax.SAXParseException: Content is not allowed in traili ...
- 解决Vue项目报错:Expected indentation of 2 spaces but found 4. eslint(indent) [8, 1]的方法
解决Vue项目报错:Expected indentation of 2 spaces but found 4. eslint(indent) [8, 1]的方法 报错如下 问题分析 明显从图中可以以看 ...
- SAP WM 采购订单收货后LT06报错-Allowed storage unit types not defined for storage type Z03-
SAP WM 采购订单收货后LT06报错-Allowed storage unit types not defined for storage type Z03- 1,如下的storage type ...
最新文章
- MySQL数据库中的索引
- php中in array循环,在php中in_array的使用方法
- 写代码抽取代码的技巧
- crossorigin注解添加了解决不了跨域问题_springboot 处理跨域的2种方式
- openstack版本历史
- 《深入理解Java虚拟机》第5章 调优案例分析与实战
- android低版本so加载失败,Android 4.X 系统加载 so 失败的原因分析
- 自定义形状的ImageView制作
- 哗啦啦收银系统故障收集
- FireFox火狐浏览器配置页面about:config参数说明
- Apple 等六大生态系统的崛起
- flink 1.14编译:flink-fs-hadoop-shaded找不到
- 小米10pro第二个摄像头下面_小米10 Pro拍照翻车?暂不支持超广角超级夜景,官方回应...
- 北邮计算机学院视频,傅慧源(博导)
- vue 组件内引入外部在线js、css
- VS2017+MFC+sqlite数据库操作
- 华为网络----OSPF路由协议理论+实验(一)
- 闪光css,CSS3 闪光的红宝石
- python爬房源信息_Python爬链家网租房信息
- jsp+struct标签实现分页(只有jsp代码),内用到迭代标签、if标签、bean