Skip to content

(tooling): detect dead code with knip, report first, then block #1356

Done

Description

@devsuitup

Decided by Jean-Baptiste in person on 2026-11-29: run it now as continuous work, outside any release.

No dead-code detection exists.

Scope:

  • Add knip (pinned devDependency) for the main process, src/**, the root modules and scripts/.
  • public/*.js is excluded at first, because renderer files share cross-file globals through <script> tags and would give false positives everywhere.
  • Report unused files, exports and dependencies as a non-blocking CI job and a task deadcode command.
  • Then remove what is truly dead in separate PRs, and make the job blocking once it is clean.
  • The lock file is regenerated by the session (npx npm@10 --package-lock-only).

Activity

  1. devsuitup commented on Nov 29, 2026

    @devsuitup
    OwnerAuthor

    Done in #1367 (knip 6.45.1 report, task deadcode), #1369 (55 surplus exports dropped, no code deleted) and #1371 (job blocking; a preprocessor drops exactly 45 known false positives, a stale entry fails the run). Left as is: public/*.js stays excluded (renderer cross-file globals); making deadcode a required status check is a ruleset setting for the maintainer.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions