Skip to content

Commit 88aa6e8

Browse files
[docs] Enhance CLAUDE.md files with quality control guidelines (#4690)
Co-authored-by: Claude <[email protected]>
1 parent a8bd66b commit 88aa6e8

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

CLAUDE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
- `npm run typecheck`: Type checking
77
- `npm run lint`: Linting
88
- `npm run format`: Prettier formatting
9+
- `npm run test:component`: Run component tests with browser environment
10+
- `npm run test:unit`: Run all unit tests
11+
- `npm run test:unit -- tests-ui/tests/example.test.ts`: Run single test file
912

1013
## Development Workflow
1114

@@ -48,3 +51,11 @@ When referencing Comfy-Org repos:
4851
1. Check for local copy
4952
2. Use GitHub API for branches/PRs/metadata
5053
3. Curl GitHub website if needed
54+
55+
## Common Pitfalls
56+
57+
- NEVER use `any` type - use proper TypeScript types
58+
- NEVER use `as any` type assertions - fix the underlying type issue
59+
- NEVER use `--no-verify` flag when committing
60+
- NEVER delete or disable tests to make them pass
61+
- NEVER circumvent quality checks

src/CLAUDE.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,22 @@
66

77
- Use `api.apiURL()` for backend endpoints
88
- Use `api.fileURL()` for static files
9-
- Examples:
10-
- Backend: `api.apiURL('/prompt')`
11-
- Static: `api.fileURL('/templates/default.json')`
9+
10+
#### ✅ Correct Usage
11+
```typescript
12+
// Backend API call
13+
const response = await api.get(api.apiURL('/prompt'))
14+
15+
// Static file
16+
const template = await fetch(api.fileURL('/templates/default.json'))
17+
```
18+
19+
#### ❌ Incorrect Usage
20+
```typescript
21+
// WRONG - Direct URL construction
22+
const response = await fetch('/api/prompt')
23+
const template = await fetch('/templates/default.json')
24+
```
1225

1326
### Error Handling
1427

0 commit comments

Comments
 (0)