mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
chore(lint): added specific eslint rule(s) to disable for clarity
This commit is contained in:
parent
ab6a6b5f7c
commit
4f1111ee40
@ -10,7 +10,8 @@ function openTheStream(filename, pattern, options) {
|
||||
options
|
||||
);
|
||||
stream.on('error', (err) => {
|
||||
console.error('log4js.dateFileAppender - Writing to file %s, error happened ', filename, err); // eslint-disable-line
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('log4js.dateFileAppender - Writing to file %s, error happened ', filename, err);
|
||||
});
|
||||
stream.on("drain", () => {
|
||||
process.emit("log4js:pause", false);
|
||||
|
||||
@ -50,7 +50,8 @@ function fileAppender(file, layout, logSize, numBackups, options, timezoneOffset
|
||||
opt
|
||||
);
|
||||
stream.on('error', (err) => {
|
||||
console.error('log4js.fileAppender - Writing to file %s, error happened ', filePath, err); // eslint-disable-line
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('log4js.fileAppender - Writing to file %s, error happened ', filePath, err);
|
||||
});
|
||||
stream.on('drain', () => {
|
||||
process.emit("log4js:pause", false);
|
||||
|
||||
@ -24,7 +24,8 @@ const appenders = new Map();
|
||||
const tryLoading = (modulePath, config) => {
|
||||
debug('Loading module from ', modulePath);
|
||||
try {
|
||||
return require(modulePath); // eslint-disable-line
|
||||
// eslint-disable-next-line global-require, import/no-dynamic-require
|
||||
return require(modulePath);
|
||||
} catch (e) {
|
||||
// if the module was found, and we still got an error, then raise it
|
||||
configuration.throwExceptionIf(
|
||||
@ -83,7 +84,7 @@ const createAppender = (name, config) => {
|
||||
}
|
||||
|
||||
debug(`${name}: clustering.isMaster ? ${clustering.isMaster()}`);
|
||||
debug(`${name}: appenderModule is ${require('util').inspect(appenderModule)}`); // eslint-disable-line
|
||||
debug(`${name}: appenderModule is ${require('util').inspect(appenderModule)}`); // eslint-disable-line global-require
|
||||
return clustering.onlyOnMaster(() => {
|
||||
debug(`calling appenderModule.configure for ${name} / ${appenderConfig.type}`);
|
||||
return appenderModule.configure(
|
||||
|
||||
@ -5,7 +5,8 @@ const configuration = require("./configuration");
|
||||
let disabled = false;
|
||||
let cluster = null;
|
||||
try {
|
||||
cluster = require("cluster"); // eslint-disable-line
|
||||
// eslint-disable-next-line global-require
|
||||
cluster = require("cluster");
|
||||
} catch (e) {
|
||||
debug("cluster module not present");
|
||||
disabled = true;
|
||||
|
||||
@ -48,7 +48,7 @@ test("LoggingEvent", batch => {
|
||||
batch.test("Should correct construct with/without location info", t => {
|
||||
// console.log([Error('123').stack.split('\n').slice(1).join('\n')])
|
||||
const callStack =
|
||||
" at repl:1:14\n at ContextifyScript.Script.runInThisContext (vm.js:50:33)\n at REPLServer.defaultEval (repl.js:240:29)\n at bound (domain.js:301:14)\n at REPLServer.runBound [as eval] (domain.js:314:12)\n at REPLServer.onLine (repl.js:468:10)\n at emitOne (events.js:121:20)\n at REPLServer.emit (events.js:211:7)\n at REPLServer.Interface._onLine (readline.js:280:10)\n at REPLServer.Interface._line (readline.js:629:8)"; // eslint-disable-line
|
||||
" at repl:1:14\n at ContextifyScript.Script.runInThisContext (vm.js:50:33)\n at REPLServer.defaultEval (repl.js:240:29)\n at bound (domain.js:301:14)\n at REPLServer.runBound [as eval] (domain.js:314:12)\n at REPLServer.onLine (repl.js:468:10)\n at emitOne (events.js:121:20)\n at REPLServer.emit (events.js:211:7)\n at REPLServer.Interface._onLine (readline.js:280:10)\n at REPLServer.Interface._line (readline.js:629:8)"; // eslint-disable-line max-len
|
||||
const fileName = "/log4js-node/test/tap/layouts-test.js";
|
||||
const lineNumber = 1;
|
||||
const columnNumber = 14;
|
||||
|
||||
@ -257,7 +257,7 @@ test("log4js layouts", batch => {
|
||||
|
||||
// console.log([Error('123').stack.split('\n').slice(1).join('\n')])
|
||||
const callStack =
|
||||
" at repl:1:14\n at ContextifyScript.Script.runInThisContext (vm.js:50:33)\n at REPLServer.defaultEval (repl.js:240:29)\n at bound (domain.js:301:14)\n at REPLServer.runBound [as eval] (domain.js:314:12)\n at REPLServer.onLine (repl.js:468:10)\n at emitOne (events.js:121:20)\n at REPLServer.emit (events.js:211:7)\n at REPLServer.Interface._onLine (readline.js:280:10)\n at REPLServer.Interface._line (readline.js:629:8)"; // eslint-disable-line
|
||||
" at repl:1:14\n at ContextifyScript.Script.runInThisContext (vm.js:50:33)\n at REPLServer.defaultEval (repl.js:240:29)\n at bound (domain.js:301:14)\n at REPLServer.runBound [as eval] (domain.js:314:12)\n at REPLServer.onLine (repl.js:468:10)\n at emitOne (events.js:121:20)\n at REPLServer.emit (events.js:211:7)\n at REPLServer.Interface._onLine (readline.js:280:10)\n at REPLServer.Interface._line (readline.js:629:8)"; // eslint-disable-line max-len
|
||||
const fileName = path.normalize("/log4js-node/test/tap/layouts-test.js");
|
||||
const lineNumber = 1;
|
||||
const columnNumber = 14;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user