mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
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.
17 lines
644 B
JavaScript
17 lines
644 B
JavaScript
import noLargeInlineObjectArg from "./no-large-inline-object-arg.mjs";
|
|
import noLongConditionChain from "./no-long-condition-chain.mjs";
|
|
import noComplexJsxArrow from "./no-complex-jsx-arrow.mjs";
|
|
import filenamePascalCase from "./filename-pascal-case.mjs";
|
|
import noAntdClassSelectors from "./no-antd-class-selectors.mjs";
|
|
|
|
const plugin = {
|
|
rules: {
|
|
"no-large-inline-object-arg": noLargeInlineObjectArg,
|
|
"no-long-condition-chain": noLongConditionChain,
|
|
"no-complex-jsx-arrow": noComplexJsxArrow,
|
|
"filename-pascal-case": filenamePascalCase,
|
|
"no-antd-class-selectors": noAntdClassSelectors,
|
|
},
|
|
};
|
|
|
|
export default plugin;
|