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.
feature/default_network_editable
Whymarrh Whitby 4 years ago committed by GitHub
parent c2edc342fb
commit aaacf66c6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .eslintrc.js
  2. 4
      test/unit/app/controllers/ens-controller-test.js

@ -49,6 +49,7 @@ module.exports = {
'guard-for-in': 'error', 'guard-for-in': 'error',
'implicit-arrow-linebreak': 'error', 'implicit-arrow-linebreak': 'error',
'import/extensions': ['error', 'never', { 'json': 'always' }], 'import/extensions': ['error', 'never', { 'json': 'always' }],
'import/no-extraneous-dependencies': 'error',
'max-statements-per-line': ['error', { 'max': 1 }], 'max-statements-per-line': ['error', { 'max': 1 }],
'no-case-declarations': 'error', 'no-case-declarations': 'error',
'no-constant-condition': 'error', 'no-constant-condition': 'error',

@ -1,7 +1,6 @@
import assert from 'assert' import assert from 'assert'
import sinon from 'sinon' import sinon from 'sinon'
import ObservableStore from 'obs-store' import ObservableStore from 'obs-store'
import HttpProvider from 'ethjs-provider-http'
import EnsController from '../../../../app/scripts/controllers/ens' import EnsController from '../../../../app/scripts/controllers/ens'
const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
@ -10,11 +9,10 @@ const ZERO_X_ERROR_ADDRESS = '0x'
describe('EnsController', function () { describe('EnsController', function () {
describe('#constructor', function () { describe('#constructor', function () {
it('should construct the controller given a provider and a network', async 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 currentNetworkId = '3'
const networkStore = new ObservableStore(currentNetworkId) const networkStore = new ObservableStore(currentNetworkId)
const ens = new EnsController({ const ens = new EnsController({
provider, provider: { },
networkStore, networkStore,
}) })

Loading…
Cancel
Save