From 7af6a34f20964472b647d4737103812494c29847 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 6 Jan 2026 00:17:26 +0100 Subject: [PATCH] fix(test): Resolve JSDoc and no-useless-escape lint issues in check-translations.test.js --- test/backend-test/check-translations.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/backend-test/check-translations.test.js b/test/backend-test/check-translations.test.js index 11cd3f986..e4be1ffdf 100644 --- a/test/backend-test/check-translations.test.js +++ b/test/backend-test/check-translations.test.js @@ -4,7 +4,10 @@ const fs = require("fs"); const path = require("path"); /** - * @param dir + * Recursively walks a directory and yields file paths. + * @param {string} dir The directory to walk. + * @yields {string} The path to a file. + * @returns {Generator} A generator that yields file paths. */ function* walk(dir) { const files = fs.readdirSync(dir, { withFileTypes: true }); @@ -21,7 +24,7 @@ describe("Check Translations", () => { it("should not have missing translation keys", () => { const enTranslations = JSON.parse(fs.readFileSync("src/lang/en.json", "utf-8")); - const translationRegex = /\$t\(['"](?.*?)['"]\s*[,)]|i18n-t\s+keypath=\"(?[^\"]+)\"/g; + const translationRegex = /\$t\(['"](?.*?)['"]\s*[,)]|i18n-t\s+keypath=\x22(?[^\x22]+)\x22/g; const missingKeys = [];