---
title: "duplicate-utility"
description: "Reports the same utility written twice under the same conditions."
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.

# duplicate-utility

This rule reports a utility that appears twice under the same conditions, such as
`p-4 p-4`. The second one adds nothing.

## Reported

```tsx
style("p-4 p-4");
```

> duplicate-utility: utility `p-4` is repeated under the same conditions
> 
> Example:1:12
> 
> Example:1:8: previous utility

## Fixed

```tsx
style("p-4");
```

## How to fix

Remove one of them. The automatic fix removes the repeated utility.

Two different utilities that set the same property are reported by
[conflicting-utilities](/docs/lints/conflicting-utilities) instead.

## Rule settings

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

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

Source: https://stillwind.dev/docs/lints/duplicate-utility/index.mdx
