Skip to content

Commit 7e77d53

Browse files
ccharlydanroc
andauthored
chore: update tooling (same as core) (#517)
Using new tooling (same as `core`). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Tooling changes upgrade ESLint to v9 and replace Prettier-driven misc linting with `oxfmt`, which can change lint/format outputs and CI behavior across the monorepo. Functional code changes are minimal (mostly import/type-only cleanups), but review should confirm the new lint/suppression setup matches current expectations. > > **Overview** > Switches from legacy `.eslintrc.js` to an ESLint v9 flat config in `eslint.config.mjs`, including `projectService` TypeScript parsing, targeted overrides, and a new `eslint-suppressions.json` for managed rule suppressions. > > Adopts `oxfmt` for misc formatting (`.oxfmtrc.json`) and updates root scripts (e.g., `lint:*`, `create-release-branch`, build cleanup), while upgrading core tooling deps (ESLint 9, Prettier 3, `@metamask/eslint-config` v15) and dropping `syncpack`-based dependency mismatch checks. > > Across packages, normalizes `package.json` publish metadata (`files`, `main`/`types`, `publishConfig`, `tsd` config) and applies mostly non-functional code churn (import ordering, `import type`, removing inline eslint-disable comments, small readability tweaks). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 32dfc96. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Daniel Rocha <68558152+danroc@users.noreply.github.com>
1 parent 842a3e1 commit 7e77d53

126 files changed

Lines changed: 3556 additions & 2079 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 0 additions & 259 deletions
This file was deleted.

.oxfmtrc.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 80,
4+
"quoteProps": "as-needed",
5+
"singleQuote": true,
6+
"sortImports": {
7+
"newlinesBetween": false,
8+
"groups": [
9+
["builtin", "external"],
10+
{ "newlinesBetween": true },
11+
["internal", "parent", "sibling", "index", "unknown"]
12+
]
13+
},
14+
"tabWidth": 2,
15+
"trailingComma": "all",
16+
"ignorePatterns": [
17+
"**/*-method-action-types.ts",
18+
".yarnrc.yml",
19+
"merged-packages/**",
20+
"CHANGELOG.md"
21+
]
22+
}

.prettierrc.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
// All of these are defaults except singleQuote, but we specify them
2-
// for explicitness
1+
/**
2+
* @type {import('prettier').Options}
3+
*/
34
module.exports = {
5+
// All of these are defaults except singleQuote, but we specify them
6+
// for explicitness
47
quoteProps: 'as-needed',
58
singleQuote: true,
69
tabWidth: 2,

.syncpackrc

Lines changed: 0 additions & 71 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"cSpell.words": ["bech32", "p2wpkh", "syncpack"]
2+
"cSpell.words": ["bech32", "p2wpkh"]
33
}

AGENTS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ yarn dedupe
165165

166166
- Use workspace protocol for internal dependencies: `"@metamask/keyring-api": "workspace:^"`
167167
- Run `yarn lint:dependencies:fix` after adding/updating packages
168-
- Check `syncpack` for version consistency across packages
169168

170169
---
171170

@@ -453,11 +452,13 @@ enum AccountType {
453452
}
454453

455454
// ❌ WRONG: Plural enum names
456-
enum EthMethods { // Don't use plural
455+
enum EthMethods {
456+
// Don't use plural
457457
SignTransaction = 'eth_signTransaction',
458458
}
459459

460-
enum AccountTypes { // Don't use plural
460+
enum AccountTypes {
461+
// Don't use plural
461462
Eoa = 'eoa',
462463
}
463464

0 commit comments

Comments
 (0)