chore(ui): add knip for dead code detection#10654
Open
pfe-nazaries wants to merge 2 commits intomasterfrom
Open
chore(ui): add knip for dead code detection#10654pfe-nazaries wants to merge 2 commits intomasterfrom
pfe-nazaries wants to merge 2 commits intomasterfrom
Conversation
Install knip and create initial configuration tailored to the Next.js 16 project structure. Adds `lint:knip` and `lint:knip:fix` scripts to surface unused files, dependencies, and exports. Baseline: ~504 issues (37 unused files, 22 unused deps, 399 unused exports, 37 unused types, 5 unused enum members, 2 unresolved imports, 1 duplicate export). These will be addressed in follow-up PRs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
✅ All necessary |
Contributor
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Contributor
🔒 Container Security ScanImage: ✅ No Vulnerabilities DetectedThe container image passed all security checks. No known CVEs were found.📋 Resources:
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
Summary
lint:knipandlint:knip:fixscripts topackage.json@heroui/*sub-package imports (resolved transitively via@heroui/react)Baseline report
Running
pnpm lint:knipsurfaces ~504 issues across the UI codebase:These findings will be addressed in follow-up PRs (dependency cleanup, dead export removal, config refinement).
Roadmap
This is the first step in a series of incremental PRs to reduce dead code in the UI:
--max-issuesin healthcheckDependencies
Test plan
pnpm typecheckpassespnpm lint:checkpassespnpm buildpassespnpm lint:knipruns and produces the baseline report (exits non-zero as expected)