- Fix template literal expressions: wrap Date.now() in String() - Add missing afterAll import in admin.test.ts - Fix countOwners to use countAll() without misleading <number> type - Add ast-grep rule to prevent countAll<number>() usage - Fix formatting issues from merge conflict resolution Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
9 lines
328 B
YAML
9 lines
328 B
YAML
id: no-countall-number
|
|
language: typescript
|
|
severity: error
|
|
message: "Don't use countAll<number>() - use countAll() instead. PostgreSQL COUNT returns bigint (string), so the type annotation is misleading."
|
|
note: "Use Number() to convert the result if you need a number type."
|
|
rule:
|
|
pattern: countAll<number>()
|
|
fix: countAll()
|