Skip to content

Commit 67f5d94

Browse files
committed
fix: type issue in env.ts
1 parent 377326d commit 67f5d94

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

env.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineConfig({
1919
validator: 'builtin',
2020
schema: {
2121
APP_TITLE: Schema.string(),
22-
APP_ENVIRONMENT: (key, value) => {
22+
APP_ENVIRONMENT: (key: string, value: string) => {
2323
// NOTE: APP_ENVIRONMENT_PLACEHOLDER is meant to be used with image builds
2424
// The value will be later replaced with the actual value
2525
const regex = /^production|staging|testing|alpha-\d+|development|APP_ENVIRONMENT_PLACEHOLDER$/;
@@ -28,7 +28,8 @@ export default defineConfig({
2828
throw new Error(`Value for environment variable "${key}" must match regex "${regex}", instead received "${value}"`);
2929
}
3030
if (value === 'APP_ENVIRONMENT_PLACEHOLDER') {
31-
console.warn(`Using ${value} for app environment. Make sure to not use this for builds without nginx-serve`)
31+
// eslint-disable-next-line no-console
32+
console.warn(`Using ${value} for app environment. Make sure to not use this for builds without nginx-serve`);
3233
}
3334
return value as ('production' | 'staging' | 'testing' | `alpha-${number}` | 'development' | 'APP_ENVIRONMENT_PLACEHOLDER');
3435
},

0 commit comments

Comments
 (0)