mirror of
https://fastgit.cc/https://github.com/anomalyco/opencode
synced 2026-04-21 21:31:53 +08:00
447 B
447 B
Style Guide
- Try to keep things in one function unless composable or reusable
- AVOID unnecessary destructuring of variables. instead of doing
const { a, b } = objjust reference it as obj.a and obj.b. this preserves context - AVOID
try/catchwhere possible - AVOID
elsestatements - AVOID using
anytype - AVOID
letstatements - PREFER single word variable names where possible
- Use as many bun apis as possible like Bun.file()