Skip to content

chore(lint): knip reports unused files and dependencies too — add dashboard/ to its project so its 4 runtime deps stop reading unused, then classify the 5 flagged files #1555

Open

Description

@admarble

Problem

#1503 (PR #1550) adds knip and records only unusedExports (342) in the health report. knip also reports unused files and unused dependencies. Its knip.json project globs are src/, bin/ and scripts/, so dashboard/server.ts is invisible to it. As a result its four runtime dependencies (hono, @hono/node-server, chokidar, open) read as unused, which is false.

knip also flags five files: src/mcp/index.ts, src/lib/assess/index.ts, src/lib/ci/index.ts and src/lib/relay/index.ts (barrels) and src/lib/__fixtures__/tautology/dirname-spawn.fixture.ts. It flags three devDependencies: @types/inquirer, @typescript-eslint/eslint-plugin and @typescript-eslint/parser.

Owner-requested follow-up from #1503, 2026-10-19. The runner smoked these Evidence commands on the #1503 branch at 7e7649e; AC-1, AC-2 and AC-3 fail today.

Acceptance Criteria

  • AC-1: knip sees the dashboard. Evidence: jq -e '[.project[]|select(test("^dashboard/"))]|length >= 1' knip.json > /dev/null && echo ok → ok
  • AC-2: No runtime dependency reads as unused. Evidence: npx knip --reporter json 2>/dev/null | node -e "let s='';process.stdin.on('data',d=>s+=d).on('end',()=>{const r=JSON.parse(s);let n=0;for(const i of r.issues){const v=i.dependencies;n+=Array.isArray(v)?v.length:Object.keys(v||{}).length}console.log(n)})" → 0
  • AC-3: The health report carries unusedFiles and unusedDependencies, and the baseline records them. Evidence: npx tsx scripts/qa/health-report.ts --json | jq -e '.unusedFiles >= 0 and .unusedDependencies >= 0' > /dev/null && jq -e '.unusedFiles >= 0 and .unusedDependencies >= 0' scripts/qa/health-baseline.json > /dev/null && echo ok → ok
  • AC-4: Each flagged file and devDependency is classified in the PR body as delete, entry (add to knip.json) or keep (ignore entry with a reason). Evidence: gh pr view <pr> --json body --jq .body | grep -cE '^\| (src/|@)'→≥ 8` (not runnable until the PR exists)

May touch

knip.json, scripts/qa/health-report.ts, scripts/qa/health-report.test.ts, scripts/qa/health-baseline.json, package.json (removing a truly unused devDependency), package-lock.json, and any barrel file classified delete.

Non-Goals

  • Lowering unusedExports; that is a ratchet target, not this issue.
  • Making knip-advisory blocking.
  • Anything under plugin/, .claude/skills/ or templates/skills/.

Activity

  1. added
    enhancement
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions