diff --git a/eslint.config.mjs b/eslint.config.mjs index 4d0d22486..ddec96ac2 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -18,7 +18,7 @@ export default [ { rules: { "comma-dangle": ["error", "always-multiline"], - complexity: ["error", 8], + complexity: ["error", 15], quotes: ["error", "double"], semi: ["error", "always"], }, diff --git a/package.json b/package.json index b50d0b434..e5b390909 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "start": "find ./cache/**/*.html -mmin +10 -exec rm -f {} \\; | DEBUG=paris2024:* ts-node src/index.ts", "dev": "DEBUG=paris2024:* nodemon src/index.ts", + "build": "tsc", "lint": "eslint . --fix", "test": "vitest run --coverage" }, diff --git a/src/calendar.ts b/src/calendar.ts index f3ec48cb3..b19597201 100644 --- a/src/calendar.ts +++ b/src/calendar.ts @@ -3,7 +3,7 @@ import autoprefixer from "autoprefixer"; import postcss from "postcss"; import tailwindcss from "tailwindcss"; -import { Event, NOC, Sport } from "./types"; +import { Event, Medal, NOC, Sport } from "./types"; import { getAllSportsKeys, getSportIcon } from "./sports"; import { existsSync, writeFileSync } from "fs"; import { hasFile, readFile, saveFile } from "./io"; @@ -20,6 +20,7 @@ export class Calendar { private events: Event[] = []; private nocs: string[] = []; private sports: Sport[] = []; + private medals: Medal[] = []; constructor(language: string) { this.language = language; @@ -164,8 +165,8 @@ export class Calendar { DTSTAMP: startDateUtc.replace(/[:-]/g, ""), DTSTART: startDateUtc.replace(/[:-]/g, ""), DTEND: endDateUtc.replace(/[:-]/g, ""), - DESCRIPTION: `Paris 2024 - ${translate.openingCeremony.get(this.language)}`, - SUMMARY: `Paris 2024 - ${translate.openingCeremony.get(this.language)}`, + DESCRIPTION: `Paris 2024 - {{translate_openingCeremony}}`, + SUMMARY: `Paris 2024 - {{translate_openingCeremon}}`, LOCATION: "Paris", _COMPETITORS: [], _GENDER: "", @@ -307,10 +308,10 @@ export class Calendar { calendars.push(`