Skip to content

Commit 19d312e

Browse files
fix: resolve lint issues across the codebase (#2337)
* fix: resolve lint issues across the codebase - Fix no-floating-promises warnings by adding void operator for fire-and-forget calls - Fix exhaustive-deps warnings in React hooks by adding missing dependencies - Fix restrict-template-expressions warnings by properly typing template literals - Fix no-useless-escape warnings in regex patterns - Fix no-useless-rename warnings in destructuring - Fix no-unused-expressions warnings - Fix @tanstack/query/no-unstable-deps errors by destructuring query results - Fix no-constant-condition warnings by removing ternary operators with constant conditions Remaining issues are: - tsconfig baseUrl errors (configuration issues, not code) - unbound-method warnings in test files (intentional patterns) - Simple unused variable warnings (as requested to skip) - Generated files (api-client, routeTree.gen.ts) Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> * fix: restore compile-time type check with eslint-disable comment Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> * style: apply dprint formatting Co-Authored-By: yujonglee <yujonglee.dev@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: yujonglee <yujonglee.dev@gmail.com>
1 parent 09a1435 commit 19d312e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+171
-140
lines changed

apps/api/src/scripts/generate-openapi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ async function main() {
3333
}
3434
}
3535

36-
main();
36+
void main();

apps/api/src/stt/stt.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
payloadIsControlMessage,
77
} from "./utils";
88

9-
mock.module("../env", () => ({
9+
void mock.module("../env", () => ({
1010
env: {
1111
DEEPGRAM_API_KEY: "test-deepgram-key",
1212
ASSEMBLYAI_API_KEY: "test-assemblyai-key",

apps/bot/src/devin/poller.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ export class DevinStatusPoller {
256256
`Discovered ${this.trackedPRs.size} PRs with active Devin sessions`,
257257
);
258258
} catch (error) {
259-
this.logger.error(`Failed to discover existing sessions: ${error}`);
259+
this.logger.error(
260+
`Failed to discover existing sessions: ${error instanceof Error ? error.message : String(error)}`,
261+
);
260262
}
261263
}
262264

@@ -295,7 +297,7 @@ export class DevinStatusPoller {
295297
await this.checkPRStatus(pr, sessionsByPrUrl);
296298
} catch (error) {
297299
this.logger.error(
298-
`Failed to check status for PR ${pr.prUrl}: ${error}`,
300+
`Failed to check status for PR ${pr.prUrl}: ${error instanceof Error ? error.message : String(error)}`,
299301
);
300302
}
301303
}
@@ -329,7 +331,9 @@ export class DevinStatusPoller {
329331
return;
330332
}
331333
} catch (error) {
332-
this.logger.error(`Failed to check PR state for ${pr.prUrl}: ${error}`);
334+
this.logger.error(
335+
`Failed to check PR state for ${pr.prUrl}: ${error instanceof Error ? error.message : String(error)}`,
336+
);
333337
}
334338

335339
// Use cached session lookup instead of making individual API calls
@@ -380,7 +384,7 @@ export class DevinStatusPoller {
380384
this.untrackPR(pr.prUrl);
381385
} catch (error) {
382386
this.logger.error(
383-
`Failed to verify session status for ${pr.sessionId}: ${error}`,
387+
`Failed to verify session status for ${pr.sessionId}: ${error instanceof Error ? error.message : String(error)}`,
384388
);
385389
}
386390
return;
@@ -510,7 +514,9 @@ export class DevinStatusPoller {
510514
`Updated check for PR ${pr.prUrl}: ${status} ${conclusion ?? ""}`,
511515
);
512516
} catch (error) {
513-
this.logger.error(`Failed to update check for PR ${pr.prUrl}: ${error}`);
517+
this.logger.error(
518+
`Failed to update check for PR ${pr.prUrl}: ${error instanceof Error ? error.message : String(error)}`,
519+
);
514520
}
515521
}
516522
}

apps/bot/src/features/devin-status.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ export function registerDevinStatusHandler(app: Probot): void {
3838
try {
3939
await checkDevinSession(context, owner, repo, prNumber, headSha, prUrl);
4040
} catch (error) {
41-
context.log.error(`[Devin] Failed to check Devin session: ${error}`);
41+
context.log.error(
42+
`[Devin] Failed to check Devin session: ${error instanceof Error ? error.message : String(error)}`,
43+
);
4244
}
4345
},
4446
);

apps/bot/src/features/fix-merge-conflict.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function registerFixMergeConflictHandler(app: Probot): void {
5959
}
6060
} catch (error) {
6161
context.log.error(
62-
`Failed to handle merge conflict check for PR #${pr.number}: ${error}`,
62+
`Failed to handle merge conflict check for PR #${pr.number}: ${error instanceof Error ? error.message : String(error)}`,
6363
);
6464
}
6565
}

apps/bot/src/features/pr-closed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function registerPrClosedHandler(app: Probot): void {
3131
);
3232
} catch (error) {
3333
context.log.error(
34-
`Failed to terminate Devin session for ${prUrl}: ${error}`,
34+
`Failed to terminate Devin session for ${prUrl}: ${error instanceof Error ? error.message : String(error)}`,
3535
);
3636
}
3737
});

apps/bot/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ async function start() {
1717
await server.start();
1818
}
1919

20-
start();
20+
void start();

apps/desktop/src/auth.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
123123
} else {
124124
setSession(res.data.session);
125125
setServerReachable(true);
126-
supabase.auth.startAutoRefresh();
126+
void supabase.auth.startAutoRefresh();
127127
}
128128
};
129129

@@ -149,20 +149,20 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
149149

150150
const unlistenFocus = appWindow.listen("tauri://focus", () => {
151151
if (serverReachable) {
152-
supabase.auth.startAutoRefresh();
152+
void supabase.auth.startAutoRefresh();
153153
}
154154
});
155155
const unlistenBlur = appWindow.listen("tauri://blur", () => {
156-
supabase.auth.stopAutoRefresh();
156+
void supabase.auth.stopAutoRefresh();
157157
});
158158

159-
onOpenUrl(([url]) => {
160-
handleAuthCallback(url);
159+
void onOpenUrl(([url]) => {
160+
void handleAuthCallback(url);
161161
});
162162

163163
return () => {
164-
unlistenFocus.then((fn) => fn());
165-
unlistenBlur.then((fn) => fn());
164+
void unlistenFocus.then((fn) => fn());
165+
void unlistenBlur.then((fn) => fn());
166166
};
167167
}, [serverReachable]);
168168

@@ -198,14 +198,14 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
198198
) {
199199
setServerReachable(false);
200200
setSession(data.session);
201-
supabase.auth.startAutoRefresh();
201+
void supabase.auth.startAutoRefresh();
202202
return;
203203
}
204204
}
205205
if (refreshData.session) {
206206
setSession(refreshData.session);
207207
setServerReachable(true);
208-
supabase.auth.startAutoRefresh();
208+
void supabase.auth.startAutoRefresh();
209209
}
210210
}
211211
} catch (e) {
@@ -223,14 +223,14 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
223223
}
224224
};
225225

226-
initSession();
226+
void initSession();
227227

228228
const {
229229
data: { subscription },
230230
} = supabase.auth.onAuthStateChange((event, session) => {
231231
if (event === "TOKEN_REFRESHED" && !session) {
232232
if (isLocalAuthServer(env.VITE_SUPABASE_URL)) {
233-
clearAuthStorage();
233+
void clearAuthStorage();
234234
setServerReachable(false);
235235
}
236236
}

apps/desktop/src/billing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function BillingProvider({ children }: { children: ReactNode }) {
4646
);
4747

4848
const upgradeToPro = useCallback(() => {
49-
openUrl(`${env.VITE_APP_URL}/app/checkout?period=monthly`);
49+
void openUrl(`${env.VITE_APP_URL}/app/checkout?period=monthly`);
5050
}, []);
5151

5252
const value = useMemo<BillingContextValue>(

apps/desktop/src/components/changelog-listener.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function ChangelogListener() {
1515
}
1616

1717
let unlisten: null | UnlistenFn = null;
18-
events.updatedEvent
18+
void events.updatedEvent
1919
.listen(({ payload: { previous, current } }) => {
2020
openNew({
2121
type: "changelog",

0 commit comments

Comments
 (0)