Open
Conversation
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
Add Knip to detect and remove unused exports, dependencies, and dead code across the monorepo.
Main changes
Knip integration (
knip.json,package.json,.github/workflows/ci.yml,.husky/pre-commit):Adds Knip as a dev dependency with configuration targeting
packages/appkitandpackages/appkit-uiworkspaces (ignoringshared,lakebase, apps, and docs). Knip runs as a CI check and as a pre-commit hook alongside lint-staged.Dead export and code removal (across
packages/appkit/src/andpackages/appkit-ui/src/):Fixes all Knip findings by removing unused exports (making them local or prefixing with
_), deleting dead files (error-boundary.tsx,table-error-boundary.tsx,lakebase-v1/utils.ts), trimming barrel re-exports (logging/index.ts,stream/index.ts,telemetry/index.ts,context/index.ts,registry/types.ts,connectors/genie/index.ts,connectors/lakebase/index.ts), and removing theFALLBACK_COLORSalias from chart constants.Unused dependency cleanup (
package.json,packages/*/package.json,apps/dev-playground/package.json):Removes unused dependencies flagged by Knip:
pg,plop,zod,date-fns,@hookform/resolvers,@tanstack/react-virtual,zod-to-ts,dependency-tree,@types/dependency-tree,@types/react-syntax-highlighter,@vitejs/plugin-react(from dev-playground). Adds missingechartsand@opentelemetry/sdk-trace-baseas direct dependencies.Other changes
.mdxfiles that were unused.tools/license-utils.ts— unexported functions only used locally.