Skip to content

Commit 1f416f5

Browse files
aster-voidclaude
andcommitted
treewide: add .ts extensions to imports for biome compliance
Fix biome linter errors by adding .ts extensions to all relative imports in server and api-client code. This ensures compatibility with the useImportExtensions rule enabled in biome.jsonc. Also includes biome.jsonc updates to re-enable unused variable/import detection for Svelte files (as warnings). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent 0c0eac8 commit 1f416f5

Some content is hidden

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

46 files changed

+360
-301
lines changed

apps/api-client/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import type { App } from "@apps/server";
77
import { treaty } from "@elysiajs/eden";
88

9-
export * from "./route-helpers";
10-
export type * from "./types";
9+
export * from "./route-helpers.ts";
10+
export type * from "./types.ts";
1111

1212
export interface ApiConfig {
1313
baseUrl: string;

apps/api-client/src/route-helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { ApiClient } from "./index";
1+
import type { ApiClient } from "./index.ts";
22
import type {
33
DynamicRoute,
44
MessagesRoute,
55
OrganizationRoute,
6-
} from "./route-types";
6+
} from "./route-types.ts";
77

88
/**
99
* Helper functions for type-safe dynamic route access.

apps/api-client/src/route-types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ export type DynamicRoute<T> = {
1515
cast?: {
1616
post: (body: {
1717
votedOptions: number[];
18-
}) => Promise<{ data?: unknown; error?: { status: number; value: unknown } }>;
18+
}) => Promise<{
19+
data?: unknown;
20+
error?: { status: number; value: unknown };
21+
}>;
1922
};
2023
};
2124

apps/desktop/src/components/app/ChatApp.svelte

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@
3131
<OrganizationSidebar organization={organization.data} {organizationId}>
3232
<ChannelList
3333
{organizationId}
34-
bind:screenMode={() => screenMode,
35-
(val) => {
36-
if (val.type === "chat") {
37-
goto(`/orgs/${organizationId}/chat/${val.selectedChannelId}`);
38-
} else if (val.type === "personalization") {
39-
goto(`/orgs/${organizationId}/personalization`);
34+
bind:screenMode={
35+
() => screenMode,
36+
(val) => {
37+
if (val.type === "chat") {
38+
goto(`/orgs/${organizationId}/chat/${val.selectedChannelId}`);
39+
} else if (val.type === "personalization") {
40+
goto(`/orgs/${organizationId}/personalization`);
41+
}
4042
}
41-
}}
43+
}
4244
/>
4345
</OrganizationSidebar>
4446

apps/desktop/src/components/channels/Channel.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<script lang="ts">
22
import type { Channel as ChannelType, Message } from "@apps/api-client";
3-
import { getApiClient, getChannel, unwrapResponse, useQuery } from "@/lib/api.svelte";
3+
import {
4+
getApiClient,
5+
getChannel,
6+
unwrapResponse,
7+
useQuery,
8+
} from "@/lib/api.svelte";
49
import MessageInput from "../chat/MessageInput.svelte";
510
import MessageList from "../chat/MessageList.svelte";
611

apps/desktop/src/components/chat/MessageList.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
1818
let { organizationId, channelId, replyingTo = $bindable() }: Props = $props();
1919
20-
const controller = new MessageListController(() => ({ organizationId, channelId }));
20+
const controller = new MessageListController(() => ({
21+
organizationId,
22+
channelId,
23+
}));
2124
const modalManager = new ModalManager();
2225
2326
let messagesContainer: HTMLDivElement;

apps/desktop/src/components/chat/ReactionButtons.svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<script lang="ts">
22
import type { Reaction, User } from "@apps/api-client";
33
import { fly } from "svelte/transition";
4-
import { getApiClient, getMessage, unwrapResponse, useMutation, useQuery } from "@/lib/api.svelte";
4+
import {
5+
getApiClient,
6+
getMessage,
7+
unwrapResponse,
8+
useMutation,
9+
useQuery,
10+
} from "@/lib/api.svelte";
511
612
interface Props {
713
messageId: string;

apps/desktop/src/components/chat/ReactionList.svelte

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<script lang="ts">
22
import type { Reaction } from "@apps/api-client";
3-
import { getApiClient, getMessage, unwrapResponse, useQuery } from "@/lib/api.svelte";
3+
import {
4+
getApiClient,
5+
getMessage,
6+
unwrapResponse,
7+
useQuery,
8+
} from "@/lib/api.svelte";
49
import { uniqueBy } from "@/lib/utils";
510
611
interface Props {
@@ -40,7 +45,10 @@
4045
);
4146
4247
const userNamesById = useQuery<Record<string, string>>(async () => {
43-
const response = await api.users.nicknames.post({ userIds: allUserIdsInReactions, organizationId });
48+
const response = await api.users.nicknames.post({
49+
userIds: allUserIdsInReactions,
50+
organizationId,
51+
});
4452
return unwrapResponse(response);
4553
});
4654

apps/desktop/src/components/chat/VoteViewer.svelte.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import type { User, Vote } from "@apps/api-client";
2-
import { getApiClient, getVote, unwrapResponse, useQuery } from "@/lib/api.svelte";
2+
import {
3+
getApiClient,
4+
getVote,
5+
unwrapResponse,
6+
useQuery,
7+
} from "@/lib/api.svelte";
38
import { proxify } from "@/lib/proxify.svelte";
49

510
/**
@@ -88,11 +93,16 @@ export class VoteViewerController {
8893
}
8994

9095
removeFromSelectedOptions(i: number) {
91-
this.myVotesData.selectedOptions = this.selectedOptions.filter((op) => op !== i);
96+
this.myVotesData.selectedOptions = this.selectedOptions.filter(
97+
(op) => op !== i,
98+
);
9299
}
93100

94101
addToSelectedOptions(i: number) {
95-
if (this.vote.data && this.selectedOptions.length < this.vote.data.maxVotes) {
102+
if (
103+
this.vote.data &&
104+
this.selectedOptions.length < this.vote.data.maxVotes
105+
) {
96106
this.myVotesData.selectedOptions.push(i);
97107
}
98108
}

apps/desktop/src/components/chat/messageInputApi.svelte.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import type { User } from "@apps/api-client";
2-
import { getApiClient, unwrapResponse, useMutation, useQuery } from "@/lib/api.svelte";
2+
import {
3+
getApiClient,
4+
unwrapResponse,
5+
useMutation,
6+
useQuery,
7+
} from "@/lib/api.svelte";
38
import type { Vote } from "./messageInputUtils.ts";
49

510
/**

0 commit comments

Comments
 (0)