Using eslint-disable-next-line

Signed-off-by: Cocoa <0xbbc@0xbbc.com>
This commit is contained in:
Cocoa 2020-05-02 15:54:33 +08:00
parent 9a29125e72
commit e26d35acfe
No known key found for this signature in database
GPG Key ID: 9821F9625A97231D

View File

@ -54,9 +54,7 @@ function fileAppender(file, layout, logSize, numBackups, options, timezoneOffset
const app = function (loggingEvent) {
if (options.removeColor === true) {
/* eslint-disable no-control-regex */
const regex = new RegExp("\x1b[[0-9;]*m", "g");
/* eslint-enable no-control-regex */
const regex = new RegExp("\x1b[[0-9;]*m", "g"); // eslint-disable-line no-control-regex
for (let i = 0; i < loggingEvent.data.length; i += 1) {
let d = loggingEvent.data[i];
d = d.replace(regex, '');