Skip to content

Conversation

@aryelu
Copy link
Owner

@aryelu aryelu commented Dec 24, 2025

Implements a new ESLint rule that enforces maximum nesting depth for
control structures (if, for, while, switch, try, etc.). Deep nesting
makes code difficult to read and maintain.

Features:

  • Configurable max depth (default: 3)
  • Functions reset nesting depth (encourages extraction)
  • Optional IIFE handling with ignoreTopLevelIIFE option
  • Comprehensive test coverage with 24 test cases

This rule complements existing rules like no-complex-conditionals and
low-function-cohesion to promote maintainable, readable code.

Implements a new ESLint rule that enforces maximum nesting depth for
control structures (if, for, while, switch, try, etc.). Deep nesting
makes code difficult to read and maintain.

Features:
- Configurable max depth (default: 3)
- Functions reset nesting depth (encourages extraction)
- Optional IIFE handling with ignoreTopLevelIIFE option
- Comprehensive test coverage with 24 test cases

This rule complements existing rules like no-complex-conditionals and
low-function-cohesion to promote maintainable, readable code.
@aryelu aryelu force-pushed the claude/eslint-rules-review-hkDSR branch from 40a07b1 to e4c7f46 Compare December 24, 2025 05:21
@aryelu aryelu merged commit f740441 into main Dec 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants