BMAD-METHOD/.claude/rules/github-cursorrules-prompt-f.../conditional-encapsulation.mdc

6 lines
374 B
Plaintext

---
description: This rule enforces encapsulating nested conditionals into functions to improve clarity.
globs: **/*.*
---
- One way to improve the readability and clarity of functions is to encapsulate nested if/else statements into other functions.
- Encapsulating such logic into a function with a descriptive name clarifies its purpose and simplifies code comprehension.