properly mark unused params

This commit is contained in:
Rory&
2026-03-14 03:59:28 +01:00
parent 27cb026967
commit a451f92e67
27 changed files with 78 additions and 39 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ export class UrlSignResult {
}
export const getUrlSignature = (data: NewUrlSignatureData): UrlSignResult => {
const { cdnSignatureKey, cdnSignatureDuration } = Config.get().security;
const { cdnSignatureDuration } = Config.get().security;
// calculate the expiration time
const now = Date.now();
+1 -1
View File
@@ -99,7 +99,7 @@ export class UserSettingsProtos extends BaseClassWithoutId {
}
static async getOrDefault(user_id: string, save: boolean = false): Promise<UserSettingsProtos> {
const user = await User.findOneOrFail({
await User.findOneOrFail({
where: { id: user_id },
select: { settings: true },
});
+1 -1
View File
@@ -719,7 +719,7 @@ export class initial0 implements MigrationInterface {
await queryRunner.query(`ALTER TABLE ONLY public.team_members ADD CONSTRAINT "FK_fdad7d5768277e60c40e01cdcea" FOREIGN KEY (team_id) REFERENCES public.teams(id) ON DELETE CASCADE;`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
public async down(_: QueryRunner): Promise<void> {
throw new Error("Can't revert this: just throw away your database lol");
}
}
@@ -6,5 +6,5 @@ export class DeleteBotUsersWithoutAnApplication1761113394664 implements Migratio
await queryRunner.query(`DELETE FROM users WHERE bot = true AND id NOT IN (SELECT bot_user_id FROM applications);`);
}
public async down(queryRunner: QueryRunner): Promise<void> {}
public async down(_: QueryRunner): Promise<void> {}
}
+2 -1
View File
@@ -59,7 +59,8 @@ if (!isHeadlessProcess) {
);
console.log(`[Database] ${red(`If you would like to try *anyways*, see the error below:`)}`);
try {
const _ = require("sqlite3");
// TODO: fully remove sqlite3
require("sqlite3");
} catch (e) {
console.log(`[Database] ${red(`Failed to load sqlite3 package. Please install it with 'npm install --no-save sqlite3', or switch to a real database like Postgres.`)}`);
process.exit(1);
@@ -33,6 +33,8 @@ export class BaseEmailClient implements IEmailClient {
return;
}
sendMail(email: IEmail): Promise<void> {
// noinspection JSUnusedLocalSymbols - parameter exists for public API reasons
const _ = email;
throw new Error("Method not implemented.");
}
}
+1
View File
@@ -23,6 +23,7 @@ function getNextWorker(): Worker {
return worker;
}
// noinspection JSUnusedLocalSymbols - TODO: implement options
export class JsonSerializer {
public static Serialize<T>(value: T, opts?: JsonSerializerOptions): string {
return JSON.stringify(value);