Skip to content

Commit 4ebe568

Browse files
committed
Reformat frontend code, fix a few new linting errors
1 parent 78baf6b commit 4ebe568

31 files changed

+152
-138
lines changed

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"noUnusedTemplateLiteral": "error",
4747
"useNumberNamespace": "error",
4848
"noInferrableTypes": "error",
49-
"noUselessElse": "error"
49+
"noUselessElse": "error",
50+
"noDescendingSpecificity": "off"
5051
}
5152
}
5253
}

frontend/src/components/AccountDeleteButton.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ const AccountDeleteButton: React.FC<Props> = (props) => {
7070
mutationFn: ({
7171
password,
7272
hsErase,
73-
}: { password: string | null; hsErase: boolean }) =>
73+
}: {
74+
password: string | null;
75+
hsErase: boolean;
76+
}) =>
7477
graphqlRequest({
7578
query: MUTATION,
7679
variables: { password, hsErase },

frontend/src/components/ButtonLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { createLink } from "@tanstack/react-router";
88
import { Button } from "@vector-im/compound-web";
99
import cx from "classnames";
10-
import { type PropsWithChildren, forwardRef } from "react";
10+
import { forwardRef, type PropsWithChildren } from "react";
1111
import styles from "./ButtonLink.module.css";
1212

1313
type Props = {

frontend/src/components/Dialog/Dialog.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595

9696
/* Cap the block size */
9797
max-block-size: calc(100vh - var(--cpd-space-4x));
98+
/* biome-ignore lint/suspicious/noDuplicateProperties: this isn't a real duplicate */
9899
max-block-size: calc(100svh - var(--cpd-space-4x));
99100

100101
/* Drawer comes in the Android style by default */

frontend/src/components/Dialog/Dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ export const Title: React.FC<PropsWithChildren> = ({ children }) => (
102102
<DialogTitle className={styles.title}>{children}</DialogTitle>
103103
);
104104

105-
export { Description, Close } from "@radix-ui/react-dialog";
105+
export { Close, Description } from "@radix-ui/react-dialog";

frontend/src/components/Dialog/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
55
// Please see LICENSE files in the repository root for full details.
66

7-
export { Close, Dialog, Title, Description } from "./Dialog";
7+
export { Close, Description, Dialog, Title } from "./Dialog";

frontend/src/components/Layout/Layout.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
/* Fallback for browsers that do not support 100svh */
1818
min-height: 100vh;
19+
/* biome-ignore lint/suspicious/noDuplicateProperties: this isn't a real duplicate */
1920
min-height: 100svh;
2021

2122
margin: 0 auto;

frontend/src/components/LoadingScreen/LoadingScreen.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/* Fallback for browsers that do not support 100svh */
1212
min-height: 100vh;
13+
/* biome-ignore lint/suspicious/noDuplicateProperties: this isn't a real duplicate */
1314
min-height: 100svh;
1415

1516
justify-content: center;

frontend/src/components/PaginationControls.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ const PaginationControls: React.FC<Props> = ({
3939
{t("common.previous")}
4040
</Button>
4141
<div className="text-center">
42-
{count !== undefined ? (
43-
<>{t("frontend.pagination_controls.total", { totalCount: count })}</>
44-
) : null}
42+
{count !== undefined
43+
? t("frontend.pagination_controls.total", { totalCount: count })
44+
: null}
4545
</div>
4646
<Button
4747
kind="secondary"

frontend/src/components/Separator/Separator.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
44
// Please see LICENSE files in the repository root for full details.
55

6+
// biome-ignore-all lint/a11y/useFocusableInteractive: this is a false positive
7+
// biome-ignore-all lint/a11y/useAriaPropsForRole: this is a false positive
8+
69
import cx from "classnames";
710
import { forwardRef } from "react";
811

@@ -14,7 +17,6 @@ type Props = {
1417

1518
const Separator = forwardRef<HTMLDivElement, Props>(
1619
({ kind, className, ...props }: Props, ref) => (
17-
// biome-ignore lint/a11y/useFocusableInteractive: this is a false positive
1820
<div
1921
aria-orientation="horizontal"
2022
role="separator"

0 commit comments

Comments
 (0)