Skip to content

Commit 988c9af

Browse files
authored
chore: format code with semicolons when using prettier (#9555)
1 parent bef38b8 commit 988c9af

File tree

664 files changed

+17540
-17410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

664 files changed

+17540
-17410
lines changed

.prettierrc.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# This config file is used in conjunction with `.editorconfig` to specify
22
# formatting for prettier-supported files. See `.editorconfig` and
3-
# `site/.editorconfig`for whitespace formatting options.
3+
# `site/.editorconfig` for whitespace formatting options.
44
printWidth: 80
55
proseWrap: always
6-
semi: false
76
trailingComma: all
87
useTabs: false
98
tabWidth: 2

docs/contributing/frontend.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ export const getAgentListeningPorts = async (
128128
): Promise<TypesGen.ListeningPortsResponse> => {
129129
const response = await axios.get(
130130
`/api/v2/workspaceagents/${agentID}/listening-ports`,
131-
)
132-
return response.data
133-
}
131+
);
132+
return response.data;
133+
};
134134
```
135135

136136
Sometimes, a FE operation can have multiple API calls so it is ok to wrap it as
@@ -140,9 +140,9 @@ a single function.
140140
export const updateWorkspaceVersion = async (
141141
workspace: TypesGen.Workspace,
142142
): Promise<TypesGen.WorkspaceBuild> => {
143-
const template = await getTemplate(workspace.template_id)
144-
return startWorkspace(workspace.id, template.active_version_id)
145-
}
143+
const template = await getTemplate(workspace.template_id);
144+
return startWorkspace(workspace.id, template.active_version_id);
145+
};
146146
```
147147

148148
If you need more granular errors or control, you may should consider keep them
@@ -242,14 +242,14 @@ instead of using `screen.getByRole("button")` directly we could do
242242
slow.
243243

244244
```tsx
245-
user.click(screen.getByRole("button"))
245+
user.click(screen.getByRole("button"));
246246
```
247247

248248
✅ Better. We can limit the number of elements we are querying.
249249

250250
```tsx
251-
const form = screen.getByTestId("form")
252-
user.click(within(form).getByRole("button"))
251+
const form = screen.getByTestId("form");
252+
user.click(within(form).getByRole("button"));
253253
```
254254

255255
#### `jest.spyOn` with the API is not working

offlinedocs/next.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
const nextConfig = {
33
reactStrictMode: true,
44
trailingSlash: true,
5-
}
5+
};
66

7-
module.exports = nextConfig
7+
module.exports = nextConfig;

0 commit comments

Comments
 (0)