Appearance
vue/no-useless-v-bind
禁止不必要的
v-bind
指令
- 🔧 command line 上的
--fix
选项可以自动修复此规则报告的一些问题。
📖 规则详情
此规则报告具有字符串字面量值的 v-bind
。具有字符串字面量值的 v-bind
可以更改为静态属性定义。
¥This rule reports v-bind
with a string literal value.\ The v-bind
with a string literal value can be changed to a static attribute definition.
🔧选项
¥🔧 Options
js
{
"vue/no-useless-v-bind": ["error", {
"ignoreIncludesComment": false,
"ignoreStringEscape": false
}]
}
ignoreIncludesComment
...如果是true
,则不要报告包含注释的表达式。默认false
。¥
ignoreIncludesComment
... Iftrue
, do not report expressions containing comments. defaultfalse
.ignoreStringEscape
...如果是true
,则不要报告带有有用转义的字符串字面量。默认false
。¥
ignoreStringEscape
... Iftrue
, do not report string literals with useful escapes. defaultfalse
.
"ignoreIncludesComment": true
"ignoreStringEscape": true
👫相关规则
¥👫 Related Rules
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.0.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.0.0
🔍代码实现
¥🔍 Implementation