diff --git a/frontend/src/lib/storage-manager/storage-manager.js b/frontend/src/lib/storage-manager/storage-manager.js index 90f1e5d9f..049caa508 100644 --- a/frontend/src/lib/storage-manager/storage-manager.js +++ b/frontend/src/lib/storage-manager/storage-manager.js @@ -1,8 +1,8 @@ -// SPDX-FileCopyrightText: 2022 Gregor Kleen ,Johannes Eder ,Sarah Vaupel ,Sarah Vaupel +// SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel , Gregor Kleen ,Johannes Eder ,Sarah Vaupel ,Sarah Vaupel // // SPDX-License-Identifier: AGPL-3.0-or-later -/* global global:writable */ +/* global:writable */ import semver from 'semver'; import sodium from 'sodium-javascript'; @@ -365,7 +365,7 @@ export class StorageManager { } addHistoryListener(listener, options=this._options, ...args) { - const modified_listener = (function(event, ...listener_args) { // eslint-disable-line no-unused-vars + const modified_listener = (function(event, ...listener_args) { // do not propagate popstate events with empty state if(event.state === null) @@ -498,13 +498,11 @@ function encrypt(plaintext, key) { if (!plaintext) return ''; if (!key) throw new Error('Cannot encrypt plaintext without a valid key!'); - /* eslint-disable no-undef */ // TODO use const if possible let plaintextB = Buffer.from(plaintext); let cipherB = Buffer.alloc(plaintextB.length + sodium.crypto_secretbox_MACBYTES); let nonceB = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); let keyB = Buffer.from(key); - /* eslint-enable no-undef */ sodium.crypto_secretbox_easy(cipherB, plaintextB, nonceB, keyB); @@ -520,13 +518,11 @@ function decrypt(ciphertext, key) { if (!ciphertext) return ''; if (!key) throw new Error('Cannot decrypt ciphertext without a valid key!'); - /* eslint-disable no-undef */ // TODO use const if possible let cipherB = Buffer.from(ciphertext); let plaintextB = Buffer.alloc(cipherB.length - sodium.crypto_secretbox_MACBYTES); let nonceB = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES); let keyB = Buffer.from(key); - /* eslint-enable no-undef */ sodium.crypto_secretbox_open_easy(plaintextB, cipherB, nonceB, keyB); diff --git a/frontend/src/utils/exam-correct/exam-correct.js b/frontend/src/utils/exam-correct/exam-correct.js index 1af83031d..c7978325e 100644 --- a/frontend/src/utils/exam-correct/exam-correct.js +++ b/frontend/src/utils/exam-correct/exam-correct.js @@ -301,7 +301,7 @@ export class ExamCorrect { users: [user], status: STATUS.LOADING, }; - if (results && results !== {}) rowInfo.results = results; + if (results && results != {}) rowInfo.results = results; if (result !== undefined) rowInfo.result = result; this._addRow(rowInfo); diff --git a/frontend/src/utils/mass-input/mass-input.js b/frontend/src/utils/mass-input/mass-input.js index 4c0a60781..07d0a226d 100644 --- a/frontend/src/utils/mass-input/mass-input.js +++ b/frontend/src/utils/mass-input/mass-input.js @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: AGPL-3.0-or-later -/* global global:writable */ +/* global:writable */ import { Utility } from '../../core/utility'; import { Datepicker } from '../form/datepicker';