code-baseline 1.6.0

Enforce architectural decisions AI coding tools keep ignoring
Documentation
# r/tailwindcss

**Title: Enforce dark: variants and semantic tokens across your whole Tailwind codebase**

if you use tailwind with shadcn you've seen this -- new code shows up with bg-white and text-gray-900, dark mode breaks, nobody notices until someone screenshots it.

built a linter that catches this in CI. here's what the output actually looks like:

```
src/components/Card.tsx
  7:21  error  Missing dark: variant for color class: 'bg-white'
    │ <div className="bg-white border border-gray-200 rounded-lg">
    → Use 'bg-background' instead — it adapts to light/dark automatically
```

it tells you what's wrong and what to replace it with.

the thing that makes it different from just grepping for bg-white: it's shadcn-aware. bg-background, text-foreground, bg-muted, border-border, all sidebar variants -- it knows those already handle both themes and leaves them alone. it also recognizes properly paired dark: variants so `bg-white dark:bg-slate-900` passes fine.

two modes:

1. **dark mode enforcement** -- flags color classes without a dark: counterpart
2. **semantic token enforcement** -- bans raw color classes entirely, maps them to your tokens. 130+ default mappings out of the box.

extend with your own:

```toml
token_map = ["bg-indigo-600=bg-brand", "text-indigo-50=text-brand-foreground"]
allowed_classes = ["bg-green-500"]  # exempt specific classes
```

understands className, class, cn(), clsx(), cva(), twMerge() -- basically all the ways people write tailwind classes in JSX.

```
npx code-baseline scan
```

one preset to start: `extends = ["shadcn-strict"]`

rust, open source: https://github.com/stewartjarod/baseline