Appearance
vue/no-useless-mustaches
禁止不必要的胡须插值
- 🔧 command line 上的
--fix
选项可以自动修复此规则报告的一些问题。
📖 规则详情
此规则报告具有字符串字面量值的胡须插值。带有字符串字面量值的胡子插值可以更改为静态内容。
¥This rule reports mustache interpolation with a string literal value.\ The mustache interpolation with a string literal value can be changed to a static contents.
🔧选项
¥🔧 Options
js
{
"vue/no-useless-mustaches": ["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