mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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:
parent
146127c474
commit
82a0ee27f3
@ -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',
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user