Skip to content

fix(ci): clear knip unused-exports failures on dev#119

Merged
Predixx merged 1 commit into
devfrom
fix/knip-unused-exports
Apr 30, 2026
Merged

fix(ci): clear knip unused-exports failures on dev#119
Predixx merged 1 commit into
devfrom
fix/knip-unused-exports

Conversation

@Predixx

@Predixx Predixx commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

The CI `TypeScript, Lint & Tests / Dead code analysis` step (`npm run knip`) has been red on every push to `dev` since 55091f0. This PR clears the three offending exports plus one redundant config entry.

Changes

  • `useChatStore.ts`: `MessageLoadResult` was exported but only consumed in the same file (as the type of an internal store field). Demoted to file-private interface.
  • `theia/dataBridgeReader.ts`: `KnownBridgeKey` and `DataBridgeProbeResult` were exported (and re-exported through `theia/index.ts`) but every call site relies on TypeScript inference for the public-API surface. Demoted to file-private; dropped the barrel re-exports.
  • `knip.json`: removed the redundant `esbuild.js` entry pattern (knip auto-detects build configs; the entry was flagged as a configuration hint).

Test plan

  • `npm run check-types` passes
  • `npm run lint:src` passes
  • `npm run knip` exits 0 with no unused-exports or configuration hints
  • CI `Dead code analysis` step turns green

Notes

The `npm run knip` step in the TypeScript/Lint/Tests workflow has been
red on every push to dev since 55091f0. Two distinct sources:

- `MessageLoadResult` in `useChatStore.ts` was exported but only consumed
  in the same file (as the type of an internal store field). Demote to a
  file-private interface.
- `KnownBridgeKey` and `DataBridgeProbeResult` in
  `theia/dataBridgeReader.ts` were exported (and re-exported through
  `theia/index.ts`) for use as type annotations at call sites that
  actually rely on TypeScript inference. The exports were never read.
  Demote to file-private and drop the barrel re-exports.

Also drop the redundant `esbuild.js` entry from `knip.json` — knip
auto-detects build configs and was flagging it as a configuration hint.

After this commit, `npm run knip` exits 0 locally with no warnings.
@Predixx Predixx merged commit 53aabda into dev Apr 30, 2026
2 checks passed
@Predixx Predixx deleted the fix/knip-unused-exports branch April 30, 2026 12:21
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