# Enforces the canonical spelling of a classname, as resolved by the Tailwind CSS compiler
â ïļ This rule _warns_ in the â
`recommended` config.
ð§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
Tailwind CSS can express the very same utility in more than one way. An arbitrary variant often has a first-class equivalent, an arbitrary value may match something already declared in your theme, and a few `v3` spellings were renamed in `v4` while remaining supported.
Since `v4.3.0` the compiler can tell you the canonical form of any candidate, so this rule asks it rather than maintaining its own list of equivalences. It reports the classnames whose canonical spelling differs from the one you wrote, and autofixes them.
## Rule Details
Examples of **incorrect** code for this rule:
```html
Demo
Demo
Demo
```
Examples of **correct** code for this rule:
```html
Demo
Demo
Demo
```
Classnames which do not belong to Tailwind CSS are left untouched, they are the business of [`no-custom-classname`](./no-custom-classname.md).
### Why enforce the canonical classname?
- ð **Consistency**: the same utility is spelled the same way everywhere, so it is greppable
- ðĪ Move **away from deprecated** spellings before they are removed
- ðĻ **Reuse the theme** instead of hardcoding a value which already has a name
- ðŠķ Shorter, more **idiomatic** classnames
### Requirements
The canonicalization comes from the Tailwind CSS compiler and needs **Tailwind CSS `>=4.3.0`**. On older `v4` releases the rule stays silent instead of failing.
### Relation to the other rules
[`no-unnecessary-arbitrary-value`](./no-unnecessary-arbitrary-value.md) also reports arbitrary values which match a preset, and both rules make the same suggestion in that case. This rule covers a wider range, notably the arbitrary variants and the renamed `v4` spellings, which the compiler resolves on its own.
## Options
There are no specific options for this rule, yet it uses the general [settings](../../README.md#settings).