mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +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-prototype-builtins': 'error',
|
||||||
'no-useless-catch': 'error',
|
'no-useless-catch': 'error',
|
||||||
'no-useless-concat': 'error',
|
'no-useless-concat': 'error',
|
||||||
|
'prefer-rest-params': 'error',
|
||||||
'prefer-spread': 'error',
|
'prefer-spread': 'error',
|
||||||
/* End v2 rules */
|
/* End v2 rules */
|
||||||
'arrow-parens': 'error',
|
'arrow-parens': 'error',
|
||||||
|
@ -15,9 +15,7 @@ const callbackNoop = function (err) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export default function nodeify (fn, context) {
|
export default function nodeify (fn, context) {
|
||||||
return function () {
|
return function (...args) {
|
||||||
// parse arguments
|
|
||||||
const args = [].slice.call(arguments)
|
|
||||||
const lastArg = args[args.length - 1]
|
const lastArg = args[args.length - 1]
|
||||||
const lastArgIsCallback = typeof lastArg === 'function'
|
const lastArgIsCallback = typeof lastArg === 'function'
|
||||||
let callback
|
let callback
|
||||||
|
Loading…
Reference in New Issue
Block a user