diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8a57ed3508..6943b33c60 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,5 +23,7 @@ jobs: run: bun run typecheck - name: Unit tests run: bun run test:unit:all + - name: Format markdown with Biome + run: npx biome format translation-progress.md - name: Check translations jsons run: bun run check-translation-jsons:no-write diff --git a/scripts/check-translation-jsons.ts b/scripts/check-translation-jsons.ts index 4eb2be0f49..8dfdc0a774 100644 --- a/scripts/check-translation-jsons.ts +++ b/scripts/check-translation-jsons.ts @@ -3,8 +3,6 @@ import fs from "node:fs"; import path from "node:path"; import { fileURLToPath } from "node:url"; -const biome = require("@biomejs/biome"); - const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -132,29 +130,8 @@ const markdown = createTranslationProgessMarkdown({ "translation-progress.md", ); + // translation-progress is formatted via the CI/CD pipeline prior to running this script fs.writeFileSync(translationProgressPath, markdown); - - try { - const content = fs.readFileSync(translationProgressPath, "utf8"); - - // Temporary workaround for typing - const format = (options: { - code: string; - filePath: string; - }): Promise => biome.format(options); - - const formattedContent = await format({ - code: content, - filePath: translationProgressPath, - }); - - // Write the formatted content back to the file - fs.writeFileSync(translationProgressPath, formattedContent); - - console.info("Markdown formatted successfully using Biome."); - } catch (error) { - console.error("Failed to format markdown using Biome.", error); - } })(); function validateNoExtraKeysInOther({