Closed
Description
What rule do you want to change?
vue/no-mutating-props
Does this change cause the rule to produce more or fewer warnings?
Fewer warnings
How will the change be implemented? (New option, new default behavior, etc.)?
New default behaviour should be fine I suppose
Please provide some example code that this change will affect:
props: {
myObjectProp: {
type: Object,
required: true,
}
},
methods: {
doSomething() {
this.myObjectProp.someKey = 'change' // <- should not trigger an error
this.myObjectProp = { // <- should trigger an error
someKey: 'new'
}
}
}
What does the rule currently do for this code?
Trigger an error
What will the rule do after it's changed?
Nothing
Additional context
See the example, if you pass an object as property it should be fine to mutate its properties.
Metadata
Metadata
Assignees
Labels
No labels