fix: remove all linter errors

This commit is contained in:
Max Richter
2026-01-10 15:06:43 +01:00
parent e55f787a29
commit 694feb083d
20 changed files with 206 additions and 593 deletions

View File

@@ -8,7 +8,7 @@ import { articleMetadataSchema } from "./marka/schema.ts";
const openAI = OPENAI_API_KEY && new OpenAI({ apiKey: OPENAI_API_KEY });
interface MovieRecommendation {
export interface MovieRecommendation {
year: number;
title: string;
}
@@ -181,14 +181,14 @@ respond with a plain unordered list each item starting with the year the movie w
if (!res) return;
const recommendations = res.split("\n").map((entry) => {
const recommendations = res.split("\n").map((entry: string) => {
const [year, ...title] = entry.split("-");
return {
year: parseInt(year.trim()),
title: title.join(" ").replaceAll('"', "").trim(),
};
}).filter((y) => !Number.isNaN(y.year));
}).filter((y: { year: number }) => !Number.isNaN(y.year));
cache.set(cacheId, recommendations);