Configuration
Dependency management
Section titled “Dependency management”Dead dependency cleanup
Section titled “Dead dependency cleanup”The dashboard ships with some dependencies that are installed but unused. These slow down npm install, bloat node_modules, and confuse audits. The following can be safely removed:
| Package | Savings |
|---|---|
@dnd-kit/core | ~800KB |
@dnd-kit/sortable | ~600KB |
@dnd-kit/utilities | ~200KB |
date-fns | ~500KB |
@radix-ui/react-icons | ~300KB |
@hookform/resolvers | ~100KB |
zod | ~200KB |
Radix UI consolidation
Section titled “Radix UI consolidation”The project has both the combined radix-ui package (v1.4.3) and 15+ individual @radix-ui/react-* packages. To consolidate:
- Migrate all imports from
@radix-ui/react-*toradix-ui - Remove the individual packages from
package.json
Files to update (all in src/components/ui/):
sidebar.tsx, form.tsx, collapsible.tsx, dropdown-menu.tsx, select.tsx, checkbox.tsx, separator.tsx, badge.tsx, dialog.tsx, radio-group.tsx, tooltip.tsx, label.tsx, scroll-area.tsx, sheet.tsx, tabs.tsx
Code formatting
Section titled “Code formatting”Prettier
Section titled “Prettier”Create a .prettierrc.json in the frontend root to configure the installed plugins (@trivago/prettier-plugin-sort-imports and prettier-plugin-tailwindcss):
{ "semi": false, "singleQuote": true, "jsxSingleQuote": true, "trailingComma": "es5", "printWidth": 80, "tabWidth": 2, "plugins": [ "@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss" ], "importOrder": [ "^react", "<THIRD_PARTY_MODULES>", "^@/components/(.*)$", "^@/(.*)$", "^[./]" ], "importOrderSeparation": false, "importOrderSortSpecifiers": true}These values match the existing code style (single quotes, no semicolons). The importOrder groups React first, then third-party, then aliases, then relative paths.
Static analysis
Section titled “Static analysis”Knip is installed but needs configuration. Create knip.json:
{ "entry": ["src/main.tsx"], "project": ["src/**/*.{ts,tsx}"], "ignore": ["src/components/ui/**", "src/routeTree.gen.ts"], "ignoreDependencies": [ "@tailwindcss/vite", "@tanstack/router-plugin", "tw-animate-css", "@fontsource-variable/inter", "@fontsource-variable/manrope", "@fontsource/monaspace-krypton" ]}The ignore list excludes shadcn/ui wrappers (installed on-demand) and the auto-generated route tree. ignoreDependencies covers CSS-only and plugin dependencies that Knip can’t trace via imports.
Verification
Section titled “Verification”After applying configuration changes:
cd pro/frontendnpm installnpx tsc -b --noEmitnpx vite buildnpm run lintnpm run knipnpm run format:checkcd pro/frontendnpx vite build && npm run lint