no-literal-collection-key
map.get([x, y]), set.has({ id }): a lookup with an object created right there.
Why: Map and Set compare object keys by identity, not by contents (v8.dev). A new array or object is never the same object as the stored key, so the lookup always misses.
✕ Rejectedno-literal-collection-key
ts
const visited = new Set<number[]>();
export function seen(x: number, y: number): boolean {
return visited.has([x, y]);
}✅ Accepted: a primitive key
✓ Accepted0 diagnostics
ts
const visited = new Set<string>();
export function seen(x: number, y: number): boolean {
return visited.has(`${x},${y}`);
}For structured keys, KeyedMap from @evobug_com/safe-ts-std/dict maps them through a key function.