fix: enable full knip checks and clean up unused exports and dead code#1102
Merged
fix: enable full knip checks and clean up unused exports and dead code#1102
Conversation
Rsdoctor Bundle Diff Analysis
Found 12 projects in monorepo, 1 project with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 core/mainPath:
📦 Download Diff Report: core/main Bundle Diff Generated by Rsdoctor GitHub Action |
- Upgrade knip from dependency-only to full unused code analysis - Tighten knip.json entry points from broad globs to precise entries - Remove 49 redundant export keywords (symbols only used within same file) - Delete 24 truly dead code items (functions, types, constants, re-exports) - Remove unused clsx dependency from browser-ui - Add vscode test fixture paths to knip.json to suppress false positives Amp-Thread-ID: https://ampcode.com/threads/T-019d2420-1729-7178-b659-bfe861cc9c37 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d24d9-c1f0-72d4-9ad4-4cbcf4e36f2e Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d24e6-5330-7298-b92b-2d3d6737473a Co-authored-by: Amp <amp@ampcode.com>
3fe8f58 to
26ba9a9
Compare
9aoy
approved these changes
Mar 25, 2026
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
Background
The existing
check-unusedCI step only detected unused dependencies viaknip --dependencies. Unused exports, dead functions, and orphan types were invisible, allowing dead code to accumulate (77 items across the monorepo).Implementation
knip --dependencies) to full analysis (knip) by renaming the script fromcheck-unused-depstocheck-unusedand updating.github/workflows/lint.yml.knip.jsonentry points from broad globs (src/**/*.ts) to precise entries so knip can accurately trace reachability.exportkeywords where symbols were only used within the same file.@rstest/core,@rstest/browser,@rstest/browser-ui,@rstest/browser-react,@rstest/coverage-istanbul, and@rstest/vscode.clsxdependency from@rstest/browser-ui.knip.jsonto suppress 2 false positives for fixture files read at runtime.User Impact
None — internal cleanup only.
Checklist