pageClass | sidebarDepth | title | description |
---|---|---|---|
rule-details |
0 |
vue/no-computed-properties-in-data |
disallow accessing computed properties in `data`. |
disallow accessing computed properties in
data
.
- ❗ This rule has not been released yet.
This rule disallow accessing computed properties in data()
.
The computed property cannot be accessed in data()
because is before initialization.
<script>
export default {
data() {
return {
/* ✗ BAD */
bar: this.foo
}
},
computed: {
foo () {}
}
}
</script>
Nothing.