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
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
..
controllers Declare variables before use (#6806) 2019-07-05 14:01:34 -03:00
account-import-strategies.spec.js fix warning for unit tests 2018-07-02 20:12:50 -04:00
buy-eth-url.spec.js Replaces the coinbase link in the deposit modal with one for wyre (#6302) 2019-03-22 12:32:07 -02:30
cleanErrorStack.spec.js Some Ui tests 2018-09-24 11:28:04 -05:00
ComposableObservableStore.js Moved loose some loose test files to sub folders 2018-05-21 05:59:26 -07:00
edge-encryptor-test.js Check for unused function arguments (#6583) 2019-05-08 15:51:33 -04:00
message-manager-test.js Moved loose some loose test files to sub folders 2018-05-21 05:59:26 -07:00
nodeify-test.js lint fix 2019-03-29 12:51:54 +08:00
pending-balance-test.js fix warning for unit tests 2018-07-02 20:12:50 -04:00
personal-message-manager-test.js Moved loose some loose test files to sub folders 2018-05-21 05:59:26 -07:00
seed-phrase-verifier-test.js fix warning for unit tests 2018-07-02 20:12:50 -04:00
util-test.js eslint --fix . 2018-07-02 18:49:33 -04:00