From a8479e4a0ee86a33e93d9a969bc366476026e9cf Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Wed, 10 Feb 2021 01:28:10 -0500 Subject: [PATCH] lint: Fix some ESLint errors in pluginfw --- src/static/js/pluginfw/installer.js | 8 ++++---- src/static/js/pluginfw/plugins.js | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/static/js/pluginfw/installer.js b/src/static/js/pluginfw/installer.js index ae5c06e10..a0f60d825 100644 --- a/src/static/js/pluginfw/installer.js +++ b/src/static/js/pluginfw/installer.js @@ -21,15 +21,15 @@ const onAllTasksFinished = () => { let tasks = 0; -function wrapTaskCb(cb) { +const wrapTaskCb = (cb) => { tasks++; - return function (...args) { - cb && cb.apply(this, args); + return (...args) => { + cb && cb(...args); tasks--; if (tasks === 0) onAllTasksFinished(); }; -} +}; exports.uninstall = async (pluginName, cb = null) => { cb = wrapTaskCb(cb); diff --git a/src/static/js/pluginfw/plugins.js b/src/static/js/pluginfw/plugins.js index 48ae4c92b..7a01d4242 100644 --- a/src/static/js/pluginfw/plugins.js +++ b/src/static/js/pluginfw/plugins.js @@ -5,9 +5,6 @@ const hooks = require('./hooks'); const path = require('path'); const runNpm = require('../../../node/utils/run_npm'); const tsort = require('./tsort'); -const util = require('util'); -const settings = require('../../../node/utils/Settings'); - const pluginUtils = require('./shared'); const defs = require('./plugin_defs');