Files
main/rules-v0/github-cursorrules-prompt-file-instructions/conditional-encapsulation.mdc
T
2025-02-27 00:04:07 +05:30

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.