1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Fix prefer-rest-params issues (#9215)

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

This change enables `prefer-rest-params` and fixes the issues raised by the rule.
This commit is contained in:
Whymarrh Whitby 2020-08-13 18:05:18 -02:30 committed by GitHub
parent 146127c474
commit 82a0ee27f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -60,6 +60,7 @@ module.exports = {
'no-prototype-builtins': 'error',
'no-useless-catch': 'error',
'no-useless-concat': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
/* End v2 rules */
'arrow-parens': 'error',

View File

@ -15,9 +15,7 @@ const callbackNoop = function (err) {
*
*/
export default function nodeify (fn, context) {
return function () {
// parse arguments
const args = [].slice.call(arguments)
return function (...args) {
const lastArg = args[args.length - 1]
const lastArgIsCallback = typeof lastArg === 'function'
let callback