Skip to content

Add knip check for dependencies #34

@olliethedev

Description

@olliethedev

Summary

Add Knip with --strict mode to detect unused dependencies, exports, and files in the @btst/stack package.

Motivation

The @btst/stack package has a large dependency tree with many peer dependencies. A strict Knip check would help:

  • Identify unused dependencies and peerDependencies
  • Find dead code and unused exports
  • Keep the bundle size minimal
  • Catch regressions in CI

Tasks

  • Add knip as a dev dependency in packages/better-stack
  • Create knip.json config (handle multiple entry points in exports)
  • Add "knip": "knip --strict" script to packages/better-stack/package.json
  • Add to root lint or create dedicated pnpm knip task
  • Add to CI workflow (.github/workflows/)

Notes

May need to configure Knip's entry and ignore patterns to handle:

  • Multiple plugin entry points (plugins/*/api, plugins/*/client, etc.)
  • CSS exports
  • typesVersions mappings

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions