- Only create an abstraction if it’s actually needed
- Prefer clear function/variable names over inline comments
- Avoid helper functions when a simple inline expression would suffice
- Use
knipto remove unused code if making large changes - The
ghCLI is installed, use it - Don't use emojis
- Avoid massive JSX blocks and compose smaller components
- Colocate code that changes together
- Avoid
useEffectunless absolutely needed
- Mostly use built-in values, occasionally allow dynamic values, rarely globals
- Always use v4 + global CSS file format + shadcn/ui
- Prefer fetching data in RSC (page can still be static)
- Use next/font + next/script when applicable
- next/image above the fold should have
sync/ useprioritysparingly - Be mindful of serialized prop size for RSC -> child components
- Don’t unnecessarily add
try/catch - Don’t cast to
any