Skip to content

Commit

Permalink
fix: skip env validation on lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yjose committed Feb 3, 2024
1 parent 8569712 commit 15ee6e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"lint": "SKIP_ENV_VALIDATION=1 next lint",
"start": "next start",
"type-check": "tsc --noEmit"
},
Expand Down
4 changes: 4 additions & 0 deletions src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export const env = createEnv({
GITHUB_API_TOKEN: z.string(),
SPOTIFY_CLIENT_ID: z.string(),
SPOTIFY_CLIENT_SECRET: z.string(),
XATA_BRANCH: z.string(),
XATA_API_KEY: z.string(),
},

/**
Expand Down Expand Up @@ -42,6 +44,8 @@ export const env = createEnv({
GITHUB_API_TOKEN: process.env.GITHUB_API_TOKEN,
SPOTIFY_CLIENT_ID: process.env.SPOTIFY_CLIENT_ID,
SPOTIFY_CLIENT_SECRET: process.env.SPOTIFY_CLIENT_SECRET,
XATA_BRANCH: process.env.XATA_BRANCH,
XATA_API_KEY: process.env.XATA_API_KEY,
},
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation.
Expand Down

0 comments on commit 15ee6e8

Please sign in to comment.