1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/test/unit/app/controllers
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
..
transactions Validate txParams in TransactionStateManager.addTx (#6713) 2019-06-29 00:51:51 +02:00
cached-balances-test.js Save recent network balances in local storage (#5843) 2018-11-30 14:51:24 -08:00
detect-tokens-test.js Implement latest EIP-712 protocol 2018-09-13 15:40:57 -04:00
infura-controller-test.js feature: add Goerli support (#6459) 2019-04-17 15:04:49 -02:30
metamask-controller-test.js Declare variables before use (#6806) 2019-07-05 14:01:34 -03:00
network-contoller-test.js feature: add Goerli support (#6459) 2019-04-17 15:04:49 -02:30
preferences-controller-test.js New settings custom rpc form (#6490) 2019-05-09 14:57:14 -02:30
token-rates-controller.js Update Balanc3 API (#5744) 2018-11-13 14:57:43 -05:00