fix(lint): baseline antd suppressions for new models-and-endpoints route files - #34460
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix(lint): baseline antd suppressions for new models-and-endpoints route files#34460cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
…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>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
frontend-lintfails on thelitellm_internal_staging->mainpromote PR with threeno-restricted-importserrorsantdbut were left out ofeslint-suppressions.jsonHow it solves it:
no-restricted-importsfor the three missed files viaeslint --suppress-rule no-restricted-importslayout.tsx,PriceDataManagementTab.tsx)Relevant issues
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Reproduction before the fix, at
64aad5877a(head oflitellm_internal_staging):After the fix, at the commit in this PR:
Both remaining warnings are pre-existing
no-explicit-anywarnings that don't fail the lint check.Type
🐛 Bug Fix
Changes
ui/litellm-dashboard/eslint-suppressions.json: addno-restricted-importsentries for the three route files added in #34327 that still import fromantd(Form.useFormfor the two page wrappers,FormInstance/UploadPropstypes 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 baselinedlayout.tsxandPriceDataManagementTab.tsx. Generated vianpx eslint --suppress-rule no-restricted-importsso the file stays in the format ESLint's suppressions tooling expects.