Skip to content

Commit 706af7e

Browse files
committed
Fix linter warnings
1 parent e703c36 commit 706af7e

File tree

8 files changed

+17
-9
lines changed

8 files changed

+17
-9
lines changed

webview-ui/eslint.config.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ export default [
55
...reactConfig,
66
{
77
rules: {
8-
"@typescript-eslint/no-unused-vars": "off",
8+
"@typescript-eslint/no-unused-vars": [
9+
"error",
10+
{
11+
args: "all",
12+
ignoreRestSiblings: true,
13+
varsIgnorePattern: "^_",
14+
argsIgnorePattern: "^_",
15+
caughtErrorsIgnorePattern: "^_",
16+
},
17+
],
918
"@typescript-eslint/no-explicit-any": "off",
1019
"react/prop-types": "off",
1120
"react/display-name": "off",

webview-ui/src/components/common/__tests__/CodeBlock.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jest.mock("lucide-react", () => {
3333
return new Proxy(
3434
{},
3535
{
36-
get: function (obj, prop) {
36+
get: function (_obj, prop) {
3737
// Return a component factory for any icon that's requested
3838
if (prop === "__esModule") {
3939
return true

webview-ui/src/components/prompts/__tests__/PromptsView.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jest.mock("lucide-react", () => {
1717
return new Proxy(
1818
{},
1919
{
20-
get: function (obj, prop) {
20+
get: function (_obj, prop) {
2121
// Return a component factory for any icon that's requested
2222
if (prop === "__esModule") {
2323
return true

webview-ui/src/components/settings/CodeIndexSettings.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
} from "@/components/ui/alert-dialog"
1818

1919
import { vscode } from "@/utils/vscode"
20-
import { ExtensionStateContextType } from "@/context/ExtensionStateContext"
2120
import { CodebaseIndexConfig, CodebaseIndexModels, ProviderSettings } from "../../../../src/schemas"
2221
import { EmbedderProvider } from "../../../../src/shared/embeddingModels"
2322
import { z } from "zod"

webview-ui/src/components/settings/__tests__/SettingsView.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jest.mock("lucide-react", () => {
1515
return new Proxy(
1616
{},
1717
{
18-
get: function (obj, prop) {
18+
get: function (_obj, prop) {
1919
// Return a component factory for any icon that's requested
2020
if (prop === "__esModule") {
2121
return true

webview-ui/src/components/settings/providers/OpenRouter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Checkbox } from "vscrui"
44
import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
55
import { ExternalLinkIcon } from "@radix-ui/react-icons"
66

7-
import { ModelInfo, ProviderSettings, RouterModels, openRouterDefaultModelId } from "@roo/shared/api"
7+
import { ProviderSettings, RouterModels, openRouterDefaultModelId } from "@roo/shared/api"
88

99
import { useAppTranslation } from "@src/i18n/TranslationContext"
1010
import { getOpenRouterAuthUrl } from "@src/oauth/urls"

webview-ui/src/components/ui/markdown/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const CodeBlock: FC<CodeBlockProps> = memo(({ language, value, className,
4444
})
4545

4646
setHighlightedCode(html)
47-
} catch (e) {
47+
} catch (_e) {
4848
setHighlightedCode(value)
4949
}
5050
}

webview-ui/src/utils/TelemetryClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class TelemetryClient {
3535
if (TelemetryClient.telemetryEnabled) {
3636
try {
3737
posthog.capture(eventName, properties)
38-
} catch (error) {
39-
// Silently fail if there's an error capturing an event
38+
} catch (_error) {
39+
// Silently fail if there's an error capturing an event.
4040
}
4141
}
4242
}

0 commit comments

Comments
 (0)