litellm/ui/litellm-dashboard/scripts/eslint-rules
Yuneng Jiang 7d15c5b6da
test(ui): query antd controls accessibly instead of by internal CSS class
Dashboard tests located controls through antd's own class names
(.ant-form-item, .ant-select-selector, .ant-select-item-option). Those
break when a page moves to shadcn without any behaviour changing, and
they miss regressions a user would notice.

Replace them with role, label, title and accessible icon-name queries
where antd exposes one, and add local/no-antd-class-selectors to keep
them out. The rule is enabled as an error at zero violations, so there is
no budget file and no suppressions baseline. It found eight more sites a
'.ant-' search missed, written as bare class names.

Eleven couplings remain and carry an inline suppression naming why:
antd puts role="option" only on a hidden mirror list, so the visible
options have no role, no aria-disabled and a tooltip in title; Skeleton
and the modal mask expose nothing at all; and one assertion's whole
purpose is that no antd modal renders.

7231 tests passed before, 7233 pass after: one conflated ModelSelector
case became three focused ones.
2026-08-15 01:41:24 -07:00
..
filename-pascal-case.mjs chore(ui): add filename, size, JSX-handler, prefer-const, and antd lint rules (#34341) 2026-07-22 19:34:35 -07:00
index.mjs test(ui): query antd controls accessibly instead of by internal CSS class 2026-08-15 01:41:24 -07:00
no-antd-class-selectors.mjs test(ui): query antd controls accessibly instead of by internal CSS class 2026-08-15 01:41:24 -07:00
no-complex-jsx-arrow.mjs 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.mjs 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.mjs 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