Also define the standard property ‘background-clip’ for compatibility

还要定义标准属性“background-clip”以实现兼容性
在这里插入图片描述
解决方法:
在写兼容方法之前先写上标准属性。
在这里插入图片描述

Unexpected lexical declaration in case block (no-case-declarations)

case块中意外的词法声明(无大小写声明),eslint禁止词法声明 (let、const、function 和 class) 出现在 case或default 子句中。
在这里插入图片描述
在这里插入图片描述
解决方法:

在这里插入图片描述

Expected to return a value in “mediaTitle” computed property (vue/return-in-computed-property)

预计在“mediaTitle”计算属性(vue/return-in- computing -property)中返回一个值
在这里插入图片描述
没处理之前:
在这里插入图片描述
处理后:
保证使用computed中的数据都有一个确定的返回值。
在这里插入图片描述

component has been registered but not used (vue/no-unused-components)

组件引用了没有使用
在这里插入图片描述

Unnecessary escape character: / (no-useless-escape)

多余转义字符:\/ (no-useless-escape),常出现在使用正则的时候。
在这里插入图片描述
no-useless-escape

Custom elements in iteration require ‘v-bind:key’ directives (vue/valid-v-for)

使用v-for的时候没有写:key
在这里插入图片描述

‘’ is defined but never used (no-unused-vars)

定义了从未使用,常出现在 import 文件的引用 和 变量的声明。

Unnecessary semicolon (no-extra-semi)

强制使代码必须使用分号( ; ),或者必须不能加( ; )
解决方法:删除报错位置的分号。

Property is ignored due to the display. With ‘display: block’, vertical-align should not be used.

属性被忽略,行级元素转换为块级元素后,使用 vertical-align 属性不生效。

eslint 关闭校验

在这里插入图片描述

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐