Skip to content

Commit 053cb48

Browse files
committed
most
1 parent 2b19afc commit 053cb48

File tree

38 files changed

+127
-130
lines changed

38 files changed

+127
-130
lines changed

site/biome.json

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,18 @@
99
"linter": {
1010
"rules": {
1111
"a11y": {
12-
"noSvgWithoutTitle": {
13-
"level": "off"
14-
},
15-
"useButtonType": {
16-
"level": "off"
17-
}
12+
"noSvgWithoutTitle": { "level": "off" },
13+
"useButtonType": { "level": "off" }
1814
},
1915
"style": {
20-
"noNonNullAssertion": {
21-
"level": "off"
22-
},
16+
"noNonNullAssertion": { "level": "off" },
2317
"noParameterAssign": { "level": "off" },
24-
"useSelfClosingElements": {
25-
"level": "off"
26-
}
18+
"useDefaultParameterLast": { "level": "off" },
19+
"useSelfClosingElements": { "level": "off" }
2720
},
2821
"suspicious": {
29-
"noThenProperty": {
30-
"level": "off"
31-
}
22+
"noArrayIndexKey": { "level": "off" },
23+
"noThenProperty": { "level": "off" }
3224
},
3325
"nursery": {
3426
"noRestrictedImports": {

site/src/@types/mui.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// biome-ignore lint/nursery/noRestrictedImports: base theme types
12
import type { PaletteColor, PaletteColorOptions } from "@mui/material/styles";
23

34
declare module "@mui/material/styles" {

site/src/api/api.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const getMissingParameters = (
3434
const missingParameters: TypesGen.TemplateVersionParameter[] = [];
3535
const requiredParameters: TypesGen.TemplateVersionParameter[] = [];
3636

37-
templateParameters.forEach((p) => {
37+
for (const p of templateParameters) {
3838
// It is mutable and required. Mutable values can be changed after so we
3939
// don't need to ask them if they are not required.
4040
const isMutableAndRequired = p.mutable && p.required;
@@ -44,7 +44,7 @@ const getMissingParameters = (
4444
if (isMutableAndRequired || isImmutable) {
4545
requiredParameters.push(p);
4646
}
47-
});
47+
}
4848

4949
for (const parameter of requiredParameters) {
5050
// Check if there is a new value
@@ -68,9 +68,9 @@ const getMissingParameters = (
6868
}
6969

7070
// Check if parameter "options" changed and we can't use old build parameters.
71-
templateParameters.forEach((templateParameter) => {
71+
for (const templateParameter of templateParameters) {
7272
if (templateParameter.options.length === 0) {
73-
return;
73+
continue;
7474
}
7575

7676
// Check if there is a new value
@@ -86,7 +86,7 @@ const getMissingParameters = (
8686
}
8787

8888
if (!buildParameter) {
89-
return;
89+
continue;
9090
}
9191

9292
const matchingOption = templateParameter.options.find(
@@ -95,7 +95,8 @@ const getMissingParameters = (
9595
if (!matchingOption) {
9696
missingParameters.push(templateParameter);
9797
}
98-
});
98+
}
99+
99100
return missingParameters;
100101
};
101102

@@ -132,13 +133,11 @@ export const getURLWithSearchParams = (
132133
}
133134

134135
const searchParams = new URLSearchParams();
135-
const keys = Object.keys(options) as (keyof SearchParamOptions)[];
136-
keys.forEach((key) => {
137-
const value = options[key];
136+
for (const [key, value] of Object.entries(options)) {
138137
if (value !== undefined && value !== "") {
139138
searchParams.append(key, value.toString());
140139
}
141-
});
140+
}
142141

143142
const searchString = searchParams.toString();
144143
return searchString ? `${basePath}?${searchString}` : basePath;
@@ -993,8 +992,8 @@ class ApiMethods {
993992
let latestJobInfo: TypesGen.ProvisionerJob | undefined = undefined;
994993

995994
while (
996-
!["succeeded", "canceled"].some((status) =>
997-
latestJobInfo?.status.includes(status),
995+
!["succeeded", "canceled"].some(
996+
(status) => latestJobInfo?.status.includes(status),
998997
)
999998
) {
1000999
const { job } = await this.getWorkspaceBuildByNumber(

site/src/components/Alert/Alert.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// eslint-disable-next-line no-restricted-imports -- It is the base component
21
import MuiAlert, {
32
type AlertProps as MuiAlertProps,
3+
// biome-ignore lint/nursery/noRestrictedImports: Used as base component
44
} from "@mui/material/Alert";
55
import Button from "@mui/material/Button";
66
import Collapse from "@mui/material/Collapse";

site/src/components/Avatar/Avatar.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { css, type Interpolation, type Theme, useTheme } from "@emotion/react";
2-
// This is the only place MuiAvatar can be used
3-
// eslint-disable-next-line no-restricted-imports -- Read above
42
import MuiAvatar, {
53
type AvatarProps as MuiAvatarProps,
4+
// biome-ignore lint/nursery/noRestrictedImports: Used as base component
65
} from "@mui/material/Avatar";
76
import { visuallyHidden } from "@mui/utils";
87
import { type FC, useId } from "react";

site/src/components/ExternalImage/ExternalImage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export const ExternalImage = forwardRef<
99
const theme = useTheme();
1010

1111
return (
12+
// biome-ignore lint/a11y/useAltText: no reasonable alt to provide
1213
<img
1314
ref={ref}
14-
alt=""
1515
css={getExternalImageStylesFromUrl(theme.externalImages, attrs.src)}
1616
{...attrs}
1717
/>

site/src/components/GlobalSnackbar/EnterpriseSnackbar.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const meta: Meta<typeof EnterpriseSnackbar> = {
99
export default meta;
1010
type Story = StoryObj<typeof EnterpriseSnackbar>;
1111

12-
export const Error: Story = {
12+
export const WithError: Story = {
1313
args: {
1414
variant: "error",
1515
open: true,

site/src/components/Pill/Pill.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const Danger: Story = {
2222
},
2323
};
2424

25-
export const Error: Story = {
25+
export const WithError: Story = {
2626
args: {
2727
children: "Error",
2828
type: "error",

site/src/components/Popover/Popover.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// This is used as base for the main Popover component
2-
// eslint-disable-next-line no-restricted-imports -- Read above
31
import MuiPopover, {
42
type PopoverProps as MuiPopoverProps,
3+
// biome-ignore lint/nursery/noRestrictedImports: Used as base component
54
} from "@mui/material/Popover";
65
import {
76
cloneElement,

site/src/components/Search/Search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Interpolation, Theme } from "@emotion/react";
22
import SearchOutlined from "@mui/icons-material/SearchOutlined";
3-
// eslint-disable-next-line no-restricted-imports -- use it to have the component prop
3+
// biome-ignore lint/nursery/noRestrictedImports: use it to have the component prop
44
import Box, { type BoxProps } from "@mui/material/Box";
55
import visuallyHidden from "@mui/utils/visuallyHidden";
66
import type { FC, HTMLAttributes, InputHTMLAttributes, Ref } from "react";

0 commit comments

Comments
 (0)