mirror of
https://github.com/mgeeky/decode-spam-headers.git
synced 2026-02-22 13:33:30 +01:00
MAESTRO: Fix linting config and formatting
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()]
|
||||
|
||||
@@ -2,7 +2,6 @@ from fastapi.testclient import TestClient
|
||||
|
||||
from app.main import app
|
||||
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
17
frontend/package-lock.json
generated
17
frontend/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -24,11 +24,7 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
{children}
|
||||
</body>
|
||||
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>{children}</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -74,9 +74,9 @@ describe("api client", () => {
|
||||
const stream = new ReadableStream<Uint8Array>({
|
||||
start(controller) {
|
||||
controller.enqueue(encoder.encode("event: progress\n"));
|
||||
controller.enqueue(encoder.encode("data: {\"step\": 1}\n\n"));
|
||||
controller.enqueue(encoder.encode('data: {"step": 1}\n\n'));
|
||||
controller.enqueue(encoder.encode("event: result\n"));
|
||||
controller.enqueue(encoder.encode("data: {\"done\": true}\n\n"));
|
||||
controller.enqueue(encoder.encode('data: {"done": true}\n\n'));
|
||||
controller.close();
|
||||
},
|
||||
});
|
||||
|
||||
@@ -42,10 +42,7 @@ export interface ApiClient {
|
||||
request<TResponse>(path: string, init?: RequestInit & { body?: unknown }): Promise<TResponse>;
|
||||
get<TResponse>(path: string, init?: RequestInit): Promise<TResponse>;
|
||||
post<TResponse, TBody>(path: string, body: TBody, init?: RequestInit): Promise<TResponse>;
|
||||
stream<TBody, TEvent>(
|
||||
path: string,
|
||||
options: StreamRequestOptions<TBody, TEvent>,
|
||||
): Promise<void>;
|
||||
stream<TBody, TEvent>(path: string, options: StreamRequestOptions<TBody, TEvent>): Promise<void>;
|
||||
}
|
||||
|
||||
type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
||||
|
||||
Reference in New Issue
Block a user