Closed
Description
This rule would check if there are no side effects inside computed properties.
So this example would throw an error:
export default {
computed: {
hello() {
this.lastName = 'Dolor' // <- error "Unexpected side effect in computed property 'hello'"
return `Hello ${this.firstName} ${this.lastName}`
}
},
data() {
return {
firstName: 'Lorem',
lastName: 'Ipsum'
}
}
}
What do you think @mysticatea @chrisvfritz ?