mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-29 04:44:23 +01:00
optional motion.filepath
This commit is contained in:
3 files changed
+9
-2
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user