Skip to content

Commit 3f4b46d

Browse files
ci: apply prettier format
1 parent aca5e1b commit 3f4b46d

29 files changed

Lines changed: 1280 additions & 439 deletions

src/components/ActionRow.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
import { APIActionRowComponent } from "discord-api-types/payloads";
22
import {
3-
APIButtonComponent,
4-
APISelectMenuComponent,
5-
ComponentType,
3+
APIButtonComponent,
4+
APISelectMenuComponent,
5+
ComponentType,
66
} from "discord-api-types/v10";
77
import { childrenToArray } from "./utils";
88

99
type MessageActionRowComponent = APIButtonComponent | APISelectMenuComponent;
1010

1111
export type ActionRowProps = Omit<
12-
APIActionRowComponent<MessageActionRowComponent>,
13-
"type" | "components"
12+
APIActionRowComponent<MessageActionRowComponent>,
13+
"type" | "components"
1414
> & {
15-
children: MessageActionRowComponent | MessageActionRowComponent[];
15+
children: MessageActionRowComponent | MessageActionRowComponent[];
1616
};
1717

1818
export function ActionRow({
19-
children,
20-
...props
19+
children,
20+
...props
2121
}: ActionRowProps): APIActionRowComponent<MessageActionRowComponent> {
22-
return {
23-
type: ComponentType.ActionRow,
24-
components: childrenToArray(children),
25-
...props,
26-
};
22+
return {
23+
type: ComponentType.ActionRow,
24+
components: childrenToArray(children),
25+
...props,
26+
};
2727
}

src/components/Br.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default function Br() {
2-
return "<br>";
2+
return "<br>";
33
}

src/components/Button.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import {
2-
APIButtonComponent,
3-
APIButtonComponentWithURL,
4-
ComponentType,
2+
APIButtonComponent,
3+
APIButtonComponentWithURL,
4+
ComponentType,
55
} from "discord-api-types/v10";
66
import { childrenToString } from "./utils";
77

88
type Button = Omit<APIButtonComponentWithURL, "type" | "label">;
99
export type ButtonProps = Button & { children?: string };
1010

1111
export function Button({
12-
children,
13-
...props
12+
children,
13+
...props
1414
}: ButtonProps): APIButtonComponent {
15-
return {
16-
type: ComponentType.Button,
17-
label: childrenToString("Button", children) ?? undefined,
18-
...props,
19-
};
15+
return {
16+
type: ComponentType.Button,
17+
label: childrenToString("Button", children) ?? undefined,
18+
...props,
19+
};
2020
}

src/components/Container.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ import { APIContainerComponent, ComponentType } from "discord-api-types/v10";
22
import { childrenToArray } from "./utils";
33

44
export type ContainerProps = Omit<
5-
APIContainerComponent,
6-
"type" | "components"
5+
APIContainerComponent,
6+
"type" | "components"
77
> & {
8-
children: APIContainerComponent["components"];
8+
children: APIContainerComponent["components"];
99
};
1010

1111
export function Container({
12-
children,
13-
...props
12+
children,
13+
...props
1414
}: ContainerProps): APIContainerComponent {
15-
return {
16-
type: ComponentType.Container,
17-
components: childrenToArray(children),
18-
...props,
19-
};
15+
return {
16+
type: ComponentType.Container,
17+
components: childrenToArray(children),
18+
...props,
19+
};
2020
}

src/components/File.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import { APIFileComponent, ComponentType } from "discord-api-types/v10";
22
import { MediaItem } from "./MediaItem";
33

44
interface FileProps {
5-
filename: string;
6-
id?: number;
7-
spoiler?: boolean;
5+
filename: string;
6+
id?: number;
7+
spoiler?: boolean;
88
}
99

1010
export function File({ filename, id, spoiler }: FileProps): APIFileComponent {
11-
return {
12-
type: ComponentType.File,
13-
id,
14-
spoiler,
15-
file: <MediaItem url={`attachment://${filename}`} />,
16-
};
11+
return {
12+
type: ComponentType.File,
13+
id,
14+
spoiler,
15+
file: <MediaItem url={`attachment://${filename}`} />,
16+
};
1717
}

src/components/JSX.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
type IndexImports = typeof import("./index");
22
type FirstParam<T> = T extends (arg1: infer A, ...args: any[]) => any
3-
? A
4-
: never;
3+
? A
4+
: never;
55
type IntrinsicElements = {
6-
[K in keyof typeof IndexImports]: FirstParam<(typeof IndexImports)[K]>;
6+
[K in keyof typeof IndexImports]: FirstParam<(typeof IndexImports)[K]>;
77
};
88

99
declare namespace JSX {
10-
interface ElementChildrenAttribute {
11-
children: {};
12-
}
10+
interface ElementChildrenAttribute {
11+
children: {};
12+
}
1313

14-
IntrinsicElements;
14+
IntrinsicElements;
1515
}

src/components/MediaGallery.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ import { APIMediaGalleryComponent, ComponentType } from "discord-api-types/v10";
22
import { childrenToArray } from "./utils";
33

44
export type MediaGalleryProps = Omit<
5-
APIMediaGalleryComponent,
6-
"type" | "items"
5+
APIMediaGalleryComponent,
6+
"type" | "items"
77
> & { children: APIMediaGalleryComponent["items"] };
88

99
export function MediaGallery({
10-
children,
11-
...props
10+
children,
11+
...props
1212
}: MediaGalleryProps): APIMediaGalleryComponent {
13-
return {
14-
type: ComponentType.MediaGallery,
15-
items: childrenToArray(children),
16-
...props,
17-
};
13+
return {
14+
type: ComponentType.MediaGallery,
15+
items: childrenToArray(children),
16+
...props,
17+
};
1818
}

src/components/MediaGalleryItem.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ import { APIMediaGalleryItem } from "discord-api-types/v10";
22
import { MediaItem } from "./MediaItem";
33

44
export interface MediaGalleryItemProps {
5-
url: string;
6-
description?: string;
7-
spoiler?: boolean;
5+
url: string;
6+
description?: string;
7+
spoiler?: boolean;
88
}
99

1010
export function MediaGalleryItem({
11-
url,
12-
description,
13-
spoiler,
11+
url,
12+
description,
13+
spoiler,
1414
}: MediaGalleryItemProps): APIMediaGalleryItem {
15-
return {
16-
media: <MediaItem url={url} />,
17-
description,
18-
spoiler,
19-
};
15+
return {
16+
media: <MediaItem url={url} />,
17+
description,
18+
spoiler,
19+
};
2020
}

src/components/MediaItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import { APIUnfurledMediaItem } from "discord-api-types/v10";
33
export type MediaItemProps = APIUnfurledMediaItem;
44

55
export function MediaItem(props: MediaItemProps): APIUnfurledMediaItem {
6-
return props;
6+
return props;
77
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import {
2-
APIMentionableSelectComponent,
3-
ComponentType,
2+
APIMentionableSelectComponent,
3+
ComponentType,
44
} from "discord-api-types/v10";
55

66
export type MentionableSelectProps = Omit<
7-
APIMentionableSelectComponent,
8-
"type"
7+
APIMentionableSelectComponent,
8+
"type"
99
>;
1010

1111
export function MentionableSelect(
12-
props: MentionableSelectProps
12+
props: MentionableSelectProps
1313
): APIMentionableSelectComponent {
14-
return {
15-
type: ComponentType.MentionableSelect,
16-
...props,
17-
};
14+
return {
15+
type: ComponentType.MentionableSelect,
16+
...props,
17+
};
1818
}

0 commit comments

Comments
 (0)