From 77ab711d41b94d471cda13ec1401161014e0be56 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 26 May 2026 19:32:19 +0800 Subject: [PATCH] chore: restore quality gates --- .github/workflows/lint.yml | 26 +- app/(auth)/api/auth/[...nextauth]/route.ts | 10 +- app/(auth)/auth.ts | 1 - app/(auth)/register/page.tsx | 1 - app/(chat)/api/chat/[id]/stream/route.ts | 1 - app/layout.tsx | 2 - biome.jsonc | 167 +- .../agents/AgentGenerationWorkspaceDark.tsx | 314 ++- .../agents/AgentGenerationWorkspaceNew.tsx | 316 ++- .../agents/AgentPsdTemplateEditorDialog.tsx | 2 - components/canvas/ObjectPickerOverlay.tsx | 349 +-- components/console.tsx | 1 - components/elements/image.tsx | 2 - components/image-annotator.tsx | 1973 ++++++++++------- components/image-editor.tsx | 1 - create-admin.ts | 4 - drizzle.config.ts | 1 - lib/db/queries.ts | 1 - lib/logger.ts | 34 +- next.config.ts | 18 +- types/matter-js.d.ts | 87 + 21 files changed, 2067 insertions(+), 1244 deletions(-) create mode 100644 types/matter-js.d.ts diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1d57a670b..2b2d09164 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,25 +1,45 @@ -name: Lint +name: Quality Gates + on: push: + pull_request: jobs: - build: + quality: runs-on: ubuntu-22.04 strategy: matrix: node-version: [20] steps: - uses: actions/checkout@v4 + - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 9.12.3 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: "pnpm" + - name: Install dependencies - run: pnpm install + run: pnpm install --frozen-lockfile + - name: Run lint run: pnpm lint + + - name: Run typecheck + run: pnpm exec tsc --noEmit --pretty false + + - name: Check diff hygiene + run: git diff --check + + - name: Check tracked local artifacts + shell: bash + run: | + if git ls-files | grep -E '(^|/)\.DS_Store$|\.swp$|\.env\.local$|^\.claude/|^migration-backup|^tsconfig\.tsbuildinfo$'; then + echo "Tracked local artifacts found. Remove them from git tracking before merging." + exit 1 + fi diff --git a/app/(auth)/api/auth/[...nextauth]/route.ts b/app/(auth)/api/auth/[...nextauth]/route.ts index 886a41c3e..d104b65e6 100644 --- a/app/(auth)/api/auth/[...nextauth]/route.ts +++ b/app/(auth)/api/auth/[...nextauth]/route.ts @@ -1,9 +1 @@ -import { GET as AuthGET, POST as AuthPOST } from "@/app/(auth)/auth"; - -export const GET = async (req: Request) => { - return AuthGET(req); -}; - -export const POST = async (req: Request) => { - return AuthPOST(req); -}; +export { GET, POST } from "@/app/(auth)/auth"; diff --git a/app/(auth)/auth.ts b/app/(auth)/auth.ts index 296de6639..b26d1b5d3 100644 --- a/app/(auth)/auth.ts +++ b/app/(auth)/auth.ts @@ -30,7 +30,6 @@ declare module "next-auth" { } & DefaultSession["user"]; } - // biome-ignore lint/nursery/useConsistentTypeDefinitions: "Required" interface User { id?: string; email?: string | null; diff --git a/app/(auth)/register/page.tsx b/app/(auth)/register/page.tsx index 29bd06b21..219ebf9ad 100644 --- a/app/(auth)/register/page.tsx +++ b/app/(auth)/register/page.tsx @@ -87,7 +87,6 @@ export default function Page() { } ); - // biome-ignore lint/correctness/useExhaustiveDependencies: router is a stable ref useEffect(() => { if (redirectTimerRef.current) { window.clearTimeout(redirectTimerRef.current); diff --git a/app/(chat)/api/chat/[id]/stream/route.ts b/app/(chat)/api/chat/[id]/stream/route.ts index 48352e976..3f0fae9ee 100644 --- a/app/(chat)/api/chat/[id]/stream/route.ts +++ b/app/(chat)/api/chat/[id]/stream/route.ts @@ -63,7 +63,6 @@ export async function GET( } const emptyDataStream = createUIMessageStream({ - // biome-ignore lint/suspicious/noEmptyBlockStatements: "Needs to exist" execute: () => {}, }); diff --git a/app/layout.tsx b/app/layout.tsx index 0c0ed7c4c..272befcfa 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -173,13 +173,11 @@ export default async function RootLayout({ >