mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-20 00:11:50 +00:00
knip was producing garbage locally and was never wired into CI, so nobody trusted it. Two structural problems: it silently degrades when deps are missing (a partial worktree install flagged all 436 test files as unused), and its config had blind spots that surfaced as false positives. Fixes so a knip run means something: - Register every playwright config (serverRootPath + migration variants), not just the main one. serverRootPath.config.ts is invoked via --config in test_server_root_path.yml, which knip can't see; it was falsely flagged as an unused file - Treat src/components/ui/** as entry points. These are shadcn design-system primitives, intentionally part of the palette before every one is consumed; knip was flagging not-yet-used ones (e.g. select.tsx) as dead files and their sub-exports as unused. Marking the directory as the design-system surface is the correct fix, not deleting components someone is about to use - Declare @ant-design/icons as a direct dependency. It was imported in ~198 files but only resolved via antd hoisting, so every one showed up as an "unlisted dependency" - Add an explicit vitest plugin block so test-file classification no longer rides on auto-detection - Stage severities via rules: gate the now-clean categories (files, dependencies, unlisted, unresolved) as errors and keep exports/types/ duplicates as warnings, so CI enforces what's at zero today while the remaining findings ratchet down in follow-ups - Run npm run knip in the frontend-lint CI job, which installs with npm ci so it never sees a partial tree knip now exits 0 with the gated categories clean
108 lines
3.3 KiB
JSON
108 lines
3.3 KiB
JSON
{
|
|
"name": "litellm-dashboard",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"dev:webpack": "next dev --webpack",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint .",
|
|
"lint:metrics": "node scripts/update-lint-metrics.mjs",
|
|
"test": "vitest",
|
|
"test:dot": "vitest --reporter=dot",
|
|
"test:watch": "vitest -w",
|
|
"test:coverage": "vitest run --coverage",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"e2e": "playwright test --config e2e_tests/playwright.config.ts",
|
|
"e2e:ui": "playwright test --ui --config e2e_tests/playwright.config.ts",
|
|
"e2e:migration": "playwright test e2e_tests/tests/migration/migratedPages.spec.ts --config e2e_tests/playwright.config.ts",
|
|
"e2e:migration:root": "playwright test --config e2e_tests/migration.serverRootPath.config.ts",
|
|
"knip": "knip",
|
|
"knip:fix": "knip --fix",
|
|
"gen:api": "node scripts/gen-api-types.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@ant-design/cssinjs": "1.24.0",
|
|
"@ant-design/icons": "5.6.1",
|
|
"@anthropic-ai/sdk": "0.92.0",
|
|
"@base-ui/react": "^1.6.0",
|
|
"@headlessui/tailwindcss": "0.2.2",
|
|
"@heroicons/react": "1.0.6",
|
|
"@tanstack/react-pacer": "0.2.0",
|
|
"@tanstack/react-query": "5.100.7",
|
|
"@tanstack/react-table": "8.21.3",
|
|
"@tremor/react": "3.18.7",
|
|
"@types/papaparse": "5.5.2",
|
|
"antd": "5.29.3",
|
|
"cva": "1.0.0-beta.4",
|
|
"date-fns": "^4.4.0",
|
|
"dayjs": "1.11.19",
|
|
"jwt-decode": "4.0.0",
|
|
"lucide-react": "0.513.0",
|
|
"moment": "2.30.1",
|
|
"next": "16.2.6",
|
|
"openai": "4.104.0",
|
|
"papaparse": "5.5.3",
|
|
"react": "18.3.1",
|
|
"react-copy-to-clipboard": "5.1.1",
|
|
"react-dom": "18.3.1",
|
|
"react-json-view-lite": "2.5.0",
|
|
"react-markdown": "9.1.0",
|
|
"react-syntax-highlighter": "15.6.6",
|
|
"recharts": "3.9.2",
|
|
"remark-gfm": "4.0.1",
|
|
"tailwind-merge": "3.4.0",
|
|
"uuid": "14.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "9.39.2",
|
|
"@playwright/test": "1.58.1",
|
|
"@tailwindcss/forms": "0.5.11",
|
|
"@tailwindcss/postcss": "4.3.2",
|
|
"@testing-library/dom": "10.4.1",
|
|
"@testing-library/jest-dom": "6.9.1",
|
|
"@testing-library/react": "16.3.2",
|
|
"@testing-library/user-event": "14.6.1",
|
|
"@types/lodash": "4.17.23",
|
|
"@types/node": "20.19.37",
|
|
"@types/react": "18.2.48",
|
|
"@types/react-copy-to-clipboard": "5.0.7",
|
|
"@types/react-dom": "18.3.7",
|
|
"@types/react-syntax-highlighter": "15.5.13",
|
|
"@vitest/coverage-v8": "3.2.6",
|
|
"@vitest/ui": "3.2.6",
|
|
"eslint": "9.39.2",
|
|
"eslint-config-next": "16.2.6",
|
|
"eslint-config-prettier": "10.1.8",
|
|
"eslint-plugin-unused-imports": "4.3.0",
|
|
"jsdom": "27.4.0",
|
|
"knip": "5.83.1",
|
|
"openapi-typescript": "7.13.0",
|
|
"postcss": "8.5.13",
|
|
"prettier": "3.2.5",
|
|
"tailwindcss": "4.3.2",
|
|
"tw-animate-css": "1.4.0",
|
|
"typescript": "5.9.3",
|
|
"typescript-eslint": "8.60.1",
|
|
"vitest": "3.2.6"
|
|
},
|
|
"overrides": {
|
|
"prismjs": "1.30.0",
|
|
"js-yaml": "4.2.0",
|
|
"glob": "13.0.0",
|
|
"minimatch": "10.2.4",
|
|
"lodash": "4.18.1",
|
|
"ws": "8.21.0",
|
|
"braces": "3.0.3",
|
|
"axios": "1.13.6",
|
|
"postcss": "8.5.13",
|
|
"esbuild": "0.28.1",
|
|
"date-fns": "^4.4.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.9.0",
|
|
"npm": ">=8.3.0"
|
|
}
|
|
}
|