From 75a927ed620c15335a2b311811c74c9e88394c18 Mon Sep 17 00:00:00 2001 From: Kitteh Date: Sat, 24 Apr 2021 16:26:31 +0100 Subject: [PATCH] Run linter. --- .eslintrc.yml | 1 + src/main.js | 4 ++-- src/pages/SetLanguage.js | 2 +- src/pages/Unseal.js | 5 +++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index e1c36d1..8bded3c 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -12,6 +12,7 @@ globals: pageState: writable pageContent: writable realPages: writable + module: writable rules: diff --git a/src/main.js b/src/main.js index 59246a2..954afe9 100644 --- a/src/main.js +++ b/src/main.js @@ -179,7 +179,7 @@ function onLoad() { } } }, 5000); -}; +} document.addEventListener('DOMContentLoaded', function () { i18next.init({ @@ -200,7 +200,7 @@ document.addEventListener('DOMContentLoaded', function () { return value; } } - }).then(function (t) { + }).then(function (_) { onLoad(); }); }, false); diff --git a/src/pages/SetLanguage.js b/src/pages/SetLanguage.js index 600de55..447552c 100644 --- a/src/pages/SetLanguage.js +++ b/src/pages/SetLanguage.js @@ -51,7 +51,7 @@ export class SetLanguagePage extends Page { let formData = new FormData(setLanguageForm); let language = formData.get("language"); localStorage.setItem('language', language); - i18next.changeLanguage(language).then((t) => { + i18next.changeLanguage(language).then((_) => { changePage("HOME", false); location.reload(); }); diff --git a/src/pages/Unseal.js b/src/pages/Unseal.js index 092577a..9c28474 100644 --- a/src/pages/Unseal.js +++ b/src/pages/Unseal.js @@ -7,6 +7,7 @@ import { MarginInline } from "../elements/MarginInline.js"; import i18next from 'i18next'; import QrScanner from 'qr-scanner'; + /* eslint-disable import/no-unresolved */ import qrScannerWorkerSource from '!!raw-loader!qr-scanner/qr-scanner-worker.min.js'; QrScanner.WORKER_PATH = URL.createObjectURL(new Blob([qrScannerWorkerSource])); @@ -31,8 +32,8 @@ export class UnsealPage extends Page { this.stream.getTracks().forEach(function (track) { track.stop(); }); - } catch { - + } catch (_) { + console.log(""); } }