UNPKG

@sun-asterisk/sunlint

Version:

☀️ SunLint - Multi-language static analysis tool for code quality and security | Sun* Engineering Standards

21 lines (20 loc) 619 B
{ "ruleId": "C008", "name": "Minimize Variable Scope - Declare Near Usage", "description": "Variables should be declared as close as possible to where they are first used to improve code locality and reduce cognitive load", "category": "code-quality", "severity": "warning", "languages": ["typescript", "javascript"], "enabled": true, "metadata": { "tags": ["readability", "maintainability", "best-practice"], "principleId": "CODE_QUALITY", "version": "1.0.0", "status": "active" }, "options": { "maxLineDistance": 10, "allowTopOfBlock": true, "ignoreConst": false } }