Skip to content

Codacy: fix the browser error listener (rule crashed on it) - #3

Merged
ranjan-mohanty merged 1 commit into
mainfrom
codacy-handlers
Nov 15, 2026
Merged

ranjan-mohanty merged 1 commit into
mainfrom
codacy-handlers

Conversation

@ranjan-mohanty

Copy link
Copy Markdown
Contributor

Follow-up to #2. Codacy still listed 9 runway findings after #2, all pointing at the old code. Running the same rules locally (ESLint 8 with eslint-plugin-security-node and @typescript-eslint) showed why: detect-unhandled-event-errors crashes on an error listener with an expression body (() => info(...)), which likely stopped Codacy re-checking the files.

The listener now has a block body with console.error (what the rule accepts). With it, all 7 flagged files lint clean; with inline comments ignored, exactly the 7 annotated async-error findings come back, so those suppressions are what clears them, and the other two are fixed in the code.

npm run check passes.

🤖 Generated with Claude Code

…d on an expression body)

Validated with ESLint 8 + eslint-plugin-security-node, the rules Codacy runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

✅ No blocking issues noticed

No blocking findings were identified. No uncovered complex files or acceptance-criteria gaps were surfaced by the review agents.

Test suggestions

  • Verify that a child-process error triggers the fallback console error message.
  • Verify that synchronous spawn failures remain safely handled.
  • Run the relevant lint/check command and confirm the error-listener rule completes successfully.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that a child-process error triggers the fallback console error message.
2. Verify that synchronous spawn failures remain safely handled.
3. Run the relevant lint/check command and confirm the error-listener rule completes successfully.

TIP Add a Jira or Linear ticket key to the branch or title so the reviewer can check the PR against it. Using another tracker? Tell us.
TIP How was this review? Give us feedback

@ranjan-mohanty
ranjan-mohanty merged commit 8bbedf0 into main Nov 15, 2026
7 checks passed
@ranjan-mohanty
ranjan-mohanty deleted the codacy-handlers branch November 15, 2026 23:29
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.

1 participant