Skip to content

Commit 4c47c2a

Browse files
fix: resolve lint errors and safe warnings (#2345)
- Remove deprecated baseUrl from tsconfig.json files (packages/ui, apps/pro, apps/web) - Remove unused eslint-disable directive in __root.tsx - Fix no-misused-spread in apps/bot/src/devin/shared.ts by using Headers API - Fix unused catch parameters by using empty catch blocks - Fix unused destructured variable by prefixing with underscore Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: yujonglee <[email protected]>
1 parent 0cd3741 commit 4c47c2a

File tree

8 files changed

+7
-11
lines changed

8 files changed

+7
-11
lines changed

apps/bot/src/devin/shared.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ export async function fetchFromDevin(
66
input: string | URL,
77
init?: RequestInit,
88
): Promise<Response> {
9+
const headers = new Headers(init?.headers);
10+
headers.set("Authorization", `Bearer ${env.DEVIN_API_KEY}`);
11+
912
const response = await fetch(input, {
1013
...init,
11-
headers: {
12-
Authorization: `Bearer ${env.DEVIN_API_KEY}`,
13-
...(init?.headers ?? {}),
14-
},
14+
headers,
1515
});
1616

1717
if (!response.ok) {

apps/desktop/src/routes/__root.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { isExtHostPath } from "../utils/ext-host";
1515
const MainAppLayout = lazy(() => import("../components/main-app-layout"));
1616

1717
// Compile-time check: DeepLink['to'] must match a valid route
18-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
1918
0 as DeepLink["to"] extends NonNullable<LinkProps["to"]>
2019
? 0
2120
: "DeepLink['to'] must match a valid route";

apps/desktop/src/store/zustand/ai-task/task-configs/enhance-workflow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async function generateTemplateIfNeeded(params: {
156156
});
157157

158158
return template.object.sections as Array<TemplateSection>;
159-
} catch (error) {
159+
} catch {
160160
return undefined;
161161
}
162162
} else {

apps/desktop/src/utils/segment/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function finalizeSegments(segments: ProtoSegment[]): Segment[] {
164164
return segments.map((segment) => ({
165165
key: segment.key,
166166
words: segment.words.map(({ word }) => {
167-
const { order, ...rest } = word;
167+
const { order: _order, ...rest } = word;
168168
return rest as SegmentWord;
169169
}),
170170
}));

apps/pro/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"strict": true,
66
"verbatimModuleSyntax": true,
77
"skipLibCheck": true,
8-
"baseUrl": ".",
98
"types": ["node"],
109
"jsx": "react-jsx",
1110
"jsxImportSource": "hono/jsx",

apps/web/scripts/gen-agents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function findAgentsFiles(dir, baseDir = dir, results = []) {
3131
results.push(relativePath);
3232
}
3333
}
34-
} catch (err) {
34+
} catch {
3535
// Ignore errors (e.g., permission denied)
3636
}
3737

apps/web/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"noUnusedParameters": true,
2828
"noFallthroughCasesInSwitch": true,
2929
"noUncheckedSideEffectImports": true,
30-
"baseUrl": ".",
3130
"paths": {
3231
"@/*": ["./src/*"],
3332
"content-collections": ["./.content-collections/generated"]

packages/ui/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"target": "ESNext",
77
"module": "ESNext",
88
"moduleResolution": "Bundler",
9-
"baseUrl": ".",
109
"paths": {
1110
"@hypr/ui/*": ["./src/*"]
1211
}

0 commit comments

Comments
 (0)