Fixed broken conditional logic in JavaScript validation that was causing false positives on every single line of JS files. Problem: - Malformed ternary expression with 'if' inside condition - 'else True' caused every line WITHOUT 'window.apiClient' to trigger - Result: 3,144 violations (mostly false positives) Solution: - Simplified conditional to check if 'window.apiClient' exists first - Then check if it's not in a comment - Clearer, more maintainable logic Results: - Before: 3,144 total violations (3,000+ false JS-001 violations) - After: 184 total violations (all legitimate) - JS-001 violations: 0 (correct - no actual window.apiClient usage) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
27 KiB
Executable File
27 KiB
Executable File