Remove log from global

This commit is contained in:
Pavel Djundik 2018-06-15 23:31:06 +03:00
parent 6bbe569dac
commit 472d618033
33 changed files with 31 additions and 7 deletions

View file

@ -86,7 +86,4 @@ rules:
template-curly-spacing: error
yoda: error
globals:
log: false
extends: eslint:recommended

View file

@ -1,6 +1,7 @@
"use strict";
const _ = require("lodash");
const log = require("./log");
const colors = require("chalk");
const Chan = require("./models/chan");
const crypto = require("crypto");

View file

@ -1,6 +1,7 @@
"use strict";
const _ = require("lodash");
const log = require("./log");
const colors = require("chalk");
const fs = require("fs");
const path = require("path");

View file

@ -1,8 +1,7 @@
"use strict";
global.log = require("../log.js");
const _ = require("lodash");
const log = require("../log");
const fs = require("fs");
const path = require("path");
const program = require("commander");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../log");
const colors = require("chalk");
const program = require("commander");
const Helper = require("../helper");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../log");
const colors = require("chalk");
const fs = require("fs");
const fsextra = require("fs-extra");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../log");
const colors = require("chalk");
const path = require("path");
const program = require("commander");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../log");
const colors = require("chalk");
const program = require("commander");
const Helper = require("../helper");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const colors = require("chalk");
const program = require("commander");
const fs = require("fs");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const program = require("commander");
const child = require("child_process");
const colors = require("chalk");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const colors = require("chalk");
const program = require("commander");
const fs = require("fs");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const colors = require("chalk");
const program = require("commander");
const fs = require("fs");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const colors = require("chalk");
const program = require("commander");
const fs = require("fs");

View file

@ -1,6 +1,7 @@
"use strict";
const _ = require("lodash");
const log = require("../log");
const colors = require("chalk");
const fs = require("fs");
const Helper = require("../helper");

View file

@ -2,6 +2,7 @@
const pkg = require("../package.json");
const _ = require("lodash");
const log = require("./log");
const path = require("path");
const os = require("os");
const fs = require("fs");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("./log");
const fs = require("fs");
const net = require("net");
const colors = require("chalk");

View file

@ -1,6 +1,7 @@
"use strict";
const _ = require("lodash");
const log = require("../log");
const Helper = require("../helper");
const User = require("./user");
const Msg = require("./msg");

View file

@ -1,6 +1,7 @@
"use strict";
const _ = require("lodash");
const log = require("../log");
const uuidv4 = require("uuid/v4");
const IrcFramework = require("irc-framework");
const Chan = require("./chan");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const Helper = require("../../helper");
// Forked ldapjs for 2 reasons:

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const Helper = require("../../helper");
const colors = require("chalk");

View file

@ -1,6 +1,7 @@
"use strict";
const _ = require("lodash");
const log = require("../../log");
const Msg = require("../../models/msg");
const Chan = require("../../models/chan");
const Helper = require("../../helper");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const path = require("path");
const fsextra = require("fs-extra");
const Helper = require("../../helper");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const fs = require("fs");
const fsextra = require("fs-extra");
const path = require("path");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../log");
const colors = require("chalk");
const path = require("path");
const Helper = require("../../helper");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../log");
const fs = require("fs");
const fsextra = require("fs-extra");
const path = require("path");

View file

@ -1,6 +1,7 @@
"use strict";
const _ = require("lodash");
const log = require("../log");
const fs = require("fs");
const path = require("path");
const WebPushAPI = require("web-push");

View file

@ -1,6 +1,7 @@
"use strict";
const _ = require("lodash");
const log = require("./log");
const pkg = require("../package.json");
const Client = require("./client");
const ClientManager = require("./clientManager");

View file

@ -1,6 +1,4 @@
"use strict";
global.log = require("../../src/log.js");
const home = require("path").join(__dirname, ".thelounge");
require("../../src/helper").setHome(home);

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../../src/log");
const ldapAuth = require("../../../src/plugins/auth/ldap");
const Helper = require("../../../src/helper");
const ldap = require("thelounge-ldapjs-non-maintained-fork");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../../src/log");
const expect = require("chai").expect;
const stub = require("sinon").stub;
const TestUtil = require("../../util");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../src/log");
const Helper = require("../src/helper");
const expect = require("chai").expect;
const request = require("request");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../../src/log");
const expect = require("chai").expect;
const stub = require("sinon").stub;
const TestUtil = require("../../util");

View file

@ -1,5 +1,6 @@
"use strict";
const log = require("../../src/log");
const expect = require("chai").expect;
const mergeConfig = require("../../src/helper").mergeConfig;