From 5569dd47dcbc2fa33b2b9061ffa3a8f32e10773d Mon Sep 17 00:00:00 2001 From: jsun969 Date: Thu, 18 Jan 2024 23:56:09 +1030 Subject: [PATCH] chore: skip env validation when lint --- package.json | 2 +- src/env.mjs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 9cfa1719..419b6e13 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "build": "tsec --noEmit && next build", "analyse": "cross-env ANALYSE=true next build", "start": "next start", - "lint": "next lint", + "lint": "cross-env SKIP_ENV_VALIDATION=true next lint", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,css,json,yaml,yml,mjs}\"", "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,css,json,yaml,yml,mjs}\"" }, diff --git a/src/env.mjs b/src/env.mjs index b77c1386..79170bc9 100644 --- a/src/env.mjs +++ b/src/env.mjs @@ -11,4 +11,5 @@ export const env = createEnv({ experimental__runtimeEnv: { NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: process.env.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY, }, + skipValidation: process.env.SKIP_ENV_VALIDATION, });