mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
lint: fix errors and unfinished bits to now be finished
This commit is contained in:
parent
b18a0e48da
commit
3e78be371d
2 changed files with 9 additions and 9 deletions
|
@ -1,8 +1,8 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const log4js = require('log4js');
|
const log4js = require('log4js');
|
||||||
const plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins');
|
const plugins = require('./plugins');
|
||||||
const hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
const hooks = require('./hooks');
|
||||||
const npm = require('npm');
|
const npm = require('npm');
|
||||||
const request = require('request');
|
const request = require('request');
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
|
@ -24,8 +24,8 @@ let tasks = 0;
|
||||||
function wrapTaskCb(cb) {
|
function wrapTaskCb(cb) {
|
||||||
tasks++;
|
tasks++;
|
||||||
|
|
||||||
return function (...arguments) {
|
return function (...args) {
|
||||||
cb && cb.apply(this, arguments);
|
cb && cb.apply(this, args);
|
||||||
tasks--;
|
tasks--;
|
||||||
if (tasks === 0) onAllTasksFinished();
|
if (tasks === 0) onAllTasksFinished();
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
'use strict'
|
'use strict';
|
||||||
// A copy of npm/lib/utils/read-installed.js
|
// A copy of npm/lib/utils/read-installed.js
|
||||||
// that is hacked to not cache everything :)
|
// that is hacked to not cache everything :)
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ const resolveInheritance = (obj) => {
|
||||||
// find unmet deps by walking up the tree object.
|
// find unmet deps by walking up the tree object.
|
||||||
// No I/O
|
// No I/O
|
||||||
const fuSeen = [];
|
const fuSeen = [];
|
||||||
const findUnmet = obj => {
|
const findUnmet = (obj) => {
|
||||||
if (typeof obj === 'string') return;
|
if (typeof obj === 'string') return;
|
||||||
if (fuSeen.indexOf(obj) !== -1) return;
|
if (fuSeen.indexOf(obj) !== -1) return;
|
||||||
fuSeen.push(obj);
|
fuSeen.push(obj);
|
||||||
|
@ -295,10 +295,10 @@ const copy = (obj) => {
|
||||||
|
|
||||||
const o = {};
|
const o = {};
|
||||||
for (const i in obj) {
|
for (const i in obj) {
|
||||||
if (Object.prototype.hasOwnProperty.call(obj, i)){
|
if (Object.prototype.hasOwnProperty.call(obj, i)) {
|
||||||
o[i] = copy(obj[i]);
|
o[i] = copy(obj[i]);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
return o;
|
return o;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ if (module === require.main) {
|
||||||
if (seen.indexOf(map) !== -1) return;
|
if (seen.indexOf(map) !== -1) return;
|
||||||
seen.push(map);
|
seen.push(map);
|
||||||
for (const i in map) {
|
for (const i in map) {
|
||||||
if (Object.prototype.hasOwnProperty.call(map, i)){
|
if (Object.prototype.hasOwnProperty.call(map, i)) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case '_id':
|
case '_id':
|
||||||
case 'path':
|
case 'path':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue