Repository navigation
Remove jsdom, fix lockfile - #314
Merged
Merged
Conversation
[1/4] Resolving packages... success Already up-to-date. Done in 0.39s. to fix lockfile
Mrtenz
pushed a commit
that referenced
this pull request
Oct 16, 2025
Mrtenz
pushed a commit
to Mrtenz/core
that referenced
this pull request
Jun 17, 2026
…ransactionByMinedTxHash" (MetaMask#314)
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
Bottom of stack MetaMask#315. Core formats with Oxfmt, so once this package moves into `packages/` its files get reformatted anyway. Doing it here keeps that diff reviewable instead of landing as noise on top of the migrated git history. - `lint:misc` switches from Prettier to `oxfmt --ignore-path .gitignore` - Adds `.oxfmtrc.json`, copied from core - Turns off `prettier/prettier` and `import/order`, same as core - Drops `prettier-plugin-packagejson`, replaced by Oxfmt's `sortPackageJson` Prettier itself stays, and moves to core's versions, because `@metamask/eslint-config@15` peer requires all three: | Dep | From | To | | --- | --- | --- | | `prettier` | `^2.7.1` | `^3.3.3` | | `eslint-config-prettier` | `^8.8.0` | `^9.1.0` | | `eslint-plugin-prettier` | `^4.2.1` | `^5.2.1` | Reformatting touches `README.md`, `src/json.ts` and `src/__fixtures__/bytes.ts`. No content changes.
Naz-Ovh
pushed a commit
to 0x-fork/metamask-core
that referenced
this pull request
Sep 13, 2026
) Stacked on MetaMask#314. Replaces `.eslintrc.js` with a flat `eslint.config.mjs` and moves the ESLint stack to core's versions. | Dep | From | To | | --- | --- | --- | | `eslint` | `^8.44.0` | `^9.39.1` | | `@metamask/eslint-config{,-jest,-nodejs,-typescript}` | `^12.0.0` | `^15.0.0` | | `@metamask/auto-changelog` | `^3.1.0` | `^6.1.0` | | `eslint-plugin-jest` | `^27.2.2` | `^28.8.3` | | `eslint-plugin-jsdoc` | `^39.9.1` | `^50.2.4` | | `eslint-plugin-n` | `^15.7.0` | `^17.10.3` | | `eslint-plugin-promise` | `^6.1.1` | `^7.1.0` | Drops `eslint-plugin-import` and `@typescript-eslint/{parser,eslint-plugin}` for `eslint-plugin-import-x` and `typescript-eslint`. Adds `@types/semver@^7`, which had been arriving transitively through `@typescript-eslint/eslint-plugin` and broke the build once that was removed. Config v15 surfaced 351 problems v12 never enforced. Stylistic ones are off with TODO comments, matching core. The rest were stale directives naming rules that typescript-eslint v8 renamed or removed, so the code under them was going unchecked: | Directive | Fate | Sites | | --- | --- | --- | | `@typescript-eslint/no-throw-literal` | renamed to `only-throw-error` | 8 | | `@typescript-eslint/ban-types` | split in v8, no longer needed here | 3 | | `import/no-nodejs-modules` | now `import-x/no-nodejs-modules` | 1 block | | `jest/no-if` | removed in eslint-plugin-jest v28 | 1 | Two autofixes are reverted because they changed behaviour rather than style: 1. `hasProperty`'s constraint was rewritten from `Object` to `object`. The original carried an explicit suppression, so `Object` was deliberate: it accepts boxed primitives, and narrowing it breaks callers passing a string or number. 2. `json.test-d.ts` lost `as any` and `as number | undefined` from its tsd assertions. In type tests the assertion is the test. `no-unnecessary-type-assertion` is now off for `*.test-d.ts`. `jsdoc/require-jsdoc` stays off rather than suppressed: its autofixer inserted 193 empty JSDoc blocks on the first pass. Core disables it for the same reason. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Large toolchain bump touches most of the repo; export and `toWei` parsing changes could affect consumers, though runtime logic changes appear limited and intentional. > > **Overview** > Migrates linting from **`.eslintrc.js` to flat `eslint.config.mjs`**, bumps **ESLint 8 → 9** and **`@metamask/eslint-config` v12 → v15**, and swaps **`eslint-plugin-import` / split `@typescript-eslint/*` for `eslint-plugin-import-x` and `typescript-eslint`**. The **`lint:eslint` script** drops `--ext js,ts`; **`@types/semver`** is added explicitly after dropping the old typescript-eslint transitive dep; **LavaMoat** allows **`eslint-plugin-import-x>unrs-resolver`**. > > The new config **turns off several JSDoc rules** (matching core, with TODOs), **disables `no-unnecessary-type-assertion` for `*.test-d.ts`**, and **relaxes Node builtin checks in tests** for crypto polyfill coverage. **`reportUnusedDisableDirectives: 'error'`** forces cleanup of stale eslint-disable comments across fixtures and tests. > > **Source edits** are mostly rule compliance: explicit return types, renamed disables (`only-throw-error`, `import-x/no-nodejs-modules`), **`uuid` named import** in `fs.ts`, **`export type *`** for type-only barrels, and typing tweaks in **`FrozenMap`/`FrozenSet`**. Two **autofix reversals** preserve behavior: **`hasProperty` keeps `Object`** (boxed primitives), and type-test assertions stay intact. **`toWei`** now treats **empty whole/fraction parts** (e.g. `.5`, `5.`) as **`0`**, not only `undefined`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4fb3fb67cedaefd87b9ece83cc53286a2bce1e82. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove
jsdomas explicit dependency (it's brought in by others), and fix the lockfile, which needed updating.