Skip to content

Conversation

@cryptotavares
Copy link
Contributor

@cryptotavares cryptotavares commented Jan 7, 2026

Description

This PR addresses the new ESLint rule @typescript-eslint/naming-convention that was introduced in PR #32106 to prevent snake_case naming.

Instead of having many individual // eslint-disable-next-line @typescript-eslint/naming-convention comments scattered throughout files (primarily metrics-related files that use snake_case for analytics properties), this change consolidates them into a single file-level /* eslint-disable @typescript-eslint/naming-convention */ directive for files with more than 5 occurrences.

Changes:

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4992

Manual testing steps

  1. Run yarn lint to verify ESLint passes
  2. Verify the modified files still have proper snake_case naming allowed where needed

Screenshots/Recordings

Not applicable - code cleanup only.

Before

Files had many repeated inline disable comments:

// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31860
// eslint-disable-next-line @typescript-eslint/naming-convention
account_snap_type: 'snaptype',
// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31860
// eslint-disable-next-line @typescript-eslint/naming-convention
account_snap_version: 'snapversion',

After

Single file-level disable at the top:

// TODO: Fix in https://github.com/MetaMask/metamask-extension/issues/31860
/* eslint-disable @typescript-eslint/naming-convention */
import { ... } from '...';

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Streamlines lint suppression for snake_case analytics fields without changing runtime behavior.

  • Adds /* eslint-disable @typescript-eslint/naming-convention */ (with issue TODO) at top of files with many occurrences; removes per-line disables in transaction-data.tsx, simulation and alert metrics hooks/tests, and transaction metrics tests
  • No logic changes; only comment/lint directive consolidation to reduce noise

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

…th file-level disables

Convert files with >5 `eslint-disable-next-line @typescript-eslint/naming-convention`
comments to use a single file-level `/* eslint-disable */` directive instead.

This reduces code noise while maintaining the same ESLint behavior for files
that heavily use snake_case naming (primarily metrics-related files).
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-product-safety Push issues to Product Safety team label Jan 7, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 7, 2026

✨ Files requiring CODEOWNER review ✨

@MetaMask/confirmations (8 files, +15 -317)
  • 📁 app/
    • 📁 scripts/
      • 📁 lib/
        • 📁 transaction/
          • 📄 metrics.test.ts +1 -166
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 components/
          • 📁 confirm/
            • 📁 info/
              • 📁 shared/
                • 📁 transaction-data/
                  • 📄 transaction-data.tsx +2 -14
          • 📁 simulation-details/
            • 📄 useSimulationMetrics.test.ts +2 -24
            • 📄 useSimulationMetrics.ts +2 -18
        • 📁 hooks/
          • 📁 alerts/
            • 📄 useShieldCoverageAlert.test.ts +2 -15
            • 📄 useConfirmationAlertMetrics.test.ts +2 -28
            • 📄 useConfirmationAlertMetrics.ts +2 -26
            • 📄 useDecodedSignatureMetrics.test.ts +2 -26

🔐 @MetaMask/web3auth (1 files, +2 -15)
  • 📁 ui/
    • 📁 pages/
      • 📁 confirmations/
        • 📁 hooks/
          • 📁 alerts/
            • 📄 useShieldCoverageAlert.test.ts +2 -15

@github-actions github-actions bot added the size-M label Jan 7, 2026
@cryptotavares cryptotavares marked this pull request as ready for review January 7, 2026 19:44
@cryptotavares cryptotavares requested review from a team as code owners January 7, 2026 19:44
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Jan 7, 2026

Builds ready [658372d]
UI Startup Metrics (1253 ± 104 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1253999170610413201378
load105384114249811211187
domContentLoaded104683514159711101179
domInteractive2614128212280
firstPaint2035814342311881019
backgroundConnect20418025312209229
firstReactRender1583551725
getState351876124261
initialActions107113
loadScripts849651121798909989
setupStore1272951325
numNetworkReqs181176191173
BrowserifyPower User HomeuiStartup17691313246220718532187
load1074886137411411631269
domContentLoaded1063878134611411571261
domInteractive3417235352897
firstPaint189711367201212382
backgroundConnect23919956849244286
firstReactRender14112421619
getState16812427731184240
initialActions103112
loadScripts84667611281109361045
setupStore1764791738
numNetworkReqs65541401762117
WebpackStandard HomeuiStartup8136621074868431002
load65458587873686815
domContentLoaded64958187372680811
domInteractive2615116202282
firstPaint1126035662153253
backgroundConnect255110253682
firstReactRender16113751728
getState321575134258
initialActions103112
loadScripts64557886471677803
setupStore1474491440
numNetworkReqs171174171167
WebpackPower User HomeuiStartup1187934194418312391574
load7215891194102809892
domContentLoaded7145841178101799885
domInteractive30171312625107
firstPaint1326138873184309
backgroundConnect57656710965480
firstReactRender16133331720
getState14912921314156175
initialActions102011
loadScripts7115821168100792878
setupStore1394271336
numNetworkReqs66511992361125
FirefoxBrowserifyStandard HomeuiStartup14001109223919715201772
load1122944191015311901388
domContentLoaded1122939191015411901388
domInteractive69311633791147
firstPaint------
backgroundConnect59162465467195
firstReactRender12104341316
getState166195261328
initialActions103122
loadScripts1088928188713511441302
setupStore155189221253
numNetworkReqs19978191474
BrowserifyPower User HomeuiStartup26131531352954430733313
load1686987264457923102522
domContentLoaded1686987264457923042522
domInteractive84344197784302
firstPaint------
backgroundConnect41429123446210781174
firstReactRender221271112553
getState985622829101156
initialActions203123
loadScripts1334967239738113712247
setupStore605112017927198
numNetworkReqs75541582893142
WebpackStandard HomeuiStartup15071221229216515771809
load1266108115369913271462
domContentLoaded1265108115369913271462
domInteractive72271973891141
firstPaint------
backgroundConnect52191713461127
firstReactRender1611132121522
getState167101131640
initialActions103122
loadScripts1236106715019012891412
setupStore165168241257
numNetworkReqs19976181573
WebpackPower User HomeuiStartup27191636391056631463424
load20511183314355425342709
domContentLoaded20501182313855425342709
domInteractive73283556171219
firstPaint------
backgroundConnect3612012224024111185
firstReactRender2113158162233
getState113571140110114174
initialActions217123
loadScripts17631160297745122502435
setupStore324106110918101
numNetworkReqs75501713184150
📊 Page Load Benchmark Results

Current Commit: 658372d | Date: 1/7/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±39ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 730ms (±37ms) 🟢 | historical mean value: 723ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±12ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 39ms 1.02s 1.34s 1.08s 1.34s
domContentLoaded 730ms 37ms 710ms 1.01s 750ms 1.01s
firstPaint 78ms 12ms 60ms 180ms 88ms 180ms
firstContentfulPaint 78ms 12ms 60ms 180ms 88ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 96 Bytes (0%)
  • ui: 343 Bytes (0%)
  • common: 20 Bytes (0%)

@cryptotavares cryptotavares added this pull request to the merge queue Jan 9, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 9, 2026
@cryptotavares cryptotavares added this pull request to the merge queue Jan 9, 2026
@HowardBraham HowardBraham removed this pull request from the merge queue due to a manual request Jan 10, 2026
@HowardBraham HowardBraham added this pull request to the merge queue Jan 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 10, 2026
@HowardBraham HowardBraham added this pull request to the merge queue Jan 10, 2026
Merged via the queue into main with commit 44e05d9 Jan 10, 2026
346 of 349 checks passed
@HowardBraham HowardBraham deleted the cryptotavares/disable-snake-case-rule-at-file-level branch January 10, 2026 03:41
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2026
@metamaskbot metamaskbot added the release-13.15.0 Issue or pull request that will be included in release 13.15.0 label Jan 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.15.0 Issue or pull request that will be included in release 13.15.0 size-M team-product-safety Push issues to Product Safety team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants