prefer-multi-value-zod-literal
Use the Zod 4 multi-value literal API instead of a union of literal schemas.
Why
One multi-value literal expresses the same closed value domain without repeated schema wrappers.
Fix
Replace the union with z.literal([value1, value2, ...]).
Examples
import { z } from "zod/v4";export const Version = z.union([z.literal(1), z.literal(2), z.literal(3)]);import { z } from "zod/v4";export const Version = z.literal([1, 2, 3]);