Prompt
Choose descriptive names that clearly convey purpose while avoiding conflicts with existing APIs, built-in functions, or established conventions. Names should follow consistent patterns across the codebase and use appropriate spelling conventions.
Key principles:
- Prefer descriptive names over abbreviated ones (e.g.,
dehydratedRouterinstead ofr) - Avoid conflicts with built-in functions (e.g.,
fetchAndResolveInLoaderLifetimeinstead offetch) - Don’t clash with framework conventions (e.g.,
getSupabaseServerinstead ofuseSupabasefor non-hooks) - Follow established naming patterns in the codebase (e.g.,
disableManifestGenerationto matchdisableTypes) - Use consistent spelling conventions (e.g., US spelling:
behaviornotbehaviour) - Choose meaningful variable names that reflect their content (e.g.,
derivedinstead ofpaths)
Example:
// ❌ Avoid: Abbreviated, conflicts with built-in
const r = getRouter()
const fetch = async () => { ... }
// ✅ Good: Descriptive, conflict-free
const dehydratedRouter = getRouter()
const fetchAndResolveInLoaderLifetime = async () => { ... }
// ❌ Avoid: Misleading naming pattern
export function useSupabase() { /* not a hook */ }
// ✅ Good: Clear, follows conventions
export function getSupabaseServer() { /* server utility */ }