Appearance
vue/no-deprecated-data-object-declaration
禁止在数据上使用已弃用的对象声明(在 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"]
中。
🔧命令行 上的
--fix
选项可以自动修复此规则报告的一些问题。¥🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
📖 规则详情
此规则报告 data
属性上已弃用的对象声明的使用情况(在 Vue.js 3.0.0+ 中)。与 vue/no-shared-component-data
不同的是根实例也被禁止。
¥This rule reports use of deprecated object declaration on data
property (in Vue.js 3.0.0+). The different from vue/no-shared-component-data
is the root instance being also disallowed.
有关更多详细信息,请参阅 迁移指南 - 数据选项。
¥See Migration Guide - Data Option for more details.
🔧选项
¥🔧 Options
无。
¥Nothing.
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.0.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.0.0
🔍代码实现
¥🔍 Implementation