diff --git a/Auto Run Docs/SpecKit-web-header-analyzer-Phase-01-Project-Setup.md b/Auto Run Docs/SpecKit-web-header-analyzer-Phase-01-Project-Setup.md index 7600dda..a7cfd10 100644 --- a/Auto Run Docs/SpecKit-web-header-analyzer-Phase-01-Project-Setup.md +++ b/Auto Run Docs/SpecKit-web-header-analyzer-Phase-01-Project-Setup.md @@ -72,7 +72,7 @@ The hacker-themed dark colour palette (from spec FR-14): - [x] Backend starts with `uvicorn backend.app.main:app` and returns 200 on root - [x] Frontend starts with `npm run dev` and renders a blank page -- [ ] Linting passes on both sides (`ruff check backend/`, `npx eslint src/`, `npx prettier --check src/`) +- [x] Linting passes on both sides (`ruff check backend/`, `npx eslint src/`, `npx prettier --check src/`) - [ ] Playwright test runner executes with `npx playwright test` (no tests yet, but config loads without error) - [ ] TypeScript compilation succeeds with zero errors in strict mode - [ ] Run `/speckit.analyze` to verify consistency diff --git a/backend/app/core/config.py b/backend/app/core/config.py index 7df31d1..0999aac 100644 --- a/backend/app/core/config.py +++ b/backend/app/core/config.py @@ -52,7 +52,11 @@ class Settings(BaseSettings): try: parsed = json.loads(text) if isinstance(parsed, list): - return [str(item).strip() for item in parsed if str(item).strip()] + return [ + str(item).strip() + for item in parsed + if str(item).strip() + ] except json.JSONDecodeError: pass return [item.strip() for item in text.split(",") if item.strip()] diff --git a/backend/tests/test_main.py b/backend/tests/test_main.py index 6ef56d3..241b5a4 100644 --- a/backend/tests/test_main.py +++ b/backend/tests/test_main.py @@ -2,7 +2,6 @@ from fastapi.testclient import TestClient from app.main import app - client = TestClient(app) diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index 43fd8c9..482bb87 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -1,13 +1,4 @@ -import fs from "node:fs"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import { FlatCompat } from "@eslint/eslintrc"; +import coreWebVitals from "eslint-config-next/core-web-vitals"; +import typescript from "eslint-config-next/typescript"; -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const legacyConfigPath = path.join(__dirname, ".eslintrc.json"); -const legacyConfig = JSON.parse(fs.readFileSync(legacyConfigPath, "utf8")); - -const compat = new FlatCompat({ baseDirectory: __dirname }); - -export default compat.config(legacyConfig); +export default [...coreWebVitals, ...typescript]; diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f50080b..53ae566 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -27,6 +27,7 @@ "eslint": "^9.39.2", "eslint-config-next": "16.1.6", "jsdom": "^28.1.0", + "prettier": "^3.8.1", "tailwindcss": "^4", "typescript": "^5", "vitest": "^4.0.18" @@ -7003,6 +7004,22 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz", + "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", diff --git a/frontend/package.json b/frontend/package.json index cc5b74c..8290556 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -28,6 +28,7 @@ "eslint": "^9.39.2", "eslint-config-next": "16.1.6", "jsdom": "^28.1.0", + "prettier": "^3.8.1", "tailwindcss": "^4", "typescript": "^5", "vitest": "^4.0.18" diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index f7fa87e..6ad27e3 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -24,11 +24,7 @@ export default function RootLayout({ }>) { return ( -
- {children} - + {children} ); } diff --git a/frontend/src/lib/api-client.test.ts b/frontend/src/lib/api-client.test.ts index abb7bec..803556b 100644 --- a/frontend/src/lib/api-client.test.ts +++ b/frontend/src/lib/api-client.test.ts @@ -74,9 +74,9 @@ describe("api client", () => { const stream = new ReadableStream