diff --git a/.github/workflows/frontend/ci.yml b/.github/workflows/frontend-ci.yml similarity index 74% rename from .github/workflows/frontend/ci.yml rename to .github/workflows/frontend-ci.yml index 28312ce..715f972 100644 --- a/.github/workflows/frontend/ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -5,12 +5,12 @@ on: branches: [main] paths: - 'frontend/**' - - '.github/workflows/frontend/**' + - '.github/workflows/frontend-ci.yml' pull_request: branches: [main] paths: - 'frontend/**' - - '.github/workflows/frontend/**' + - '.github/workflows/frontend-ci.yml' defaults: run: @@ -49,10 +49,26 @@ jobs: - run: npx tsc --noEmit + format: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + cache-dependency-path: frontend/package-lock.json + + - run: npm ci + + - run: npm run format:check + build: name: Build runs-on: ubuntu-latest - needs: [lint, type-check] + needs: [lint, type-check, format] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/frontend/deploy.yml b/.github/workflows/frontend-deploy.yml similarity index 100% rename from .github/workflows/frontend/deploy.yml rename to .github/workflows/frontend-deploy.yml diff --git a/frontend/AGENTS.md b/frontend/AGENTS.md index 8bd0e39..c153a9b 100644 --- a/frontend/AGENTS.md +++ b/frontend/AGENTS.md @@ -1,5 +1,7 @@ + # This is NOT the Next.js you know This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices. + diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index 05e726d..7fef4d3 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -1,6 +1,6 @@ -import { defineConfig, globalIgnores } from "eslint/config"; -import nextVitals from "eslint-config-next/core-web-vitals"; -import nextTs from "eslint-config-next/typescript"; +import { defineConfig, globalIgnores } from 'eslint/config' +import nextVitals from 'eslint-config-next/core-web-vitals' +import nextTs from 'eslint-config-next/typescript' const eslintConfig = defineConfig([ ...nextVitals, @@ -8,11 +8,11 @@ const eslintConfig = defineConfig([ // Override default ignores of eslint-config-next. globalIgnores([ // Default ignores of eslint-config-next: - ".next/**", - "out/**", - "build/**", - "next-env.d.ts", + '.next/**', + 'out/**', + 'build/**', + 'next-env.d.ts', ]), -]); +]) -export default eslintConfig; +export default eslintConfig diff --git a/frontend/next.config.ts b/frontend/next.config.ts index 66e1566..b0d9a6a 100644 --- a/frontend/next.config.ts +++ b/frontend/next.config.ts @@ -1,8 +1,8 @@ -import type { NextConfig } from "next"; +import type { NextConfig } from 'next' const nextConfig: NextConfig = { /* config options here */ reactCompiler: true, -}; +} -export default nextConfig; +export default nextConfig diff --git a/frontend/package.json b/frontend/package.json index 826911c..fe877a3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "eslint" + "lint": "eslint", + "format:check": "prettier --check ." }, "dependencies": { "next": "16.2.9", diff --git a/frontend/postcss.config.mjs b/frontend/postcss.config.mjs index 61e3684..ae85b2f 100644 --- a/frontend/postcss.config.mjs +++ b/frontend/postcss.config.mjs @@ -1,7 +1,7 @@ const config = { plugins: { - "@tailwindcss/postcss": {}, + '@tailwindcss/postcss': {}, }, -}; +} -export default config; +export default config diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index a2dc41e..37d72f8 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -1,4 +1,4 @@ -@import "tailwindcss"; +@import 'tailwindcss'; :root { --background: #ffffff; diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index 976eb90..bcdb60c 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -1,33 +1,33 @@ -import type { Metadata } from "next"; -import { Geist, Geist_Mono } from "next/font/google"; -import "./globals.css"; +import type { Metadata } from 'next' +import { Geist, Geist_Mono } from 'next/font/google' +import './globals.css' const geistSans = Geist({ - variable: "--font-geist-sans", - subsets: ["latin"], -}); + variable: '--font-geist-sans', + subsets: ['latin'], +}) const geistMono = Geist_Mono({ - variable: "--font-geist-mono", - subsets: ["latin"], -}); + variable: '--font-geist-mono', + subsets: ['latin'], +}) export const metadata: Metadata = { - title: "Create Next App", - description: "Generated by create next app", -}; + title: 'Create Next App', + description: 'Generated by create next app', +} export default function RootLayout({ children, }: Readonly<{ - children: React.ReactNode; + children: React.ReactNode }>) { return ( - {children} + {children} - ); + ) } diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 3f36f7c..f958f5e 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,9 +1,9 @@ -import Image from "next/image"; +import Image from 'next/image' export default function Home() { return ( -
-
+
+
-

+

To get started, edit the page.tsx file.

- Looking for a starting point or more instructions? Head over to{" "} + Looking for a starting point or more instructions? Head over to{' '} Templates - {" "} - or the{" "} + {' '} + or the{' '} Learning - {" "} + {' '} center.

- ); + ) }