Skip to content

chore: format code with semicolons when using prettier #9555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2023
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# This config file is used in conjunction with `.editorconfig` to specify
# formatting for prettier-supported files. See `.editorconfig` and
# `site/.editorconfig`for whitespace formatting options.
# `site/.editorconfig` for whitespace formatting options.
printWidth: 80
proseWrap: always
semi: false
trailingComma: all
useTabs: false
tabWidth: 2
Expand Down
18 changes: 9 additions & 9 deletions docs/contributing/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ export const getAgentListeningPorts = async (
): Promise<TypesGen.ListeningPortsResponse> => {
const response = await axios.get(
`/api/v2/workspaceagents/${agentID}/listening-ports`,
)
return response.data
}
);
return response.data;
};
```

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

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

```tsx
user.click(screen.getByRole("button"))
user.click(screen.getByRole("button"));
```

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

```tsx
const form = screen.getByTestId("form")
user.click(within(form).getByRole("button"))
const form = screen.getByTestId("form");
user.click(within(form).getByRole("button"));
```

#### `jest.spyOn` with the API is not working
Expand Down
4 changes: 2 additions & 2 deletions offlinedocs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
const nextConfig = {
reactStrictMode: true,
trailingSlash: true,
}
};

module.exports = nextConfig
module.exports = nextConfig;
Loading