Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Yarn provides "prefixed" scripts using the `<scope>:<action>` pattern. Scripts l

- **No `any` or `as` casts**: Don't use `any` types or `as` type assertions as an escape hatch. Instead use patterns the repo already follows: import types directly from external packages (e.g. `import type { UserConfig } from 'vite'`), use `typeof`/`instanceof`/`in` guards for narrowing (see `wrapPlugins.ts`), derive types from constants with `(typeof MY_CONST)[number]`, or use constrained generics (`<T extends SomeType>`). If you think you need `any`, something is wrong.
- **No TypeScript suppression comments**: Don't use `@ts-ignore`, `@ts-expect-error`, or `@ts-nocheck` to suppress type errors. Fix the underlying type issue instead.
- **No same-line comments**: Don't put comments on the same line as code. Put comments on the line above the code they describe so code and explanation stay visually separate.
- **No inlined function-call arguments**: Don't pass a function call directly as an argument to another function call. Assign the inner call to a well-named local variable first, then pass that variable to the outer call.
- **Use existing repo utilities**: Before writing new helpers, check what already exists:
- HTTP requests: `@dd/core/helpers/request` (not raw `fetch`)
- File operations: `@dd/core/helpers/fs` (not `fs/promises` directly)
Expand Down
Loading