From 3e78be371dc9f4cf3d32e49acb3bae83b7151323 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 19 Jan 2021 20:43:45 +0000 Subject: [PATCH] lint: fix errors and unfinished bits to now be finished --- src/static/js/pluginfw/installer.js | 8 ++++---- src/static/js/pluginfw/read-installed.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/static/js/pluginfw/installer.js b/src/static/js/pluginfw/installer.js index 559da9859..ae5c06e10 100644 --- a/src/static/js/pluginfw/installer.js +++ b/src/static/js/pluginfw/installer.js @@ -1,8 +1,8 @@ 'use strict'; const log4js = require('log4js'); -const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins'); -const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks'); +const plugins = require('./plugins'); +const hooks = require('./hooks'); const npm = require('npm'); const request = require('request'); const util = require('util'); @@ -24,8 +24,8 @@ let tasks = 0; function wrapTaskCb(cb) { tasks++; - return function (...arguments) { - cb && cb.apply(this, arguments); + return function (...args) { + cb && cb.apply(this, args); tasks--; if (tasks === 0) onAllTasksFinished(); }; diff --git a/src/static/js/pluginfw/read-installed.js b/src/static/js/pluginfw/read-installed.js index 52a1b60c3..027ec0dec 100644 --- a/src/static/js/pluginfw/read-installed.js +++ b/src/static/js/pluginfw/read-installed.js @@ -1,4 +1,4 @@ -'use strict' +'use strict'; // A copy of npm/lib/utils/read-installed.js // that is hacked to not cache everything :) @@ -252,7 +252,7 @@ const resolveInheritance = (obj) => { // find unmet deps by walking up the tree object. // No I/O const fuSeen = []; -const findUnmet = obj => { +const findUnmet = (obj) => { if (typeof obj === 'string') return; if (fuSeen.indexOf(obj) !== -1) return; fuSeen.push(obj); @@ -295,10 +295,10 @@ const copy = (obj) => { const o = {}; for (const i in obj) { - if (Object.prototype.hasOwnProperty.call(obj, i)){ + if (Object.prototype.hasOwnProperty.call(obj, i)) { o[i] = copy(obj[i]); } - }; + } return o; }; @@ -319,7 +319,7 @@ if (module === require.main) { if (seen.indexOf(map) !== -1) return; seen.push(map); for (const i in map) { - if (Object.prototype.hasOwnProperty.call(map, i)){ + if (Object.prototype.hasOwnProperty.call(map, i)) { switch (i) { case '_id': case 'path':