chore(frontend): eslint
This commit is contained in:
parent
6e42c3d1c7
commit
03aa1c6837
@ -1,8 +1,8 @@
|
||||
// SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Johannes Eder <ederj@cip.ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>
|
||||
// SPDX-FileCopyrightText: 2022-2024 Sarah Vaupel <sarah.vaupel@uniworx.de>, Gregor Kleen <gregor.kleen@ifi.lmu.de>,Johannes Eder <ederj@cip.ifi.lmu.de>,Sarah Vaupel <sarah.vaupel@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>
|
||||
//
|
||||
// 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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
Reference in New Issue
Block a user