From 0cc73540de51a14b22762e8f6cb8f425e58bce21 Mon Sep 17 00:00:00 2001 From: Dave Marco Date: Fri, 6 Sep 2024 18:44:43 +0000 Subject: [PATCH] fix eslint --- new-log-viewer/src/services/decoders/ClpIrDecoder.ts | 9 ++++----- new-log-viewer/src/services/decoders/JsonlDecoder.ts | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/new-log-viewer/src/services/decoders/ClpIrDecoder.ts b/new-log-viewer/src/services/decoders/ClpIrDecoder.ts index f72db429..16730d64 100644 --- a/new-log-viewer/src/services/decoders/ClpIrDecoder.ts +++ b/new-log-viewer/src/services/decoders/ClpIrDecoder.ts @@ -1,11 +1,11 @@ import clpFfiJsModuleInit, {ClpIrStreamReader} from "clp-ffi-js"; import {Nullable} from "../../typings/common"; +import {LogLevelFilter} from "../../typings/logs"; import { Decoder, DecodeResultType, LogEventCount, } from "../../typings/decoders"; -import {LogLevelFilter} from "../../typings/logs"; class ClpIrDecoder implements Decoder { @@ -44,11 +44,10 @@ class ClpIrDecoder implements Decoder { }; } - // eslint-disable-next-line class-methods-use-this - // eslint-disable-next-line no-unused-vars + // eslint-disable-next-line class-methods-use-this, no-unused-vars changeLogLevelFilter (logLevelFilter: LogLevelFilter): boolean { - // TODO: fix this after log level filtering is implemented in clp-ffi-js - return true + // TODO fix this after log level filtering is implemented in clp-ffi-js + return true; } decode (beginIdx: number, endIdx: number): Nullable { diff --git a/new-log-viewer/src/services/decoders/JsonlDecoder.ts b/new-log-viewer/src/services/decoders/JsonlDecoder.ts index df96424b..f2cf1962 100644 --- a/new-log-viewer/src/services/decoders/JsonlDecoder.ts +++ b/new-log-viewer/src/services/decoders/JsonlDecoder.ts @@ -23,13 +23,13 @@ import LogbackFormatter from "../formatters/LogbackFormatter"; /** - * Creates an array containing indices as values. Method is used to set the default log level + * Generates an array containing indices for its values. Method is used to set the default log level * filter (i.e. all levels are selected, so the array should include all log indices). * * @param length The length of the array * @return Array with indices as values (i.e [0, 1, 2, 3, ..., length - 1]) */ -function createIndicesArray (length: number): number[] { +const createIndicesArray = (length: number): number[] => { const filteredLogIndices: number[] = Array.from( {length: length}, (_, index) => index