# tailwindBlock

`function` in `eslint-config` · v1.4.3-next.0

<https://docs.seedcord.org/packages/eslint-config/1.4.3-next.0/functions/tailwind-block>

Builds the flat-config block that registers the canonical-class lint plugins.

Registers: - `better-tailwindcss/enforce-canonical-classes`: shorthand combining, logical/physical pairs (e.g. `h-N w-N` → `size-N`). Supports tagged template literals via `tags`. - `tailwind-canonical-classes/tailwind-canonical-classes`: arbitrary-value scale normalization (e.g. `max-w-[180px]` → `max-w-45` when a scale match exists) + Tailwind v4 modifier position rewrites (`hover:!bg-x` → `hover:bg-x!`).

Both rules are registered at `'warn'` so they autofix on save / via `lint:fix` without blocking CI. A doubled-space artifact can appear when shorthand collapses; `prettier --write` cleans it on the next format pass.

```ts
tailwindBlock(params: TailwindBlockParams): Linter.Config
```

Builds the flat-config block that registers the canonical-class lint plugins.

Registers: - `better-tailwindcss/enforce-canonical-classes`: shorthand combining, logical/physical pairs (e.g. `h-N w-N` → `size-N`). Supports tagged template literals via `tags`. - `tailwind-canonical-classes/tailwind-canonical-classes`: arbitrary-value scale normalization (e.g. `max-w-[180px]` → `max-w-45` when a scale match exists) + Tailwind v4 modifier position rewrites (`hover:!bg-x` → `hover:bg-x!`).

Both rules are registered at `'warn'` so they autofix on save / via `lint:fix` without blocking CI. A doubled-space artifact can appear when shorthand collapses; `prettier --write` cleans it on the next format pass.

Parameters.

- `params` `TailwindBlockParams`

Returns `Linter.Config`.
