chore: add knip for unused export/dependency detection
Adds `pnpm check:unused` script powered by knip. Initial run finds 17 unused files, 3 unused deps, 96 unused exports, and 117 unused exported types — all candidates for cleanup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://unpkg.com/knip@latest/schema.json",
|
||||||
|
"ignore": [".claude/**", "backups/**", "samples/**"],
|
||||||
|
"ignoreDependencies": ["@capakraken/eslint-config", "@capakraken/tsconfig", "turbo"],
|
||||||
|
"ignoreBinaries": ["playwright"],
|
||||||
|
"workspaces": {
|
||||||
|
"apps/web": {
|
||||||
|
"ignore": ["src/**/*.test.{ts,tsx}", "e2e/**"]
|
||||||
|
},
|
||||||
|
"packages/shared": {},
|
||||||
|
"packages/db": {
|
||||||
|
"entry": [
|
||||||
|
"src/index.ts",
|
||||||
|
"src/seed*.ts",
|
||||||
|
"src/reset-*.ts",
|
||||||
|
"src/generate-*.ts",
|
||||||
|
"src/update-*.ts",
|
||||||
|
"src/*.mjs"
|
||||||
|
],
|
||||||
|
"ignoreDependencies": ["exceljs"]
|
||||||
|
},
|
||||||
|
"packages/engine": {},
|
||||||
|
"packages/staffing": {},
|
||||||
|
"packages/application": {},
|
||||||
|
"packages/api": {},
|
||||||
|
"tooling/eslint": {
|
||||||
|
"entry": ["src/*.js"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
"test:e2e:email": "pnpm --filter @capakraken/web test:e2e:email",
|
"test:e2e:email": "pnpm --filter @capakraken/web test:e2e:email",
|
||||||
"test:scripts": "node --test scripts/*.test.mjs",
|
"test:scripts": "node --test scripts/*.test.mjs",
|
||||||
"audit": "pnpm audit --audit-level=high",
|
"audit": "pnpm audit --audit-level=high",
|
||||||
|
"check:unused": "knip",
|
||||||
"check:architecture": "node ./scripts/check-architecture-guardrails.mjs",
|
"check:architecture": "node ./scripts/check-architecture-guardrails.mjs",
|
||||||
"check:exports": "node ./scripts/check-workspace-exports.mjs",
|
"check:exports": "node ./scripts/check-workspace-exports.mjs",
|
||||||
"check:imports": "node ./scripts/check-workspace-imports.mjs",
|
"check:imports": "node ./scripts/check-workspace-imports.mjs",
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
"@capakraken/eslint-config": "workspace:*",
|
"@capakraken/eslint-config": "workspace:*",
|
||||||
"@capakraken/tsconfig": "workspace:*",
|
"@capakraken/tsconfig": "workspace:*",
|
||||||
"husky": "^9.1.7",
|
"husky": "^9.1.7",
|
||||||
|
"knip": "^6.3.1",
|
||||||
"lint-staged": "^16.4.0",
|
"lint-staged": "^16.4.0",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"turbo": "^2.3.3",
|
"turbo": "^2.3.3",
|
||||||
|
|||||||
Generated
+764
-33
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user