From 22dcc1052114e2df9be28c6fcbb8ce4b67d25c03 Mon Sep 17 00:00:00 2001 From: Daniela Rus Morales Date: Mon, 25 Nov 2024 17:33:37 +0100 Subject: [PATCH] JS Lint changes --- js/src/versions.js | 2 +- js/tests/karma.conf.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/src/versions.js b/js/src/versions.js index c1e38e8..36001e9 100644 --- a/js/src/versions.js +++ b/js/src/versions.js @@ -4,7 +4,7 @@ function _getCurrentVersion() { const all_version_elems = document.querySelectorAll(qs_version_url); for (const version_elem of all_version_elems) { let version_url = version_elem.dataset?.snfttVersionUrl; - version_url = version_url.replace("?", "\\?"); + version_url = version_url.replace("?", String.raw`\?`); if (new RegExp(version_url).test(window.location.href)) { return version_elem.dataset?.snfttVersion; }; diff --git a/js/tests/karma.conf.js b/js/tests/karma.conf.js index ed1c133..1b1a56f 100644 --- a/js/tests/karma.conf.js +++ b/js/tests/karma.conf.js @@ -117,7 +117,9 @@ config.frameworks = frameworks; config.plugins = plugins; config.reporters = reporters; -module.exports = (karmaConfig) => { +const getKarmaConfig = (karmaConfig) => { config.logLevel = karmaConfig.LOG_ERROR; karmaConfig.set(config); }; + +module.exports = getKarmaConfig;