Fix prefer-spread issues (#9203)

See [`prefer-spread`](https://eslint.org/docs/rules/prefer-spread) for more information.

This change enables `prefer-spread` and fixes the issues raised by the rule.
feature/default_network_editable
Whymarrh Whitby 4 years ago committed by GitHub
parent 310b15ba4a
commit 76bd7f98b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .eslintrc.js
  2. 2
      app/scripts/account-import-strategies/index.js

@ -54,6 +54,7 @@ module.exports = {
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'prefer-spread': 'error',
/* End v2 rules */
'arrow-parens': 'error',
'no-tabs': 'error',

@ -8,7 +8,7 @@ const accountImporter = {
importAccount (strategy, args) {
try {
const importer = this.strategies[strategy]
const privateKeyHex = importer.apply(null, args)
const privateKeyHex = importer(...args)
return Promise.resolve(privateKeyHex)
} catch (e) {
return Promise.reject(e)

Loading…
Cancel
Save