Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
davemarco committed Sep 6, 2024
1 parent 871cdfc commit 0cc7354
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions new-log-viewer/src/services/decoders/ClpIrDecoder.ts
Original file line number Diff line number Diff line change
@@ -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";

Check warning on line 8 in new-log-viewer/src/services/decoders/ClpIrDecoder.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

new-log-viewer/src/services/decoders/ClpIrDecoder.ts#L1-L8

[simple-import-sort/imports] Run autofix to sort these imports!
import {LogLevelFilter} from "../../typings/logs";


class ClpIrDecoder implements Decoder {
Expand Down Expand Up @@ -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 {

Check failure on line 48 in new-log-viewer/src/services/decoders/ClpIrDecoder.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

new-log-viewer/src/services/decoders/ClpIrDecoder.ts#L48

[@typescript-eslint/no-unused-vars] 'logLevelFilter' is defined but never used.
// 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

Check warning on line 49 in new-log-viewer/src/services/decoders/ClpIrDecoder.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

new-log-viewer/src/services/decoders/ClpIrDecoder.ts#L49

[no-warning-comments] Unexpected 'todo' comment: 'TODO fix this after log level filtering...'.
return true;
}

decode (beginIdx: number, endIdx: number): Nullable<DecodeResultType[]> {
Expand Down
4 changes: 2 additions & 2 deletions new-log-viewer/src/services/decoders/JsonlDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check warning on line 29 in new-log-viewer/src/services/decoders/JsonlDecoder.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

new-log-viewer/src/services/decoders/JsonlDecoder.ts#L29

[jsdoc/informative-docs] This tag description only repeats the name it describes.
* @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
Expand Down

0 comments on commit 0cc7354

Please sign in to comment.