Mutating a prop
Part of Code Quality & Syntax, which counts for 20% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.
What it detects
A declared prop is assigned to directly (this.prop = ... or props.prop = ...). Props are owned by the parent, so the write is overwritten on the next parent render and breaks one-way data flow.
Why it matters
Props are owned by the parent component and flow one way. Assigning to a prop inside the child changes a value the parent controls, so the next time the parent re-renders it overwrites your change and the UI appears to revert on its own. In Vue 3 mutating a prop object also logs a warning and can desync parent and child state.
How to fix it
Do not write to props. If the child needs a local editable copy, initialize a data or ref value from the prop and edit that. If the parent should learn about the change, emit an event (this.$emit or defineEmits) and let the parent update the source, or use v-model with a computed get/set pair. Keep the prop read-only in the child.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo