Skip to content

vue/no-reserved-props

禁止在 props 中保留名称

  • ⚙️ 此规则包含在 "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"] 中。

📖 规则详情

此规则禁止在 props 中使用保留名称。

¥This rule disallow reserved names to be used in props.

Now loading...

🔧选项

¥🔧 Options

json
{
  "vue/no-reserved-props": ["error", {
    "vueVersion": 3, // or 2
  }]
}
  • vueVersion (2 | 3) ...指定你正在使用的 Vue 版本。默认值为 3

    ¥vueVersion (2 | 3) ... Specify the version of Vue you are using. Default is 3.

🚀版本

¥🚀 Version

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

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

🔍代码实现

¥🔍 Implementation

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