refactor: Add lint rules for no unused vars and unused import (#9940)

This commit is contained in:
Lucas Coratger
2025-11-22 22:12:34 +01:00
committed by GitHub
parent 9ed9af48d1
commit 69a925879e
32 changed files with 66 additions and 36 deletions

View File

@@ -149,7 +149,7 @@ export class ClassesRouter extends PromiseRouter {
for (const [key, value] of _.entries(query)) {
try {
json[key] = JSON.parse(value);
} catch (e) {
} catch {
json[key] = value;
}
}

View File

@@ -310,7 +310,7 @@ export class FilesRouter {
const data = await filesController.getMetadata(filename);
res.status(200);
res.json(data);
} catch (e) {
} catch {
res.status(200);
res.json({});
}

View File

@@ -432,7 +432,7 @@ export class PagesRouter extends PromiseRouter {
let data;
try {
data = await this.readFile(path);
} catch (e) {
} catch {
return this.notFound();
}
@@ -474,7 +474,7 @@ export class PagesRouter extends PromiseRouter {
let data;
try {
data = await this.readFile(path);
} catch (e) {
} catch {
return this.notFound();
}
@@ -517,7 +517,7 @@ export class PagesRouter extends PromiseRouter {
try {
const json = require(path.resolve('./', this.pagesConfig.localizationJsonPath));
this.jsonParameters = json;
} catch (e) {
} catch {
throw errors.jsonFailedFileLoading;
}
}