When using the provide
option on a Vue component, the same object will be shared by reference across all instances created. By declaring it as a function, the instances can be kept independent of each other.
This rule is fixable.
export default {
provide: {
foo: 'bar',
},
}
export default {
provide() {
return {
foo: 'bar',
}
},
}
export default {
provide: () => ({
foo: 'bar',
}),
}
export default {
provide: foo,
}