-
-
Notifications
You must be signed in to change notification settings - Fork 700
Closed
Labels
Description
Please describe what the rule should do:
Ensure computed properties are not used in the data() function because data() runs before computed properties are calculated. So computed properties are undefined when used in data().
What category should the rule belong to?
- Enforces code style
- Warns about a potential error
- Suggests an alternate way of doing something
- Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
<script>
export default {
data(){
return {
value: 'hello ' + this.world
}
},
computed: {
world() {
return 'world'
}
}
}
</script>
Reactions are currently unavailable