1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts
Mark Stacey 95f198550e
Declare variables before use (#6806)
While working on #6805, I noticed that many variables were being used
before they were declared. Technically this worked fine in practice
because we were using the `transform-es2015-block-scoping` Babel plugin,
which transforms `let` and `const` to `var`, which is hoisted. However,
after removing that Babel transformation, many things broke.

All instances of variables or classes being used before declared have
been fixed.

The `no-use-before-define` eslint rule has been added to catch these
cases going forward. The rule is disabled for function declarations for
the moment, because those are always hoisted. We could disable that too
if we want to, but it's purely stylistic and would require a lot more
changes.
2019-07-05 14:01:34 -03:00
..
account-import-strategies account-import-strategies - ensure privateKey is prefixed before converting to buffer 2018-06-13 21:06:33 -07:00
controllers Remove UiMigrationAnnouncement and associated state (#6794) 2019-07-04 12:21:21 -02:30
lib Declare variables before use (#6806) 2019-07-05 14:01:34 -03:00
migrations Check for unused function arguments (#6583) 2019-05-08 15:51:33 -04:00
platforms Refactor ProviderApprovalController to use rpc and publicConfigStore (#6410) 2019-05-03 13:32:05 -04:00
background.js Remove NoticeController (#6382) 2019-04-01 22:33:54 -02:30
chromereload.js Fix console.error references 2016-08-29 17:32:39 -07:00
contentscript.js Refactor ProviderApprovalController to use rpc and publicConfigStore (#6410) 2019-05-03 13:32:05 -04:00
createStandardProvider.js Refactor ProviderApprovalController to use rpc and publicConfigStore (#6410) 2019-05-03 13:32:05 -04:00
edge-encryptor.js Update asmcrypto.js to latest version (#6767) 2019-07-02 22:16:20 -03:00
first-time-state.js controllers - network - move default config out of first-time-state 2018-05-02 18:03:59 -07:00
inpage.js Declare variables before use (#6806) 2019-07-05 14:01:34 -03:00
metamask-controller.js Remove UiMigrationAnnouncement and associated state (#6794) 2019-07-04 12:21:21 -02:30
phishing-detect.js Update phishing-detect script to use ES6 destructuring requires 2019-02-12 10:36:15 -03:30
popup-core.js Update popup-core script to use ES6 destructuring, const, let 2019-02-12 10:36:15 -03:30
README.md add READMEs to folders, re #3427 2018-03-14 15:33:22 +02:00
ui.js Default to the new UI for all users 2019-02-05 08:49:55 -03:30

Main MetaMask Code

This folder contains the core-code.

Currently, it is organized mostly based on file category, like:

controllers, migrations, lib

Ongoing Task

Refactor code-structure, thus the subsystems are reflected on the filesystem.

Examples