order conumables

This commit is contained in:
tresabhi committed 2026-12-03 23:14:24 -06:00
1 parent 0e268288e6
commit b1fb689918
5 files changed
+37 -2

No files matched your search

+1
View File
@@ -31,6 +31,7 @@ Pages that are not migrated yet are named `_index.astro` so Astro skips them. Mi
- No return type annotations. Put `satisfies Type` on the returned expression instead.
- Wrap functions defined inside React components in `useCallback`.
- Never inline a complex type (a union of object shapes, etc.) in a signature; name it as an interface or type.
- A lookup table that is read by key and checked for missing keys is a `Map`, not an object literal.
- Use a string `enum` (`Page = "page"`) instead of a union of string literals (`"page" | "dialog"`) whenever the values can be enumerated.
- In object literals, `...spread` entries come first, each on its own line, followed by a blank line, then the custom entries. A single-line object with a spread becomes multi-line.
- When an object literal's values are long expressions, compute them first into `const`s named after their keys, then build the object with shorthand (`{ name, color, tanks: [] }`). Short values stay inline.