Skip to content

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Dec 11, 2025

Explanation

This fixes all suppressed ESLint errors in the network-controller package.

References

Closes #7377.

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
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Adds explicit return types and stricter typings throughout network controller, network client creation, and RPC service code (plus tests), with minor internal refactors and no intended behavior changes.

  • Network Controller
    • Add explicit return types to methods (enableRpcFailover, lookupNetwork, setProviderType, etc.) and helpers (isValidUrl, validateInitialState, knownKeysOf).
    • Type selectors and proxies; annotate selectNetworkConfigurationsByChainId return; initialize networksMetadata via ??=.
    • Refactor updateNetwork RPC endpoint ops: reorder add/replace branches; no logic change intended.
    • Overload/return typing for initializeProvider; tighten private method signatures and event listener types.
    • JSDoc/lint adjustments (e.g., EIPS naming convention suppression).
  • Network Client Creation
    • Strongly type createAutoManagedNetworkClient proxies and options; default getBlockTrackerOptions typing.
    • Add return types and stricter generics in create-network-client helpers (block tracker, middleware, RPC chain).
  • RPC Service/Chain
    • Type event registration methods to return disposable handles; expose concrete return types; import IDisposable.
    • Add explicit types for utility functions and public methods (resetPolicy, getCircuitState, event hooks).
  • Tests & Helpers
    • Update tests to use PollingBlockTrackerOptions, RpcServiceOptions, SinonFakeTimers, Json; fix promisify binding for ethQuery.sendAsync.
    • Add precise function return types and narrow generics in test utilities; minor eslint disables where needed.

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

@Mrtenz Mrtenz marked this pull request as ready for review December 11, 2025 13:07
@Mrtenz Mrtenz requested review from a team as code owners December 11, 2025 13:07
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.

Fix suppressed lint errors in network-controller

2 participants