Best Practices
Do
Use Flags Instead of Raw Conditions
Use Casing Helpers
Keep Templates Simple
Use Descriptive Aliases
Avoid
Complex Logic in Templates
❌ Bad:
✅ Good:
Deeply Nested Conditions
❌ Bad:
✅ Good:
Hardcoded Strings
❌ Bad:
✅ Good:
Mixed Concerns
❌ Bad:
✅ Good:
General Guidelines
- Use consistent naming conventions
- Prefer explicit conditions over implicit ones
- Keep templates focused on single responsibility
- Use comments for complex logic
- Test templates with various input contexts
- Maintain consistent indentation and formatting