Skip to content

Commit e6ed999

Browse files
committed
Apply linting fixes
1 parent d2ea5de commit e6ed999

File tree

6 files changed

+300
-303
lines changed

6 files changed

+300
-303
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,4 +412,4 @@
412412
"vscode-languageclient": "^8.0.2",
413413
"yaml": "^1.7.2"
414414
}
415-
}
415+
}

src/logs/formatProvider.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as vscode from "vscode"
2-
import {LogInfo} from "./model"
3-
import {Parser, ColorToHex} from './parser'
1+
import * as vscode from "vscode";
2+
import {LogInfo} from "./model";
3+
import {Parser, ColorToHex} from "./parser";
44

55
const timestampRE = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{7}Z/;
66

@@ -34,41 +34,41 @@ export function updateDecorations(activeEditor: vscode.TextEditor, logInfo: LogI
3434

3535
for (let lineNo = 0; lineNo < logInfo.updatedLogLines.length; lineNo++) {
3636
// .filter() preserves the order of the array
37-
const lineStyles = logInfo.styleFormats.filter(style => style.line == lineNo)
38-
let pos = 0
37+
const lineStyles = logInfo.styleFormats.filter(style => style.line == lineNo);
38+
let pos = 0;
3939
for (let styleNo = 0; styleNo < lineStyles.length; styleNo++) {
40-
const style = lineStyles[styleNo]
41-
const endPos = pos + style.content.length
40+
const style = lineStyles[styleNo];
41+
const endPos = pos + style.content.length;
4242
const range = new vscode.Range(lineNo, pos, lineNo, endPos);
43-
pos = endPos
43+
pos = endPos;
4444

4545
if (style.style) {
46-
const key = Parser.styleKey(style.style)
47-
let fgHex = ""
48-
let bgHex = ""
46+
const key = Parser.styleKey(style.style);
47+
let fgHex = "";
48+
let bgHex = "";
4949

5050
// Convert to hex colors if RGB-formatted, or use lookup for predefined colors
5151
if (style.style.isFgRGB) {
52-
const rgbValues = style.style.fg.split(',')
52+
const rgbValues = style.style.fg.split(",");
5353
if (rgbValues.length == 3) {
54-
fgHex = "#"
54+
fgHex = "#";
5555
for (let i = 0; i < 3; i++) {
56-
fgHex.concat(parseInt(rgbValues[i]).toString(16))
56+
fgHex.concat(parseInt(rgbValues[i]).toString(16));
5757
}
5858
}
5959
} else {
60-
fgHex = ColorToHex[style.style.fg]
60+
fgHex = ColorToHex[style.style.fg];
6161
}
6262
if (style.style.isBgRGB) {
63-
const rgbValues = style.style.bg.split(',')
63+
const rgbValues = style.style.bg.split(",");
6464
if (rgbValues.length == 3) {
65-
bgHex = "#"
65+
bgHex = "#";
6666
for (let i = 0; i < 3; i++) {
67-
bgHex.concat(parseInt(rgbValues[i]).toString(16))
67+
bgHex.concat(parseInt(rgbValues[i]).toString(16));
6868
}
6969
}
7070
} else {
71-
bgHex = ColorToHex[style.style.bg]
71+
bgHex = ColorToHex[style.style.bg];
7272
}
7373

7474
if (!ctypes[key]) {

src/logs/model.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const ansiColorRE = /\u001b\[(\d+;?)+m/gm;
2-
const groupMarker = '##[group]';
2+
const groupMarker = "##[group]";
33

4-
import { Parser, IStyle } from './parser'
4+
import {Parser, IStyle} from "./parser";
55

66
export enum Type {
77
Setup,
@@ -40,7 +40,7 @@ export function parseLog(log: string): LogInfo {
4040

4141
let currentRange: LogSection | null = null;
4242

43-
const parser = new Parser()
43+
const parser = new Parser();
4444
const styleInfo: LogStyleInfo[] = [];
4545
const lines = log.split(/\n|\r/).filter(l => !!l);
4646

@@ -71,7 +71,7 @@ export function parseLog(log: string): LogInfo {
7171
};
7272
}
7373

74-
const stateFragments = parser.getStates(line)
74+
const stateFragments = parser.getStates(line);
7575
for (const state of stateFragments) {
7676
styleInfo.push({
7777
line: lineIdx,
@@ -97,4 +97,3 @@ export function parseLog(log: string): LogInfo {
9797
styleFormats: styleInfo
9898
};
9999
}
100-

0 commit comments

Comments
 (0)