refactor: replace short hand type conversions with function calls (#65)
* refactor: replace short hand type conversions with function calls Prefer using explicit casts by calling `Number`, `Boolean`, or `String` over using operators like `+`, `!!` or `"" +`. This is considered best practice as it improves readability. * fix: formatting --------- Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
committed by
GitHub
parent
11d1568714
commit
a4f6a7c16a
@@ -33,7 +33,7 @@ export const env = createEnv({
|
|||||||
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
|
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR,
|
||||||
},
|
},
|
||||||
skipValidation:
|
skipValidation:
|
||||||
!!process.env.CI ||
|
Boolean(process.env.CI) ||
|
||||||
!!process.env.SKIP_ENV_VALIDATION ||
|
Boolean(process.env.SKIP_ENV_VALIDATION) ||
|
||||||
process.env.npm_lifecycle_event === "lint",
|
process.env.npm_lifecycle_event === "lint",
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ export const integrationRouter = createTRPCRouter({
|
|||||||
const secretKinds = getSecretKinds(input.kind);
|
const secretKinds = getSecretKinds(input.kind);
|
||||||
const secrets = input.secrets.filter(
|
const secrets = input.secrets.filter(
|
||||||
(secret): secret is { kind: IntegrationSecretKind; value: string } =>
|
(secret): secret is { kind: IntegrationSecretKind; value: string } =>
|
||||||
!!secret.value,
|
Boolean(secret.value),
|
||||||
);
|
);
|
||||||
const everyInputSecretDefined = secretKinds.every((secretKind) =>
|
const everyInputSecretDefined = secretKinds.every((secretKind) =>
|
||||||
secrets.some((secret) => secret.kind === secretKind),
|
secrets.some((secret) => secret.kind === secretKind),
|
||||||
|
|||||||
@@ -20,5 +20,6 @@ export const env = createEnv({
|
|||||||
AUTH_SECRET: process.env.AUTH_SECRET,
|
AUTH_SECRET: process.env.AUTH_SECRET,
|
||||||
AUTH_URL: process.env.AUTH_URL,
|
AUTH_URL: process.env.AUTH_URL,
|
||||||
},
|
},
|
||||||
skipValidation: !!process.env.CI || !!process.env.SKIP_ENV_VALIDATION,
|
skipValidation:
|
||||||
|
Boolean(process.env.CI) || Boolean(process.env.SKIP_ENV_VALIDATION),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user