chore(ui): soften antd import ban from error to warn - #34354
chore(ui): soften antd import ban from error to warn#34354ryan-crabbe-berri wants to merge 1 commit into
Conversation
The antd ban shipped in the prior lint pass as an error under no-restricted-imports, which blocks in-flight antd -> shadcn/ui refactors whenever they move or touch a file that still imports antd. Split antd out into a dedicated local/no-antd-import rule set to warn so new antd imports stay visible without failing CI, while the tremor ban stays a hard error. Pruned the now-stale antd suppressions, dropping no-restricted-imports back to its tremor-only baseline (625 -> 180) The new rule ships with RuleTester coverage over import, export-from, dynamic import, require, and deep antd/* paths
Greptile SummaryThis PR downgrades the
Confidence Score: 5/5Safe to merge — changes are limited to ESLint tooling with no runtime surface, and all stated gates (tremor error, antd warning, full-repo exit 0) are verified in the PR description. The rule implementation is correct and handles every antd import variant. The suppression file is consistently updated to match the new rule split. Tests are thorough and targeted. No runtime code is touched. No files require special attention.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/scripts/eslint-rules/no-antd-import.mjs | New custom ESLint rule correctly detects antd imports across static imports, re-exports, dynamic import(), and require() using a precise regex; no logic issues found. |
| ui/litellm-dashboard/tests/eslint-rules/no-antd-import.test.ts | RuleTester covers all five import variants (static, re-export named, re-export all, dynamic import, require) and the false-positive guard cases; coverage is adequate. |
| ui/litellm-dashboard/eslint.config.mjs | Antd removed from no-restricted-imports (error), added as local/no-antd-import (warn); tremor ban unchanged at error; clean split with no unintended rule changes. |
| ui/litellm-dashboard/scripts/eslint-rules/index.mjs | New no-antd-import rule registered in the local plugin under the correct key; no issues. |
| ui/litellm-dashboard/eslint-suppressions.json | antd-only no-restricted-imports entries removed; counts for files with remaining tremor entries correctly decremented; consistent with the rule change. |
Reviews (1): Last reviewed commit: "chore(ui): soften antd import ban from e..." | Re-trigger Greptile
TLDR
Problem this solves:
How it solves it:
Relevant issues
Follows up on #34341
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
This is lint tooling with no runtime surface, so the proof is the gate itself. Captured at the branch HEAD
The whole repo still passes; antd imports are now warnings, not errors
A new antd-only file no longer blocks (the refactor unblock case)
A file adding a new tremor import still fails, so that gate is untouched
The new rule ships with RuleTester coverage
Type
🚄 Infrastructure
Changes
The antd ban shipped in #34341 as an error under
no-restricted-imports. That blocks any antd to shadcn/ui refactor that moves or edits a file still importing antd, because the moved import lands without a matching suppression and fails CIThis splits antd into a dedicated
local/no-antd-importrule set towarn, so new antd imports stay visible during the migration without failing the build. The tremor ban keeps itserrorseverity underno-restricted-imports, so nothing there loosens. The now-stale antd suppressions are pruned, which dropsno-restricted-importsfrom 625 back to its tremor-only baseline of 180The new rule covers static imports,
export ... from, dynamicimport(),require, and deepantd/*paths, with RuleTester tests for eachOnce the antd migration lands, this can be re-promoted to
error(optionally with a budget) in a later passFinal Attestation