---
title: "invalid-recipe-config"
description: "Reports an unknown or malformed field in a style.recipe() configuration."
image: "https://stillwind.dev/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://stillwind.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# invalid-recipe-config

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

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

> invalid-recipe-config: invalid style.recipe() configuration: unknown configuration property
> 
> Example:2:12

## Fixed

```tsx
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()`](https://stillwind.dev/docs/macros/recipe#configuration).

## Rule settings

| Preset | Severity |
| --- | --- |
| `recommended` | deny |
| `strict` | deny |
| `stylistic` | off |

[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.

Source: https://stillwind.dev/docs/lints/invalid-recipe-config/index.mdx
