Skip to content

Conversation

@Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Feb 11, 2021

This update includes the update from eslint v6 to v7. In this release the Node.js-specific rules were broken out into a separate plugin (eslint-plugin-node), which is now also required.

Any broken rules have been temporarily disabled, to be addressed in a future PR.

This update includes the update from `eslint` v6 to v7. In this
release the Node.js-specific rules were broken out into a separate
plugin (`eslint-plugin-node`), which is now also required.

Any broken rules have been temporarily disabled, to be addressed in a
future PR.
@Gudahtt Gudahtt requested a review from a team as a code owner February 11, 2021 14:46
@Gudahtt Gudahtt merged commit 123f864 into develop Feb 11, 2021
@Gudahtt Gudahtt deleted the update-eslint-config-v4 branch February 11, 2021 15:55
rickycodes added a commit that referenced this pull request Feb 18, 2021
…ba into feature/migrate-to-etherscan

* 'feature/migrate-to-etherscan' of github.com:MetaMask/gaba:
  Update `sinon` and `@types/sinon` to latest versions (#352)
  Fix `tsconfig.json` indentation (#355)
  Replace `fetch-mock` with `nock` (#340)
  Update `ethereumjs-wallet` from v0.6.5 to v1.0.1 (#347)
  Add `babel-runtime` dependency required by `ethjs-query` (#341)
  Update `@metamask/eslint-config` from v3 to v4.1.0 (#344)
  Add `docs` to list of ignored eslint patterns (#345)
  Update `uuid` from `v3.3.3` to `v8.3.2` (#346)
  Update approval controller test import (#339)
  Add Dependabot config (#343)
  Update `typedoc` (#342)
  Remove unused test module (#338)
  Replace `await-semaphore` with `async-mutex` (#334)
  Update `eth-json-rpc-filters` in lockfile (#336)
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
This update includes the update from `eslint` v6 to v7. In this
release the Node.js-specific rules were broken out into a separate
plugin (`eslint-plugin-node`), which is now also required.

Any broken rules have been temporarily disabled, to be addressed in a
future PR.
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
This update includes the update from `eslint` v6 to v7. In this
release the Node.js-specific rules were broken out into a separate
plugin (`eslint-plugin-node`), which is now also required.

Any broken rules have been temporarily disabled, to be addressed in a
future PR.
Mrtenz pushed a commit that referenced this pull request Oct 16, 2025
…ut` (#346)

The timeout recorder utility used in unit tests could accidentally allow
a test to insert synchronous code after a `setTimeout` was resolved. The
methods to allow waiting for a pending `setTimeout` to execute didn't
clear pending Promises, so the code following those calls in a test
would run _immediately_ after the timeout was resolved, which normally
would not be possible for an external caller.

The code-under-test may (correctly) assume that a caller cannot run code
after a `setTimeout` resolves before it can. Tests that violate this
assumption unintentionally serve no practical purpose, and may be
confusing for contributors or require complex workarounds. This exact
problem cropped up in another draft PR currently open, #344.

To prevent this, pending Promises are resolved before returning when
waiting for a `setTimeout` to resolve.

Additionally, pending Promises are now also resolved before the
`setTimeout` callback, again to better reflect what would happen in a
real scenario.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Ensure the test timeout recorder resolves pending timers/promises
after executing a queued setTimeout callback to avoid synchronous code
running immediately after.
> 
> - **Tests**:
>   - **`tests/recordCallsToSetTimeout.ts`**:
> - `SetTimeoutRecorder.next` and `nextMatchingDuration` now await the
internal promise and then call `jest.runOnlyPendingTimersAsync()` to
flush pending timers/promises.
> - Prevents tests from inserting synchronous code immediately after a
`setTimeout` callback executes.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
501ad5c6f10ce68ff9eafb09e403c8b63b932e37. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Mrtenz pushed a commit that referenced this pull request Oct 16, 2025
---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
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.

3 participants