Skip to content

Commit 9a5ef70

Browse files
committed
Update CLAUDE.md documentation
1 parent 061a7f4 commit 9a5ef70

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,12 @@ Use these standardized patterns for consistency across all Socket projects:
348348
- **Semicolons**: Omit semicolons
349349
- **Line length**: Target 80 characters where practical
350350
- **List formatting**: Use `-` for bullets, not `•`
351+
- **String interpolation**: 🚨 MANDATORY - Use template literals instead of string concatenation for dynamic strings
352+
- ✅ CORRECT: `` `Error: ${message}` ``
353+
- ✅ CORRECT: `` `Cannot load '${path}': ${error.message}` ``
354+
- ❌ FORBIDDEN: `'Error: ' + message`
355+
- ❌ FORBIDDEN: `'Cannot load \'' + path + '\': ' + error.message`
356+
- **Rationale**: Template literals are more readable, less error-prone, and handle escaping automatically
351357
352358
## Commands
353359

0 commit comments

Comments
 (0)