Fix lint warnings

This commit is contained in:
Jonas Lochmann 2024-07-29 02:00:00 +02:00
parent b69271f7df
commit 9c2048af64
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36
4 changed files with 609 additions and 469 deletions

1065
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -38,8 +38,8 @@
"@types/lodash": "^4.14.166",
"@types/node": "^16.11.59",
"@types/nodemailer": "^6.4.4",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^8.7.0",
"rimraf": "^3.0.2",
"typescript": "^5.5.4",

View file

@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2022 Jonas Lochmann
* Copyright (C) 2019 - 2024 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@ -26,7 +26,7 @@ export const config = {
expireTimeRounding: 1000 * 60 * 15
}
export function calculateExpireTime(now: bigint): BigInt {
export function calculateExpireTime(now: bigint): bigint {
const expireBaseTime = now + BigInt(config.expireDelay)
const expireTime = expireBaseTime - expireBaseTime % BigInt(config.expireTimeRounding) + BigInt(config.expireTimeRounding)

View file

@ -25,7 +25,10 @@ export const createUmzug = (sequelize: Sequelize) => (
migrations: {
glob: resolve(__dirname, '../../../build/database/migration/migrations/*.js'),
resolve: ({ name, path }) => {
const migration = require(path!!)
if (!path) throw new Error()
// eslint-disable-next-line @typescript-eslint/no-var-requires
const migration = require(path)
return {
name,