Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 30 additions & 18 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"organizeImports": {
"enabled": true
},
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignore": [
".devcontainer/**",
"docs/**",
"translations/**",
"policies/**",
"crates/**",
"frontend/package.json",
"frontend/src/gql/**",
"frontend/src/routeTree.gen.ts",
"frontend/.storybook/locales.ts",
"frontend/.storybook/public/mockServiceWorker.js",
"frontend/locales/*.json",
"**/coverage/**",
"**/dist/**"
"includes": [
"**",
"!**/.devcontainer/**",
"!**/docs/**",
"!**/translations/**",
"!**/policies/**",
"!**/crates/**",
"!**/frontend/package.json",
"!**/frontend/src/gql/**",
"!**/frontend/src/routeTree.gen.ts",
"!**/frontend/.storybook/locales.ts",
"!**/frontend/.storybook/public/mockServiceWorker.js",
"!**/frontend/locales/**/*.json",
"!**/coverage/**",
"!**/dist/**"
]
},
"formatter": {
Expand All @@ -36,6 +35,19 @@
"correctness": {
"noUnusedImports": "warn",
"noUnusedVariables": "warn"
},
"style": {
"noParameterAssign": "error",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error",
"noDescendingSpecificity": "off"
}
}
}
Expand Down
82 changes: 36 additions & 46 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"vaul": "^1.1.2"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@biomejs/biome": "^2.0.6",
"@browser-logos/chrome": "^2.0.0",
"@browser-logos/firefox": "^3.0.10",
"@browser-logos/safari": "^2.1.0",
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/AccountDeleteButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ const AccountDeleteButton: React.FC<Props> = (props) => {
mutationFn: ({
password,
hsErase,
}: { password: string | null; hsErase: boolean }) =>
}: {
password: string | null;
hsErase: boolean;
}) =>
graphqlRequest({
query: MUTATION,
variables: { password, hsErase },
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ButtonLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { createLink } from "@tanstack/react-router";
import { Button } from "@vector-im/compound-web";
import cx from "classnames";
import { type PropsWithChildren, forwardRef } from "react";
import { forwardRef, type PropsWithChildren } from "react";
import styles from "./ButtonLink.module.css";

type Props = {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Dialog/Dialog.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@

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

/* Drawer comes in the Android style by default */
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ export const Title: React.FC<PropsWithChildren> = ({ children }) => (
<DialogTitle className={styles.title}>{children}</DialogTitle>
);

export { Description, Close } from "@radix-ui/react-dialog";
export { Close, Description } from "@radix-ui/react-dialog";
2 changes: 1 addition & 1 deletion frontend/src/components/Dialog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
// Please see LICENSE files in the repository root for full details.

export { Close, Dialog, Title, Description } from "./Dialog";
export { Close, Description, Dialog, Title } from "./Dialog";
1 change: 1 addition & 0 deletions frontend/src/components/Layout/Layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

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

margin: 0 auto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

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

justify-content: center;
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/PaginationControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const PaginationControls: React.FC<Props> = ({
{t("common.previous")}
</Button>
<div className="text-center">
{count !== undefined ? (
<>{t("frontend.pagination_controls.total", { totalCount: count })}</>
) : null}
{count !== undefined
? t("frontend.pagination_controls.total", { totalCount: count })
: null}
</div>
<Button
kind="secondary"
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/components/Separator/Separator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
// Please see LICENSE files in the repository root for full details.

// biome-ignore-all lint/a11y/useFocusableInteractive: this is a false positive
// biome-ignore-all lint/a11y/useAriaPropsForRole: this is a false positive

import cx from "classnames";
import { forwardRef } from "react";

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

const Separator = forwardRef<HTMLDivElement, Props>(
({ kind, className, ...props }: Props, ref) => (
// biome-ignore lint/a11y/useFocusableInteractive: this is a false positive
<div
aria-orientation="horizontal"
role="separator"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Session/DeviceTypeIcon.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { composeStory } from "@storybook/react-vite";
import { render } from "@testing-library/react";
import { describe, expect, it } from "vitest";

import Meta, { Unknown, Pc, Mobile, Tablet } from "./DeviceTypeIcon.stories";
import Meta, { Mobile, Pc, Tablet, Unknown } from "./DeviceTypeIcon.stories";

describe("<DeviceTypeIcon />", () => {
it("renders unknown device type", () => {
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/components/SessionCard/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
// Please see LICENSE files in the repository root for full details.

export {
Root,
LinkBody,
Action,
Body,
Header,
Name,
Client,
Metadata,
Header,
Info,
Action,
LinkBody,
Metadata,
Name,
Root,
} from "./SessionCard";
Loading
Loading