docs: add inline JS exception to guidelines
Inline JS function calls in HTML attributes (e.g., onclick="myFunction()") are acceptable for simple interactions
This commit is contained in:
1 parent
d0a2042344
commit
a47ef18669
1 file changed
+1
@@ -28,6 +28,7 @@
|
||||
- ❌ **NEVER use custom CSS** - TailwindCSS classes only
|
||||
- **⚠️ EXCEPTION**: `templates/error.templ` may have inline CSS because error pages must work when main app fails (404, server errors, CSS fails to load)
|
||||
- ❌ **NEVER use JavaScript** - convert all to TypeScript
|
||||
- **⚠️ EXCEPTION**: Inline JS function calls in HTML attributes (e.g., `onclick="myFunction()"`) are acceptable for simple interactions
|
||||
- ❌ **NEVER use Object-Oriented Programming** (no classes, inheritance, or this-capture)
|
||||
- ✅ **DO use procedural/imperative style** as your default
|
||||
- ✅ **DO borrow functional techniques** when they simplify code
|
||||
|
||||
Reference in new issue
Block a user