Merge pull request #2563 from thelounge/xpaw/no-global-log

Remove `log` from `global`
This commit is contained in:
Jérémie Astori 2018-06-15 18:27:13 -04:00 committed by GitHub
commit 1d797af794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;