Skip to content

Commit 2913bee

Browse files
fixed linting errors
1 parent b990949 commit 2913bee

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

webview-ui/src/components/chat/Markdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const splitMarkdownAndTables = (markdownText: string, ts: number) => {
1616
while (currentLineIndex < lines.length) {
1717
const line = lines[currentLineIndex];
1818
if (line.trim().startsWith('|') && line.trim().endsWith('|')) {
19-
let potentialTableLines: string[] = [];
19+
const potentialTableLines: string[] = [];
2020
let tempIndex = currentLineIndex;
2121
potentialTableLines.push(lines[tempIndex]);
2222
tempIndex++;

webview-ui/src/components/common/InlineParser.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ReactNode } from "react";
22

33
export const parseInlineMarkdown = (text: string, keyOffset: number): ReactNode | ReactNode[] => {
4-
if (!/[\[\*_~`\|]/.test(text)) {
4+
if (!/[[*_~`|]/.test(text)) {
55
return text;
66
}
77

@@ -40,7 +40,7 @@ const processLinks = (
4040

4141
const linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
4242
let lastIndex = 0;
43-
let result: ReactNode[] = [];
43+
const result: ReactNode[] = [];
4444
let match;
4545
let matchIndex = 0;
4646

@@ -92,7 +92,7 @@ const processBold = (
9292

9393
const boldRegex = /\*\*(.*?)\*\*/g;
9494
let lastIndex = 0;
95-
let result: ReactNode[] = [];
95+
const result: ReactNode[] = [];
9696
let match;
9797
let matchIndex = 0;
9898

@@ -144,7 +144,7 @@ const processItalic = (
144144

145145
const italicRegex = /_(.*?)_/g;
146146
let lastIndex = 0;
147-
let result: ReactNode[] = [];
147+
const result: ReactNode[] = [];
148148
let match;
149149
let matchIndex = 0;
150150

@@ -188,7 +188,7 @@ const processStrikethrough = (
188188

189189
const strikeRegex = /~~(.*?)~~/g;
190190
let lastIndex = 0;
191-
let result: ReactNode[] = [];
191+
const result: ReactNode[] = [];
192192
let match;
193193
let matchIndex = 0;
194194

@@ -236,7 +236,7 @@ const processInlineCode = (
236236

237237
const codeRegex = /`([^`]+)`/g;
238238
let lastIndex = 0;
239-
let result: ReactNode[] = [];
239+
const result: ReactNode[] = [];
240240
let match;
241241
let matchIndex = 0;
242242

@@ -282,7 +282,7 @@ const processSpoiler = (
282282

283283
const spoilerRegex = /\|\|(.*?)\|\|/g;
284284
let lastIndex = 0;
285-
let result: ReactNode[] = [];
285+
const result: ReactNode[] = [];
286286
let match;
287287
let matchIndex = 0;
288288

webview-ui/src/components/common/TableParser.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const parseTableDataRows = (dataRows: string[], maxRows: number = 50) => {
2828
break;
2929
}
3030
}
31-
} catch (error) {
31+
} catch (_error) {
3232
return [];
3333
}
3434
return rows;
@@ -128,7 +128,7 @@ export const parseTable = (tableText: string, keyPrefix: string) => {
128128
</table>
129129
</div>
130130
);
131-
} catch (error) {
131+
} catch (_error) {
132132
return null;
133133
}
134134
};

0 commit comments

Comments
 (0)