Skip to content

vue/no-reserved-keys

禁止覆盖保留键

  • ⚙️ 此规则包含在 "plugin:vue/essential"*.configs["flat/essential"]"plugin:vue/vue2-essential"*.configs["flat/vue2-essential"]"plugin:vue/strongly-recommended"*.configs["flat/strongly-recommended"]"plugin:vue/vue2-strongly-recommended"*.configs["flat/vue2-strongly-recommended"]"plugin:vue/recommended"*.configs["flat/recommended"]"plugin:vue/vue2-recommended"*.configs["flat/vue2-recommended"] 中。

📖 规则详情

此规则可防止使用 保留名称 以避免冲突和意外行为。

¥This rule prevents to use reserved names to avoid conflicts and unexpected behavior.

Now loading...

🔧选项

¥🔧 Options

json
{
  "vue/no-reserved-keys": ["error", {
    "reserved": [],
    "groups": []
  }]
}
  • reserved (string[]) ...groups 内的其他受限属性数组。默认值为空。

    ¥reserved (string[]) ... Array of additional restricted attributes inside groups. Default is empty.

  • groups (string[]) ...用于在其中搜索重复项的其他组名称数组。默认值为空。

    ¥groups (string[]) ... Array of additional group names to search for duplicates in. Default is empty.

"reserved": ["foo", "foo2"], "groups": ["firebase"]

Now loading...

📚扩展阅读

¥📚 Further Reading

🚀版本

¥🚀 Version

此规则在 eslint-plugin-vue v3.9.0 中引入

¥This rule was introduced in eslint-plugin-vue v3.9.0

🔍代码实现

¥🔍 Implementation

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