Skip to content

Commit 80f46fc

Browse files
AGENTS: Add Frontend Common Pitfalls
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent a8b2d98 commit 80f46fc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

AGENTS.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,16 @@ This enforces: Black formatting, isort imports, pylint, ruff, mypy strict mode,
104104
105105
## Common Pitfalls
106106

107+
### Backend
107108
1. **Adding new dependencies without checking pyproject.toml** - Use what exists
108109
2. **Creating aiohttp sessions per request** - Reuse sessions or use context managers
109110
3. **Forgetting to register service** - Must update pyproject.toml, start-blueos-core, AND nginx.conf
110111
4. **Using blocking I/O** - Always use async versions (aiohttp, asyncio.create_subprocess_exec)
111-
5. **Skipping API versioning** - Always use `versioned_api_route(1, 0)` decorator
112+
5. **Skipping API versioning** - Always use `versioned_api_route(1, 0)` decorator
113+
114+
### Frontend
115+
1. **Hardcoded colors** - Always use Vuetify theme colors (`primary`, `success`, etc.)
116+
2. **Multiple components in one file** - ESLint enforces one component per `.vue` file
117+
3. **Forgetting cleanup** - Clear intervals/timeouts in `beforeDestroy()`, use `OneMoreTime` when possible
118+
4. **Direct property access** - Use object destructuring for cleaner code
119+
5. **Wrong import order** - Keep imports alphabetically sorted

0 commit comments

Comments
 (0)