From 4496c5a9abc81c28a8935e538a2b3e8dd2e49dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Gr=C3=BCneberg?= Date: Tue, 23 Jul 2024 16:28:52 +0800 Subject: [PATCH] chore: only lint in CI, not on Vercel (#28136) --- .github/workflows/typecheck.yml | 5 ++++- apps/docs/next.config.mjs | 4 ++++ apps/studio/next.config.js | 4 ++++ apps/www/next.config.mjs | 9 +++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index eb4e5885a55..70481bb7bb3 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -1,4 +1,4 @@ -name: Check code with TypeScript +name: Check code with TypeScript & Lint on: pull_request: @@ -30,3 +30,6 @@ jobs: - name: Run TypeScript type check run: npx turbo run typecheck + + - name: Run Lint + run: npx turbo run lint diff --git a/apps/docs/next.config.mjs b/apps/docs/next.config.mjs index 64904e0eaaa..259c5e70ede 100644 --- a/apps/docs/next.config.mjs +++ b/apps/docs/next.config.mjs @@ -150,6 +150,10 @@ const nextConfig = { // Typechecking is checked separately via .github/workflows/typecheck.yml ignoreBuildErrors: true, }, + eslint: { + // We are already running linting via GH action, this will skip linting during production build on Vercel + ignoreDuringBuilds: true, + }, } const configExport = () => { diff --git a/apps/studio/next.config.js b/apps/studio/next.config.js index 914794799da..fe49f4b4c3f 100644 --- a/apps/studio/next.config.js +++ b/apps/studio/next.config.js @@ -469,6 +469,10 @@ const nextConfig = { // Typechecking is checked separately via .github/workflows/typecheck.yml ignoreBuildErrors: true, }, + eslint: { + // We are already running linting via GH action, this will skip linting during production build on Vercel + ignoreDuringBuilds: true, + }, } // module.exports = withBundleAnalyzer(nextConfig) diff --git a/apps/www/next.config.mjs b/apps/www/next.config.mjs index 89d085ba64e..5ff717c4de4 100644 --- a/apps/www/next.config.mjs +++ b/apps/www/next.config.mjs @@ -93,6 +93,15 @@ const nextConfig = { async redirects() { return redirects }, + typescript: { + // WARNING: production builds can successfully complete even there are type errors + // Typechecking is checked separately via .github/workflows/typecheck.yml + ignoreBuildErrors: true, + }, + eslint: { + // We are already running linting via GH action, this will skip linting during production build on Vercel + ignoreDuringBuilds: true, + }, } // next.config.js.