summaryrefslogtreecommitdiffhomepage
path: root/STYLE_GUIDE.md
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2026-01-13 09:57:43 -0500
committerDax Raad <[email protected]>2026-01-13 09:58:08 -0500
commitc86c2acf4c0e0f9945b3dd83a1a32e1eb9783c86 (patch)
tree9ae36a9015fd3554cf5abc6f5b5395bcce4992c9 /STYLE_GUIDE.md
parent29bf731d47da1cda99de2c9890d525045b1bc8e8 (diff)
downloadopencode-c86c2acf4c0e0f9945b3dd83a1a32e1eb9783c86.tar.gz
opencode-c86c2acf4c0e0f9945b3dd83a1a32e1eb9783c86.zip
add fullscreen view to permission prompt
Diffstat (limited to 'STYLE_GUIDE.md')
-rw-r--r--STYLE_GUIDE.md21
1 files changed, 9 insertions, 12 deletions
diff --git a/STYLE_GUIDE.md b/STYLE_GUIDE.md
index a46ce221f..52d012fcb 100644
--- a/STYLE_GUIDE.md
+++ b/STYLE_GUIDE.md
@@ -1,19 +1,16 @@
## Style Guide
-- Try to keep things in one function unless composable or reusable
-- AVOID unnecessary destructuring of variables. instead of doing `const { a, b }
-= obj` just reference it as obj.a and obj.b. this preserves context
-- AVOID `try`/`catch` where possible
-- AVOID using `any` type
-- PREFER single word variable names where possible
-- Use as many bun apis as possible like Bun.file()
+- Keep things in one function unless composable or reusable
+- Avoid unnecessary destructuring. Instead of `const { a, b } = obj`, use `obj.a` and `obj.b` to preserve context
+- Avoid `try`/`catch` where possible
+- Avoid using the `any` type
+- Prefer single word variable names where possible
+- Use Bun APIs when possible, like `Bun.file()`
# Avoid let statements
-we don't like let statements, especially combined with if/else statements.
-prefer const
-
-This is bad:
+We don't like `let` statements, especially combined with if/else statements.
+Prefer `const`.
Good:
@@ -32,7 +29,7 @@ else foo = 2
# Avoid else statements
-Prefer early returns or even using `iife` to avoid else statements
+Prefer early returns or using an `iife` to avoid else statements.
Good: