diff --git a/dev-dist/registerSW.js b/dev-dist/registerSW.js deleted file mode 100644 index 1d5625f45c..0000000000 --- a/dev-dist/registerSW.js +++ /dev/null @@ -1 +0,0 @@ -if('serviceWorker' in navigator) navigator.serviceWorker.register('/dev-sw.js?dev-sw', { scope: '/', type: 'classic' }) \ No newline at end of file diff --git a/src/plugins/Codemirror/.mocharc.json b/src/plugins/Codemirror/.mocharc.json index 4772bd6a99..fbd14399f9 100644 --- a/src/plugins/Codemirror/.mocharc.json +++ b/src/plugins/Codemirror/.mocharc.json @@ -1,6 +1,4 @@ { "extensions": ["ts"], - "node-option": [ - "loader=ts-node/esm" - ] - } \ No newline at end of file + "node-option": ["loader=ts-node/esm"] +} diff --git a/src/plugins/Codemirror/mochaFileTests.ts b/src/plugins/Codemirror/mochaFileTests.ts index 1c9090c4e9..63ca93d522 100644 --- a/src/plugins/Codemirror/mochaFileTests.ts +++ b/src/plugins/Codemirror/mochaFileTests.ts @@ -25,8 +25,8 @@ function getLineNumber(text: string, index: number) { } export function fileTests(file: string, fileName: string, onlyNoError = false, mayIgnore = defaultIgnore) { - let caseExpr = /\s*#[ \t]*(.*)(?:\r\n|\r|\n)([^]*?)==+>([^]*?)(?:$|(?:\r\n|\r|\n)+(?=#))/gy - let tests: { + const caseExpr = /\s*#[ \t]*(.*)(?:\r\n|\r|\n)([^]*?)==+>([^]*?)(?:$|(?:\r\n|\r|\n)+(?=#))/gy + const tests: { name: string text: string expected: string @@ -60,12 +60,12 @@ export function fileTests(file: string, fileName: string, onlyNoError = false, m }) } else { for (;;) { - let m = caseExpr.exec(file) + const m = caseExpr.exec(file) if (!m) throw new Error(`Unexpected file format in ${fileName} around\n\n${toLineContext(file, lastIndex)}`) - let text = m[2] - let expected = m[3].trim() - let [, name, configStr] = /(.*?)(\{.*?\})?$/.exec(m[1])! + const text = m[2] + const expected = m[3].trim() + const [, name, configStr] = /(.*?)(\{.*?\})?$/.exec(m[1])! if (expected == 'error') { tests.push({ @@ -85,8 +85,8 @@ export function fileTests(file: string, fileName: string, onlyNoError = false, m }, }) } else { - let config = configStr ? JSON.parse(configStr) : null - let strict = !/⚠|\.\.\./.test(expected) + const config = configStr ? JSON.parse(configStr) : null + const strict = !/⚠|\.\.\./.test(expected) tests.push({ name, text, diff --git a/src/plugins/Codemirror/package.json b/src/plugins/Codemirror/package.json index 714df12c37..94a2534f1d 100644 --- a/src/plugins/Codemirror/package.json +++ b/src/plugins/Codemirror/package.json @@ -8,4 +8,4 @@ "import": "./dist/klipperCfgParser.es.js", "require": "./dist/klipperCfgParser.cjs" } -} \ No newline at end of file +}