Skip to content

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.

Now loading...

🔧选项

¥🔧 Options

js
{
  "vue/no-useless-mustaches": ["error", {
    "ignoreIncludesComment": false,
    "ignoreStringEscape": false
  }]
}
  • ignoreIncludesComment ...如果是 true,则不要报告包含注释的表达式。默认 false

    ¥ignoreIncludesComment ... If true, do not report expressions containing comments. default false.

  • ignoreStringEscape ...如果是 true,则不要报告带有有用转义的字符串字面量。默认 false

    ¥ignoreStringEscape ... If true, do not report string literals with useful escapes. default false.

"ignoreIncludesComment": true

Now loading...

"ignoreStringEscape": true

Now loading...

👫相关规则

¥👫 Related Rules

🚀版本

¥🚀 Version

此规则在 eslint-plugin-vue v7.0.0 中引入

¥This rule was introduced in eslint-plugin-vue v7.0.0

🔍代码实现

¥🔍 Implementation

eslint-plugin-vue v10.0 中文网 - 粤ICP备13048890号