Skip to content

Commit 6c3c1b6

Browse files
committed
cache knip, add to agents.md
1 parent cc82216 commit 6c3c1b6

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

AGENTS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ pnpm run lint:fix # oxlint — auto-fixes lint violations
8181
pnpm run lint # oxlint — check only (no fixes)
8282
```
8383

84+
### Dead code
85+
86+
We use knip to control unused dependencies and code. It is enforced by CI `code-quality`.
87+
88+
Scan your code before pushing with:
89+
90+
```bash
91+
pnpm run knip
92+
```
93+
8494
### Imports
8595

8696
**Prefer static imports over dynamic imports.** Only use dynamic `import()` when:

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ branch are tagged into a release periodically.
5959
```
6060
6. Create your `.env` file
6161
```
62-
cp .env.example .env
62+
--cache cp .env.example .env
6363
```
6464
7. Open it and generate a new value for `ENCRYPTION_KEY`:
6565

@@ -238,10 +238,11 @@ This never affects correctness — CI enforces the same checks on every PR; the
238238
1. **Always open your PR in draft status first.** Do not mark it as "Ready for Review" until the steps below are complete.
239239
2. **Run format and lint locally before pushing:**
240240
```bash
241-
pnpm run format # auto-fixes formatting (oxfmt)
242-
pnpm run lint:fix # auto-fixes lint violations (oxlint)
241+
pnpm run format
242+
pnpm run lint
243+
pnpm run knip
243244
```
244-
Both are enforced by CI — the `code-quality` check will fail if either produces a diff or errors.
245+
These are enforced by CI — the `code-quality` check will fail if either produces a diff or errors.
245246
3. **Address all CodeRabbit code review comments.** Our CI runs an automated code review via CodeRabbit. Go through each comment and either fix the issue or resolve it with a comment explaining why no change is needed.
246247
4. **Wait for all CI checks to pass.** Do not mark the PR as "Ready for Review" until every check is green.
247248
5. **Then mark the PR as "Ready for Review"** so a maintainer can take a look.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"format:prisma": "pnpm --filter @trigger.dev/database run format:prisma && pnpm --filter @internal/run-ops-database run format:prisma",
2323
"lint": "oxlint",
2424
"lint:fix": "oxlint --fix",
25-
"knip": "knip --include files,exports,types,dependencies,unlisted,binaries,unresolved,catalog",
25+
"knip": "knip --cache --include files,exports,types,dependencies,unlisted,binaries,unresolved,catalog",
2626
"docker": "node scripts/docker.mjs -f docker/docker-compose.yml up -d --build --remove-orphans",
2727
"docker:stop": "node scripts/docker.mjs -f docker/docker-compose.yml stop",
2828
"docker:full": "node scripts/docker.mjs -f docker/docker-compose.yml -f docker/docker-compose.extras.yml up -d --build --remove-orphans",

0 commit comments

Comments
 (0)