Open
Description
Please describe what the rule should do:
The rule would disallow the use of fat arrow functions data: () => {}
inside components. Any component's options that are functions (e.g. data
, methods
, computed
, head
and other internal options) would have to use either data() {}
or data: function() {}
.
What category should the rule belong to?
- Warns about a potential error
Code examples that this rule should warn about:
BAD
data: () => {
return {
value: this.getValue() // 'this' is not accessible
};
},
GOOD
data() {
return {
value: this.getValue() // Now 'this' is accessible
};
},
Metadata
Metadata
Assignees
Labels
No labels