You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,10 @@ Biome is authoritative: use tabs, double quotes, and organized imports. Follow n
23
23
24
24
Use intent-revealing domain names. A reader should understand what a variable contains or what a helper guarantees at the call site without opening its implementation. Avoid vague transformation names such as `normalized`, `processed`, `result`, or `data` when a value- or behavior-specific name is available.
25
25
26
+
Replace numeric literals that encode domain rules, limits, durations, units, or protocol values with descriptively named constants. Obvious structural values, such as basic indexes or empty-state values, may remain inline.
27
+
28
+
Prefer clear structure, and simplify or extract complex logic before relying on comments. Use comments to explain non-obvious purpose, constraints, invariants, tradeoffs, or workarounds, not to narrate statements.
29
+
26
30
Keep naming conventions consistent within each code-owned object, schema, type, and module. Use `snake_case` for app-owned domain/data record fields and serialized form/store records; use `camelCase` for functions, variables, React/framework props and APIs, state, other code-owned object properties, and ordinary local `const` bindings; use `PascalCase` for types/components; and use `UPPER_SNAKE_CASE` for module-level constants, enum members, and lookup keys. Preserve externally defined names at the boundary, then map them once to the project's internal convention.
27
31
28
32
Name custom hooks as `useThing`, higher-order components as `withThing`, local event-handler functions as `handleThing`, and code-owned callback props with an `onThing` prefix. Prefix boolean props, state, and variables with `is`, `has`, or `should` when the prefix accurately describes their meaning.
0 commit comments