Skip to content

Conversation

@mcmire
Copy link
Contributor

@mcmire mcmire commented Nov 3, 2025

Explanation

Existing lint warnings within the network-controller package were making it difficult to identify new warnings. This commit resolves all of them. There should be no network-controller warnings listed in eslint-warning-thresholds.json.

References

(N/A)

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Eliminates network-controller ESLint warnings by tweaking error handling, promise usage, and tests, and removing the package’s entries from eslint-warning-thresholds.json.

  • Lint thresholds:
    • Remove all packages/network-controller/* entries from eslint-warning-thresholds.json.
  • Network controller (packages/network-controller/src/NetworkController.ts):
    • Add comment and inline disable to allow rejecting non-Error from JsonRpcEngine in #getLatestBlock.
  • Tests (packages/network-controller/tests/NetworkController.test.ts):
    • Use bare catch {} where the error value is unused.
    • Await blockTracker?.destroy() to avoid floating-promise warning.
    • Reject with new Error(...) and coerce eventType via String(eventType) to satisfy template and type rules.

Written by Cursor Bugbot for commit d6d3ef7. This will update automatically on new commits. Configure here.

Existing lint warnings within the `network-controller` package were
making it difficult to identify new warnings. This commit resolves all
of them. There should be no `network-controller` warnings listed in
`eslint-warning-thresholds.json`.
@mcmire
Copy link
Contributor Author

mcmire commented Nov 3, 2025

Adding no-changelog because none of these changes are user-facing.

@mcmire mcmire marked this pull request as ready for review November 3, 2025 19:19
@mcmire mcmire requested review from a team as code owners November 3, 2025 19:19
Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

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

LGTM!

@mcmire mcmire enabled auto-merge (squash) November 3, 2025 19:23
@mcmire mcmire merged commit f070663 into main Nov 3, 2025
259 checks passed
@mcmire mcmire deleted the fix-nc-lint-warnings branch November 3, 2025 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants