Skip to content

chore: add knip#170

Open
MarioCadenas wants to merge 3 commits intomainfrom
add-knip
Open

chore: add knip#170
MarioCadenas wants to merge 3 commits intomainfrom
add-knip

Conversation

@MarioCadenas
Copy link
Collaborator

@MarioCadenas MarioCadenas commented Mar 10, 2026

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/appkit and packages/appkit-ui workspaces (ignoring shared, 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/ and packages/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 the FALLBACK_COLORS alias 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 missing echarts and @opentelemetry/sdk-trace-base as direct dependencies.

Other changes

  • Deleted 8 auto-generated chart documentation .mdx files that were unused.
  • tools/license-utils.ts — unexported functions only used locally.

@MarioCadenas MarioCadenas marked this pull request as ready for review March 13, 2026 17:25
@MarioCadenas MarioCadenas requested review from ditadi and pkosiec March 13, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant