Skip to content

chore: replace eslint with biome #14263

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 26 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
format
  • Loading branch information
aslilac committed Aug 14, 2024
commit 5c0292b2ffb1c4e96ed315f46a2e6e1396b331fc
4 changes: 2 additions & 2 deletions site/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -992,8 +992,8 @@ class ApiMethods {
let latestJobInfo: TypesGen.ProvisionerJob | undefined = undefined;

while (
!["succeeded", "canceled"].some(
(status) => latestJobInfo?.status.includes(status),
!["succeeded", "canceled"].some((status) =>
latestJobInfo?.status.includes(status),
)
) {
const { job } = await this.getWorkspaceBuildByNumber(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,26 +157,27 @@ const ValidationSchemaForTemplateVariables = (
.of(
Yup.object().shape({
name: Yup.string().required(),
value: Yup.string().test("verify with template", (val, ctx) => {
const name = ctx.parent.name;
const templateVariable = templateVariables.find(
(variable) => variable.name === name,
);
if (templateVariable?.sensitive) {
// It's possible that the secret is already stored in database,
// so we can't properly verify the "required" condition.
return true;
}
if (templateVariable?.required) {
if (!val || val.length === 0) {
return ctx.createError({
path: ctx.path,
message: "Variable is required.",
});
value: Yup.string()
.test("verify with template", (val, ctx) => {
const name = ctx.parent.name;
const templateVariable = templateVariables.find(
(variable) => variable.name === name,
);
if (templateVariable?.sensitive) {
// It's possible that the secret is already stored in database,
// so we can't properly verify the "required" condition.
return true;
}
}
return true;
}),
if (templateVariable?.required) {
if (!val || val.length === 0) {
return ctx.createError({
path: ctx.path,
message: "Variable is required.",
});
}
}
return true;
}),
}),
)
.required();
Expand Down
Loading