1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

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.
This commit is contained in:
Whymarrh Whitby 2020-08-12 20:42:07 -02:30 committed by GitHub
parent 310b15ba4a
commit 76bd7f98b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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',

View File

@ -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)