Skip to content

fix(lint): baseline antd suppressions for new models-and-endpoints route files - #34460

Draft
cursor[bot] wants to merge 1 commit into
litellm_internal_stagingfrom
cursor/ci-autofix-automation-9f81
Draft

fix(lint): baseline antd suppressions for new models-and-endpoints route files#34460
cursor[bot] wants to merge 1 commit into
litellm_internal_stagingfrom
cursor/ci-autofix-automation-9f81

Conversation

@cursor

@cursor cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

How it solves it:

  • Baseline no-restricted-imports for the three missed files via eslint --suppress-rule no-restricted-imports
  • Matches the treatment feat(ui): give each Models + Endpoints tab its own path #34327 already applied to the other new antd-importing files it added in the same route (layout.tsx, PriceDataManagementTab.tsx)

Relevant issues

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Reproduction before the fix, at 64aad5877a (head of litellm_internal_staging):

$ cd ui/litellm-dashboard
$ npx eslint --no-warn-ignored --pass-on-unpruned-suppressions \
    'src/app/(dashboard)/models-and-endpoints/add/page.tsx' \
    'src/app/(dashboard)/models-and-endpoints/llm-credentials/page.tsx' \
    'src/app/(dashboard)/models-and-endpoints/vertexCredentialsUpload.ts'

/workspace/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/add/page.tsx
  3:1   error  'antd' import is restricted from being used by a pattern...  no-restricted-imports

/workspace/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/llm-credentials/page.tsx
  3:1  error  'antd' import is restricted from being used by a pattern...   no-restricted-imports

/workspace/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/vertexCredentialsUpload.ts
  1:1  error  'antd' import is restricted from being used by a pattern...   no-restricted-imports

✖ 5 problems (3 errors, 2 warnings)

After the fix, at the commit in this PR:

$ npx eslint --no-warn-ignored --pass-on-unpruned-suppressions \
    'src/app/(dashboard)/models-and-endpoints/add/page.tsx' \
    'src/app/(dashboard)/models-and-endpoints/llm-credentials/page.tsx' \
    'src/app/(dashboard)/models-and-endpoints/vertexCredentialsUpload.ts'

/workspace/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/add/page.tsx
  33:21  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  35:40  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

✖ 2 problems (0 errors, 2 warnings)
exit=0

Both remaining warnings are pre-existing no-explicit-any warnings that don't fail the lint check.

Type

🐛 Bug Fix

Changes

ui/litellm-dashboard/eslint-suppressions.json: add no-restricted-imports entries for the three route files added in #34327 that still import from antd (Form.useForm for the two page wrappers, FormInstance / UploadProps types for the upload helper). These wrap existing antd-based components (AddModelTab, CredentialsPanel) that haven't been migrated to shadcn yet, so the baseline entry lets the antd import through in the same way #34327 baselined layout.tsx and PriceDataManagementTab.tsx. Generated via npx eslint --suppress-rule no-restricted-imports so the file stays in the format ESLint's suppressions tooling expects.

Open in Web View Automation 

…ute files

PR #34327 split the Models + Endpoints view into per-tab route pages. Three
of the new files thinly wrap existing antd-based components and still need
antd imports:

  models-and-endpoints/add/page.tsx (Form.useForm for AddModelTab)
  models-and-endpoints/llm-credentials/page.tsx (Form.useForm for CredentialsPanel)
  models-and-endpoints/vertexCredentialsUpload.ts (FormInstance/UploadProps types)

Adjacent new files with antd imports from the same PR (layout.tsx,
PriceDataManagementTab.tsx) were baselined in eslint-suppressions.json, but
these three were missed, so the promote-to-main frontend-lint check on
litellm_internal_staging fails with three no-restricted-imports errors.

Add them to the suppressions baseline (via eslint --suppress-rule
no-restricted-imports), matching the treatment of the other new files in
the same route until the underlying components are migrated off antd.

Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants