From aaacf66c6efe95947223539efbc9d01e49db3149 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Fri, 14 Aug 2020 17:34:56 -0230 Subject: [PATCH] Fix import/no-extraneous-dependencies issues (#9232) See [`import/no-extraneous-dependencies`](https://eslint.org/docs/rules/import/no-extraneous-dependencies) for more information. This change enables `import/no-extraneous-dependencies` and fixes the issues raised by the rule. --- .eslintrc.js | 1 + test/unit/app/controllers/ens-controller-test.js | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2f5e14f17..6c5058390 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -49,6 +49,7 @@ module.exports = { 'guard-for-in': 'error', 'implicit-arrow-linebreak': 'error', 'import/extensions': ['error', 'never', { 'json': 'always' }], + 'import/no-extraneous-dependencies': 'error', 'max-statements-per-line': ['error', { 'max': 1 }], 'no-case-declarations': 'error', 'no-constant-condition': 'error', diff --git a/test/unit/app/controllers/ens-controller-test.js b/test/unit/app/controllers/ens-controller-test.js index 1176b8b42..cf57bdf1f 100644 --- a/test/unit/app/controllers/ens-controller-test.js +++ b/test/unit/app/controllers/ens-controller-test.js @@ -1,7 +1,6 @@ import assert from 'assert' import sinon from 'sinon' import ObservableStore from 'obs-store' -import HttpProvider from 'ethjs-provider-http' import EnsController from '../../../../app/scripts/controllers/ens' const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' @@ -10,11 +9,10 @@ const ZERO_X_ERROR_ADDRESS = '0x' describe('EnsController', function () { describe('#constructor', function () { it('should construct the controller given a provider and a network', async function () { - const provider = new HttpProvider('https://ropsten.infura.io') const currentNetworkId = '3' const networkStore = new ObservableStore(currentNetworkId) const ens = new EnsController({ - provider, + provider: { }, networkStore, })