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({ >