Commit 162671b
Remove unused files in @kbn/docs-utils (dead code cleanup) (elastic#266809)
## Summary
Removes **1 unused source files** (10 LoC) from `@kbn/docs-utils`, owned
by `@elastic/kibana-operations`. All verified to have **zero static
importers** anywhere in the repo.
This is one slice of a broader sweep across the codebase removing **399
files / 18.5k LoC** of dead code. Co-PRs cover the other ~28 teams'
slices. The methodology is in elastic#266635 (skill PR).
## Files removed
See the diff. Removals span the package — common shapes include:
- Orphan barrel `index.ts` files where consumers consistently
deep-import the sibling modules directly.
- Dead React components, hooks, route handlers, or test helpers no
longer referenced anywhere.
## Verification
For every file:
1. **`knip` flagged it as unreachable** from the package's declared
entry points (`server/index.ts`, `public/index.ts`, `common/index.ts`,
plus deep-import-derived entries).
2. **Resolve-aware import scan** confirmed zero importers across the
repo (Node-style: `<base>.ts`, `<base>.tsx`, `<base>/index.ts`,
`<base>/index.tsx`).
3. **Package-id deep-import grep** for `@kbn/docs-utils/<sub>`
references from other packages.
4. **`jest.mock()` string scan** for test mocks pointing at the path.
5. **Type-check passes** (`node scripts/type_check --project
packages/kbn-docs-utils/tsconfig.json`).
## Patterns observed (for context)
The most common dead-code shapes in this slice:
- **Orphan barrel `index.ts`** that re-exports from siblings — the
commonest shape across the cleanup.
- Other patterns vary by package (dead React components, dead route
handlers, dead test fixtures).
The full pattern catalog (across all teams) is in elastic#266635.
🤖 Generated by an AI agent following a verification recipe at
`.agents/skills/dead-code-cleanup/SKILL.md` (PR elastic#266635).
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent d2bffd9 commit 162671b
1 file changed
Lines changed: 0 additions & 10 deletions
Lines changed: 0 additions & 10 deletions
This file was deleted.
0 commit comments