[AI] Add knip to detect unused files, dependencies and exports (#8309)

Adds the knip tool with a monorepo-tuned config (knip.json) and a CI gate
in check.yml, plus the dead-code and dependency cleanup it surfaced. The
unused-export/type/duplicate rules are disabled so exporting an unused
symbol is allowed.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Matiss Janis Aboltins
2026-06-22 22:11:48 +00:00
committed by GitHub
co-authored by Claude Opus 4.8
parent df45b50412
commit c4acaa2951
25 changed files with 666 additions and 934 deletions
+15
View File
@@ -55,6 +55,21 @@ jobs:
download-translations: 'false'
- name: Lint
run: yarn lint
knip:
needs: setup
runs-on: depot-ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up environment
uses: ./.github/actions/setup
with:
download-translations: 'false'
- name: Build plugins service
run: yarn build:plugins-service
- name: Check for unused files, dependencies and exports
run: yarn knip
typecheck:
needs: setup
runs-on: depot-ubuntu-latest