@clipboard-health/ai-rules 1.7.18 → 1.7.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backend/AGENTS.md +4 -4
- package/common/AGENTS.md +4 -4
- package/frontend/AGENTS.md +4 -4
- package/fullstack/AGENTS.md +4 -4
- package/package.json +1 -1
package/backend/AGENTS.md
CHANGED
|
@@ -626,16 +626,17 @@ Use when: error handling hard to trigger black-box, concurrency scenarios, >5 va
|
|
|
626
626
|
## Core Rules
|
|
627
627
|
|
|
628
628
|
- Strict-mode TypeScript; prefer interfaces over types
|
|
629
|
-
- Avoid enums
|
|
630
|
-
- NEVER use `any
|
|
629
|
+
- Avoid enums: Use const maps
|
|
630
|
+
- NEVER use `any`: Use `unknown` or generics
|
|
631
631
|
- Avoid type assertions (`as`, `!`) unless absolutely necessary
|
|
632
632
|
- Use `function` keyword for declarations, not `const`
|
|
633
633
|
- Prefer `undefined` over `null`
|
|
634
|
-
-
|
|
634
|
+
- Explicitly define parameter types and return types on functions
|
|
635
635
|
- Files read top-to-bottom: exports first, internal helpers below
|
|
636
636
|
- Boolean props: `is*`, `has*`, `should*`, `can*`
|
|
637
637
|
- Use const assertions for constants: `as const`
|
|
638
638
|
- Use `date-fns` for date/time manipulation and `@clipboard-health/date-time` for formatting
|
|
639
|
+
- Prefer nullish coalescing (`??`) over logical OR (`||`) for defaults; use `||` when `0`, `""`, or `false` should trigger the default
|
|
639
640
|
|
|
640
641
|
## Null/Undefined Checks
|
|
641
642
|
|
|
@@ -675,7 +676,6 @@ const durationMinutes = 30;
|
|
|
675
676
|
- `keyof`, index access types, discriminated unions
|
|
676
677
|
- `as const`, `typeof`, `instanceof`, `satisfies`, type guards
|
|
677
678
|
- Exhaustiveness checking with `never`
|
|
678
|
-
- `readonly` for parameter immutability
|
|
679
679
|
|
|
680
680
|
## Functions
|
|
681
681
|
|
package/common/AGENTS.md
CHANGED
|
@@ -171,16 +171,17 @@ Use when: error handling hard to trigger black-box, concurrency scenarios, >5 va
|
|
|
171
171
|
## Core Rules
|
|
172
172
|
|
|
173
173
|
- Strict-mode TypeScript; prefer interfaces over types
|
|
174
|
-
- Avoid enums
|
|
175
|
-
- NEVER use `any
|
|
174
|
+
- Avoid enums: Use const maps
|
|
175
|
+
- NEVER use `any`: Use `unknown` or generics
|
|
176
176
|
- Avoid type assertions (`as`, `!`) unless absolutely necessary
|
|
177
177
|
- Use `function` keyword for declarations, not `const`
|
|
178
178
|
- Prefer `undefined` over `null`
|
|
179
|
-
-
|
|
179
|
+
- Explicitly define parameter types and return types on functions
|
|
180
180
|
- Files read top-to-bottom: exports first, internal helpers below
|
|
181
181
|
- Boolean props: `is*`, `has*`, `should*`, `can*`
|
|
182
182
|
- Use const assertions for constants: `as const`
|
|
183
183
|
- Use `date-fns` for date/time manipulation and `@clipboard-health/date-time` for formatting
|
|
184
|
+
- Prefer nullish coalescing (`??`) over logical OR (`||`) for defaults; use `||` when `0`, `""`, or `false` should trigger the default
|
|
184
185
|
|
|
185
186
|
## Null/Undefined Checks
|
|
186
187
|
|
|
@@ -220,7 +221,6 @@ const durationMinutes = 30;
|
|
|
220
221
|
- `keyof`, index access types, discriminated unions
|
|
221
222
|
- `as const`, `typeof`, `instanceof`, `satisfies`, type guards
|
|
222
223
|
- Exhaustiveness checking with `never`
|
|
223
|
-
- `readonly` for parameter immutability
|
|
224
224
|
|
|
225
225
|
## Functions
|
|
226
226
|
|
package/frontend/AGENTS.md
CHANGED
|
@@ -171,16 +171,17 @@ Use when: error handling hard to trigger black-box, concurrency scenarios, >5 va
|
|
|
171
171
|
## Core Rules
|
|
172
172
|
|
|
173
173
|
- Strict-mode TypeScript; prefer interfaces over types
|
|
174
|
-
- Avoid enums
|
|
175
|
-
- NEVER use `any
|
|
174
|
+
- Avoid enums: Use const maps
|
|
175
|
+
- NEVER use `any`: Use `unknown` or generics
|
|
176
176
|
- Avoid type assertions (`as`, `!`) unless absolutely necessary
|
|
177
177
|
- Use `function` keyword for declarations, not `const`
|
|
178
178
|
- Prefer `undefined` over `null`
|
|
179
|
-
-
|
|
179
|
+
- Explicitly define parameter types and return types on functions
|
|
180
180
|
- Files read top-to-bottom: exports first, internal helpers below
|
|
181
181
|
- Boolean props: `is*`, `has*`, `should*`, `can*`
|
|
182
182
|
- Use const assertions for constants: `as const`
|
|
183
183
|
- Use `date-fns` for date/time manipulation and `@clipboard-health/date-time` for formatting
|
|
184
|
+
- Prefer nullish coalescing (`??`) over logical OR (`||`) for defaults; use `||` when `0`, `""`, or `false` should trigger the default
|
|
184
185
|
|
|
185
186
|
## Null/Undefined Checks
|
|
186
187
|
|
|
@@ -220,7 +221,6 @@ const durationMinutes = 30;
|
|
|
220
221
|
- `keyof`, index access types, discriminated unions
|
|
221
222
|
- `as const`, `typeof`, `instanceof`, `satisfies`, type guards
|
|
222
223
|
- Exhaustiveness checking with `never`
|
|
223
|
-
- `readonly` for parameter immutability
|
|
224
224
|
|
|
225
225
|
## Functions
|
|
226
226
|
|
package/fullstack/AGENTS.md
CHANGED
|
@@ -626,16 +626,17 @@ Use when: error handling hard to trigger black-box, concurrency scenarios, >5 va
|
|
|
626
626
|
## Core Rules
|
|
627
627
|
|
|
628
628
|
- Strict-mode TypeScript; prefer interfaces over types
|
|
629
|
-
- Avoid enums
|
|
630
|
-
- NEVER use `any
|
|
629
|
+
- Avoid enums: Use const maps
|
|
630
|
+
- NEVER use `any`: Use `unknown` or generics
|
|
631
631
|
- Avoid type assertions (`as`, `!`) unless absolutely necessary
|
|
632
632
|
- Use `function` keyword for declarations, not `const`
|
|
633
633
|
- Prefer `undefined` over `null`
|
|
634
|
-
-
|
|
634
|
+
- Explicitly define parameter types and return types on functions
|
|
635
635
|
- Files read top-to-bottom: exports first, internal helpers below
|
|
636
636
|
- Boolean props: `is*`, `has*`, `should*`, `can*`
|
|
637
637
|
- Use const assertions for constants: `as const`
|
|
638
638
|
- Use `date-fns` for date/time manipulation and `@clipboard-health/date-time` for formatting
|
|
639
|
+
- Prefer nullish coalescing (`??`) over logical OR (`||`) for defaults; use `||` when `0`, `""`, or `false` should trigger the default
|
|
639
640
|
|
|
640
641
|
## Null/Undefined Checks
|
|
641
642
|
|
|
@@ -675,7 +676,6 @@ const durationMinutes = 30;
|
|
|
675
676
|
- `keyof`, index access types, discriminated unions
|
|
676
677
|
- `as const`, `typeof`, `instanceof`, `satisfies`, type guards
|
|
677
678
|
- Exhaustiveness checking with `never`
|
|
678
|
-
- `readonly` for parameter immutability
|
|
679
679
|
|
|
680
680
|
## Functions
|
|
681
681
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/ai-rules",
|
|
3
3
|
"description": "Pre-built AI agent rules for consistent coding standards.",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.20",
|
|
5
5
|
"bugs": "https://github.com/ClipboardHealth/core-utils/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@intellectronica/ruler": "0.3.28"
|