diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e8225e9..0b43f7f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -19,6 +19,7 @@ - [ ] Build: `pnpm build` - [ ] Typecheck: `pnpm typecheck` - [ ] Lint: `pnpm lint` (after build and typecheck) +- [ ] `pnpm knip` passes (unused files, exports, dependencies, configuration hints, or tag hints fail CI) - [ ] Changeset: `pnpm changeset status` (package-facing changes add a changeset) - [ ] Package dry-run: `npm pack --dry-run --registry=https://registry.npmjs.org` in each changed published package diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7586fa8..768e4c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,3 +44,5 @@ jobs: # Type-aware lint resolves workspace packages through their built `dist` types # and room-web through the route types `pnpm typecheck` generates. - run: pnpm lint + + - run: pnpm knip diff --git a/.gitlab/merge_request_templates/default.md b/.gitlab/merge_request_templates/default.md index 356103f..9b77404 100644 --- a/.gitlab/merge_request_templates/default.md +++ b/.gitlab/merge_request_templates/default.md @@ -19,6 +19,7 @@ - [ ] Build: `pnpm build` - [ ] Typecheck: `pnpm typecheck` - [ ] Lint: `pnpm lint` (after build and typecheck) +- [ ] `pnpm knip` passes (unused files, exports, dependencies, configuration hints, or tag hints fail CI) - [ ] Changeset: `pnpm changeset status` (package-facing changes add a changeset) - [ ] Package dry-run: `npm pack --dry-run --registry=https://registry.npmjs.org` in each changed published package diff --git a/AGENTS.md b/AGENTS.md index ebd4ec5..97738b4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,6 +37,7 @@ pnpm test pnpm build pnpm typecheck pnpm lint # after build and typecheck +pnpm knip # fails CI on unused files, exports, dependencies, configuration hints, or tag hints # Release checks: pnpm changeset status diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6210c3e..81dd425 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,6 +57,7 @@ pnpm test pnpm build pnpm typecheck pnpm lint +pnpm knip # fails CI on unused files, exports, dependencies, configuration hints, or tag hints ``` `pnpm duplicates` runs jscpd with lint-config's gate profile, where any reported clone fails (the threshold is 0); the scan roots and ignores live in the script, and `pnpm duplicates:audit` writes a broader, report-only list to the git-ignored `tmp/duplicates-audit/`. `pnpm format` applies the formatting. `pnpm lint` is type-aware: it resolves workspace packages through their built `dist` types and room-web through the route types that `pnpm typecheck` generates, so run it after `pnpm build` and `pnpm typecheck`. diff --git a/README.md b/README.md index 996004f..8eb96b5 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ The core package provides a local CLI that drives tasks from assignment through - `pnpm install` - `pnpm test` - `pnpm build` +- `pnpm knip` fails CI on unused files, exports, dependencies, configuration hints, or tag hints. - `pnpm changeset` ## License