Appearance
vue/no-deprecated-router-link-tag-prop
禁止在
RouterLink上使用已弃用的tag属性(在 Vue.js 3.0.0+ 中)
- ⚙️ 此规则包含在
"plugin:vue/essential"、*.configs["flat/essential"]、"plugin:vue/strongly-recommended"、*.configs["flat/strongly-recommended"]、"plugin:vue/recommended"和*.configs["flat/recommended"]中。
📖 规则详情
此规则报告已弃用的 RouterLink 元素上的 tag 属性(在 Vue.js v3.0.0+ 中已删除)。
¥This rule reports deprecated the tag attribute on RouterLink elements (removed in Vue.js v3.0.0+).
🔧选项
¥🔧 Options
json
{
"vue/no-deprecated-router-link-tag-prop": ["error", {
"components": ['RouterLink']
}]
}components(string[]) ...将使用tag属性检查的组件名称。默认['RouterLink']。¥
components(string[]) ... Component names which will be checked with thetagattribute. default['RouterLink'].
注意:此规则将检查给定组件名称的 kebab-case 和 PascalCase 版本。
¥Note: this rule will check both kebab-case and PascalCase versions of the given component names.
{ "components": ['RouterLink', 'NuxtLink'] }
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.20.0
¥This rule was introduced in eslint-plugin-vue v7.20.0
🔍代码实现
¥🔍 Implementation