This rule reports a style.cva() configuration that the compiler cannot read,
such as an unknown field, a default for an option that does not exist, or a
configuration that is not written in the call. The factory ignores the invalid
part.
Reported
style.cva("p-4", { variant: { size: { small: "p-2" } } });invalid-cva-config: invalid style.cva() configuration: unknown configuration propertyFixed
style.cva("p-4", { variants: { size: { small: "p-2" } } });How to fix
- Use the fields
variants,defaultVariants, andcompoundVariants. - Write the configuration as an object literal in the call.
- In
defaultVariantsandcompoundVariants, use only options and values thatvariantsdeclares.
See style.cva().
Rule settings
| Preset | Severity |
|---|---|
recommended | deny |
strict | deny |
stylistic | off |
Configure lint to change the severity or options.