Skip to content

Commit 9ca4c71

Browse files
committed
Enable recommended rules and fix all linting issues
1 parent 7a6ac72 commit 9ca4c71

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

+149
-130
lines changed

frontend/.storybook/preview.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
// SPDX-License-Identifier: AGPL-3.0-only
55
// Please see LICENSE in the repository root for full details.
66

7-
import { ArgTypes, Decorator, Parameters, Preview } from "@storybook/react";
7+
import type {
8+
ArgTypes,
9+
Decorator,
10+
Parameters,
11+
Preview,
12+
} from "@storybook/react";
813
import { TooltipProvider } from "@vector-im/compound-web";
914
import { useLayoutEffect } from "react";
1015

frontend/biome.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,19 @@
88
"**/dist/**",
99
"**/__generated__/**",
1010
"**/coverage/**",
11-
"src/gql/**"
11+
"src/gql/**",
12+
"src/routeTree.gen.ts"
1213
]
1314
},
1415
"formatter": {
1516
"enabled": true,
1617
"useEditorconfig": true,
17-
"ignore": [
18-
".storybook/locales.ts",
19-
"locales/*.json",
20-
"src/routeTree.gen.ts"
21-
]
18+
"ignore": [".storybook/locales.ts", "locales/*.json"]
2219
},
2320
"linter": {
2421
"enabled": true,
2522
"rules": {
26-
"recommended": false
23+
"recommended": true
2724
}
2825
}
2926
}

frontend/codegen.ts

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

7-
import { CodegenConfig } from "@graphql-codegen/cli";
7+
import type { CodegenConfig } from "@graphql-codegen/cli";
88

99
// Adds a comment to the top of generated files to ignore linting and formatting
1010
const lintIgnore = {

frontend/src/components/AccountManagementPasswordPreview/AccountManagementPasswordPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Link } from "@tanstack/react-router";
88
import { Form } from "@vector-im/compound-web";
99
import { useTranslation } from "react-i18next";
1010

11-
import { FragmentType, graphql, useFragment } from "../../gql";
11+
import { type FragmentType, graphql, useFragment } from "../../gql";
1212

1313
import styles from "./AccountManagementPasswordPreview.module.css";
1414

frontend/src/components/Block/Block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { Heading } from "@vector-im/compound-web";
88
import cx from "classnames";
9-
import { ReactNode } from "react";
9+
import type { ReactNode } from "react";
1010

1111
import styles from "./Block.module.css";
1212

frontend/src/components/BlockList/BlockList.stories.tsx

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

7-
import { Meta, StoryObj } from "@storybook/react";
7+
import type { Meta, StoryObj } from "@storybook/react";
88
import { H2, Text } from "@vector-im/compound-web";
99

1010
import Block from "../Block";

frontend/src/components/BrowserSession.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { useCallback } from "react";
1313
import { useTranslation } from "react-i18next";
1414
import { useMutation } from "urql";
1515

16-
import { FragmentType, graphql, useFragment } from "../gql";
16+
import { type FragmentType, graphql, useFragment } from "../gql";
1717
import { DeviceType } from "../gql/graphql";
1818

1919
import DateTime from "./DateTime";

frontend/src/components/ButtonLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { createLink } from "@tanstack/react-router";
88
import { Button } from "@vector-im/compound-web";
9-
import { PropsWithChildren, forwardRef } from "react";
9+
import { type PropsWithChildren, forwardRef } from "react";
1010

1111
type Props = {
1212
kind?: "primary" | "secondary" | "tertiary";

frontend/src/components/Client/OAuth2ClientDetail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { H3 } from "@vector-im/compound-web";
88
import { useTranslation } from "react-i18next";
99

10-
import { FragmentType, useFragment } from "../../gql";
10+
import { type FragmentType, useFragment } from "../../gql";
1111
import { graphql } from "../../gql/gql";
1212
import BlockList from "../BlockList/BlockList";
1313
import ExternalLink from "../ExternalLink/ExternalLink";

frontend/src/components/CompatSession.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { parseISO } from "date-fns";
88
import { useTranslation } from "react-i18next";
99
import { useMutation } from "urql";
1010

11-
import { FragmentType, graphql, useFragment } from "../gql";
11+
import { type FragmentType, graphql, useFragment } from "../gql";
1212
import { DeviceType } from "../gql/graphql";
1313

1414
import { browserLogoUri } from "./BrowserSession";

0 commit comments

Comments
 (0)