Skip to content

Configuration

Create tailwind-architect.config.json at your project root.

Options

OptionTypeDefaultDescription
sortClassesbooleantrueApply semantic sort order.
removeRedundantbooleantrueRemove overridden/redundant utilities.
detectConflictsbooleantrueDetect conflicting utilities.
readabilityModebooleanfalseFormat long class lists with line breaks.
autoFixbooleantrueAllow the fix command to write files.
classFunctionsstring[]see belowFunction names whose arguments are class strings (e.g. clsx, cn).
pluginsstring[][]Plugin package names (e.g. tailwind-architect-plugin-my-rules).

Default classFunctions: ["clsx", "cn", "cva", "tw"].

Example

json
{
  "sortClasses": true,
  "removeRedundant": true,
  "detectConflicts": true,
  "readabilityMode": false,
  "autoFix": true,
  "classFunctions": ["clsx", "cn", "cva", "tw"],
  "plugins": []
}

Plugins

Plugins add custom lint rules, sort groups, and suggestions. See Extensibility and examples/example-plugin in the repo.