optional motion.filepath

This commit is contained in:
tresabhi committed 2026-11-28 16:56:17 -06:00
1 parent dc18e0e1d3
commit 63117b8369
3 files changed
+9 -2

No files matched your search

+1
View File
@@ -27,6 +27,7 @@ Pages that are not migrated yet are named `_index.astro` so Astro skips them. Mi
- Always hoist values that take work to compute (a function call, math, a lookup, like `"A".charCodeAt(0)` or `1 - SCROLL_ZONE`) and don't change between iterations or calls out of loops and repeatedly called functions into a `const` above them. No exceptions. Plain literals (strings, numbers, selectors like `"[data-row]"`) cost nothing and stay inline.
- A helper function used in only one place gets inlined there. Only extract a function once it has a second caller.
- Assert data that is known to be present with `!` instead of `?.` or `?? 0`; crashing beats silently showing a plausible wrong value. Keep `?.` only where absence is real logic: `optional` proto fields (check the `.proto`), optional script effect fields, and lookups that can legitimately miss.
- An `if` whose body ends up on its own line (including when the formatter wraps the condition) gets curly braces. Only a body on the same line as the `if` stays brace-less.
- Single-line comments use `//`, never `/** */`. Keep `/** */` for multi-line doc comments.
## JSX