Skip to content
Menu

invalid-recipe-config

Reports an unknown or malformed field in a style.recipe() configuration.

On this page

This rule reports a style.recipe() 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.recipe("p-4", {
  variant: {
    size: {
      small: "p-2",
    },
  },invalid-recipe-config: invalid style.recipe() configuration: unknown configuration property
});

Fixed

style.recipe("p-4", {
  variants: {
    size: {
      small: "p-2",
    },
  },
});

How to fix

  • Use the fields variants, defaultVariants, and compoundVariants.
  • Write the configuration as an object literal in the call.
  • In defaultVariants and compoundVariants, use only options and values that variants declares.

See style.recipe().

Rule settings

PresetSeverity
recommendeddeny
strictdeny
stylisticoff

Configure lint to change the severity or options.

Type to search the documentation.