v-for without a :key
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 v-for on an element with no :key binding forces Vue into in-place patching, which can carry over stale DOM or component state (wrong inputs, checkboxes, animations) when the list changes.
Why it matters
Without a :key, Vue patches list DOM in place by position instead of by identity. When the list reorders, filters, or has an item removed, state that lives in the DOM (focused input, typed text, checkbox, a running transition) can attach to the wrong row. These bugs are intermittent and hard to reproduce, which is why the key is required rather than optional.
How to fix it
Add a :key bound to a stable unique id for each item, such as item.id, on the same element that carries v-for. Do not use the array index. If items have no natural id, generate a stable one when the data is created rather than at render time. This detection reads the v-for element's own tag, so putting :key there clears it.
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