litellm/ui/litellm-dashboard/tests/eslint-rules
yuneng-jiang 93c1461074
fix(ui): restore hover feedback and dark-mode variants lost in the token migration (#37579)
* fix(ui): restore hover feedback and dark-mode variants lost in the token migration

PR #37576 mapped hardcoded Tailwind palette classes onto semantic tokens. Two-tone
hover pairs collapsed onto a single token, so 116 hover utilities across 49 files
became identical to their base class and produced no visible feedback, and in seven
files a dark: variant was dropped while its hardcoded light partner survived, leaving
those elements stuck light in dark mode.

Hover states now follow the alpha-step idiom the shadcn primitives already use
(hover:bg-primary/80, hover:bg-success/20): a duplicated hover:text-X or hover:bg-X
becomes /80, hover:border-border becomes hover:border-ring, and a duplicate is
dropped where another hover utility on the element already carries the change. One
transition-colors that no longer animated anything is removed.

For the dark-mode gaps, indigo maps onto info and amber onto warning. There is no
purple token in globals.css, so the purple sites keep their palette classes and get
their dark: partner back.

* fix(ui): add an eslint rule that fails a hover: utility identical to its base

The token migration collapsed two-tone hover pairs by hand, so nothing catches
the next one. `local/no-noop-hover-variant` reads every string literal and
template chunk and errors when a `hover:X` sits alongside a bare `X`, which is
exactly the shape that renders no hover feedback. It ships at error with no
suppression baseline, so the eleven sites that already carried a dead hover
before the migration are fixed here too.

The rule reads one class string at a time, so a base class supplied by a
different ternary branch than its hover partner is left alone: a selected row
whose resting colour already matches its hover colour is deliberate, not a bug.
2026-08-19 22:52:36 -07:00
..
filename-pascal-case.test.ts chore(ui): add filename, size, JSX-handler, prefer-const, and antd lint rules (#34341) 2026-07-22 19:34:35 -07:00
no-complex-jsx-arrow.test.ts chore(ui): add filename, size, JSX-handler, prefer-const, and antd lint rules (#34341) 2026-07-22 19:34:35 -07:00
no-large-inline-object-arg.test.ts feat(ui): add eslint rules for nested ternaries, large inline object args, and long condition chains (#32415) 2026-07-08 21:32:16 +00:00
no-long-condition-chain.test.ts feat(ui): add eslint rules for nested ternaries, large inline object args, and long condition chains (#32415) 2026-07-08 21:32:16 +00:00
no-noop-hover-variant.test.ts fix(ui): restore hover feedback and dark-mode variants lost in the token migration (#37579) 2026-08-19 22:52:36 -07:00