Check each one before you remove it
Knip finds these from the entry points Agnes works out for the repository. Code loaded by name, by a tool's config, by tests or from outside the repository looks unused too, and removing it breaks the app.
git rm -- \ 'app/api/auth/[...nextauth]/_route.ts' \ components/ui/accordion.tsx \ components/ui/aspect-ratio.tsx \ components/ui/badge.tsx \ components/ui/calendar.tsx \ components/ui/checkbox.tsx \ components/ui/collapsible.tsx \ components/ui/command.tsx \ components/ui/context-menu.tsx \ components/ui/dialog.tsx \ components/ui/hover-card.tsx \ components/ui/menubar.tsx \ components/ui/navigation-menu.tsx \ components/ui/popover.tsx \ components/ui/progress.tsx \ components/ui/radio-group.tsx \ components/ui/scroll-area.tsx \ components/ui/select.tsx \ components/ui/separator.tsx \ components/ui/sheet.tsx \ components/ui/slider.tsx \ components/ui/switch.tsx \ components/ui/tabs.tsx \ components/ui/textarea.tsx \ components/ui/toggle.tsx \ components/ui/tooltip.tsx
components/icons.tsx: type Icon components/pager.tsx: getPagerForDoc, flatten components/sidebar-nav.tsx: DocsSidebarNavItems components/ui/alert-dialog.tsx: AlertDialogTrigger components/ui/dropdown-menu.tsx: DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup components/ui/input.tsx: type InputProps components/ui/toast.tsx: ToastAction components/ui/use-toast.ts: reducer
| Severity | Finding | Location |
|---|---|---|
| Warning | Warning Unused file: app/api/auth/[...nextauth]/_route.ts knip/unused-file · medium confidence app/api/auth/[...nextauth]/_route.ts | app/api/auth/[...nextauth]/_route.ts |
| Warning | Warning Catch parameter 'error' is caught but never used. eslint(no-unused-vars) app/api/og/route.tsx:143 | app/api/og/route.tsx:143 |
| Warning | Warning Catch parameter 'error' is caught but never used. eslint(no-unused-vars) app/api/posts/route.ts:36 | app/api/posts/route.ts:36 |
| Warning | Warning Parameter 'req' is declared but never used. Unused parameters should start with a '_'. eslint(no-unused-vars) app/api/users/stripe/route.ts:12 | app/api/users/stripe/route.ts:12 |
| Warning | Warning Imported module should be assigned import(no-unassigned-import) app/layout.tsx:4 | app/layout.tsx:4 |
| Warning | Warning Identifier 'absoluteUrl' is imported but never used. eslint(no-unused-vars) app/layout.tsx:6 | app/layout.tsx:6 |
| Warning | Warning Imported module should be assigned import(no-unassigned-import) components/editor.tsx:13 | components/editor.tsx:13 |
| Warning | Warning Calling setState synchronously within an effect can trigger cascading renders react(set-state-in-effect) components/editor.tsx:71 | components/editor.tsx:71 |
| Warning | Warning Cannot access refs during render react(refs) components/editor.tsx:124 | components/editor.tsx:124 |
| Warning | Warning Usage of Array index in keys is not allowed react(no-array-index-key) components/main-nav.tsx:34 | components/main-nav.tsx:34 |
| Warning | Warning Cannot create components during render react(static-components) components/mdx-components.tsx:164 | components/mdx-components.tsx:164 |
| Warning | Warning Usage of Array index in keys is not allowed react(no-array-index-key) components/mobile-nav.tsx:32 | components/mobile-nav.tsx:32 |
| Warning | Warning Usage of Array index in keys is not allowed react(no-array-index-key) components/nav.tsx:27 | components/nav.tsx:27 |
| Warning | Warning Function `onSubmit` does not capture any variables from its parent scope unicorn(consistent-function-scoping) components/search.tsx:11 | components/search.tsx:11 |
| Warning | Warning Usage of Array index in keys is not allowed react(no-array-index-key) components/sidebar-nav.tsx:19 | components/sidebar-nav.tsx:19 |
| Warning | Warning Missing "key" prop for element in iterator. react(jsx-key) components/sidebar-nav.tsx:43 | components/sidebar-nav.tsx:43 |
| Warning | Warning Usage of Array index in keys is not allowed react(no-array-index-key) components/sidebar-nav.tsx:46 | components/sidebar-nav.tsx:46 |
| Warning | Warning 'item' is already declared in the upper scope. eslint(no-shadow) components/toc.tsx:18 | components/toc.tsx:18 |
| Warning | Warning Usage of Array index in keys is not allowed react(no-array-index-key) components/toc.tsx:94 | components/toc.tsx:94 |
| Warning | Warning Unused file: components/ui/accordion.tsx knip/unused-file · medium confidence components/ui/accordion.tsx | components/ui/accordion.tsx |
| Warning | Warning Parameter 'children' is declared but never used. Unused parameters should start with a '_'. eslint(no-unused-vars) components/ui/alert-dialog.tsx:29 | components/ui/alert-dialog.tsx:29 |
| Warning | Warning Unused file: components/ui/aspect-ratio.tsx knip/unused-file · medium confidence components/ui/aspect-ratio.tsx | components/ui/aspect-ratio.tsx |
| Warning | Warning Unused file: components/ui/badge.tsx knip/unused-file · medium confidence components/ui/badge.tsx | components/ui/badge.tsx |
| Warning | Warning Unused file: components/ui/calendar.tsx knip/unused-file · medium confidence components/ui/calendar.tsx | components/ui/calendar.tsx |
| Warning | Warning 'props' is already declared in the upper scope. eslint(no-shadow) components/ui/calendar.tsx:55 | components/ui/calendar.tsx:55 |