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:
parent
310b15ba4a
commit
76bd7f98b6
@ -54,6 +54,7 @@ module.exports = {
|
|||||||
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
|
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
|
||||||
'no-useless-catch': 'error',
|
'no-useless-catch': 'error',
|
||||||
'no-useless-concat': 'error',
|
'no-useless-concat': 'error',
|
||||||
|
'prefer-spread': 'error',
|
||||||
/* End v2 rules */
|
/* End v2 rules */
|
||||||
'arrow-parens': 'error',
|
'arrow-parens': 'error',
|
||||||
'no-tabs': 'error',
|
'no-tabs': 'error',
|
||||||
|
@ -8,7 +8,7 @@ const accountImporter = {
|
|||||||
importAccount (strategy, args) {
|
importAccount (strategy, args) {
|
||||||
try {
|
try {
|
||||||
const importer = this.strategies[strategy]
|
const importer = this.strategies[strategy]
|
||||||
const privateKeyHex = importer.apply(null, args)
|
const privateKeyHex = importer(...args)
|
||||||
return Promise.resolve(privateKeyHex)
|
return Promise.resolve(privateKeyHex)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Promise.reject(e)
|
return Promise.reject(e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user