# noUndeclaredCustomProperties

Rule `biome/noUndeclaredCustomProperties`. Reports custom properties used with `var()` that have no visible declaration.

- Source: biome
- Technologies: CSS
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1947 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noUndeclaredCustomProperties` | no | no | group nursery, since 2.5.11 | [docs](https://biomejs.dev/linter/rules/no-undeclared-custom-properties/) |

## Code examples

### Incorrect: the rule reports this

```jsx
<div style="color: var(--text-color)" />
```

### Correct: the rule accepts this

```jsx
<div style="--text-color: blue; color: var(--text-color)" />
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noUndeclaredCustomProperties": "error"
      }
    }
  }
}
```

## Related rules

- [biome/noUndeclaredClasses](https://lintradar.dev/rules/biome/noUndeclaredClasses.md): Reports CSS class names in JSX `className` or `class` attributes that are not defined in any imported CSS file.
- [biome/noUnsafeTypeAssertion](https://lintradar.dev/rules/biome/noUnsafeTypeAssertion.md): Disallow TypeScript type assertions other than const assertions.
- [biome/noTailwindRestyledComponents](https://lintradar.dev/rules/biome/noTailwindRestyledComponents.md): Disallow Tailwind utilities that override the appearance of components.
- [biome/noUntrustedLicenses](https://lintradar.dev/rules/biome/noUntrustedLicenses.md): Disallow dependencies with untrusted licenses.
- [biome/noTailwindRestrictedClasses](https://lintradar.dev/rules/biome/noTailwindRestrictedClasses.md): Disallow Tailwind CSS classes and variants that your project doesn't allow.
- [biome/noUnusedClasses](https://lintradar.dev/rules/biome/noUnusedClasses.md): Reports CSS class selectors that are never referenced in any JSX or HTML file.

---

Web page: https://lintradar.dev/rules/biome/noUndeclaredCustomProperties. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
