enforce component's data property to be a function
- ⚙️ This rule is included in all of
- 🔧 The
--fixoption on the command line can automatically fix some of the problems reported by this rule.
When using the data property on a component (i.e. anywhere except on
new Vue), the value must be a function that returns an object.
📖 Rule Details
When the value of
data is an object, it’s shared across all instances of a component.
📚 Further Reading
This rule was introduced in eslint-plugin-vue v3.8.0