chore: upgrade to eslint v9 (#2574)

This commit is contained in:
Michael Thomas
2026-03-16 12:12:30 -04:00
committed by GitHub
parent 40e02bba6a
commit 36243a0deb
84 changed files with 916 additions and 883 deletions

View File

@@ -61,7 +61,7 @@ export async function checkAvatarChanged(
if (headResponse.status !== 200) {
return { changed: false };
}
} catch (error) {
} catch {
return { changed: false };
}

View File

@@ -915,7 +915,7 @@ discoverRoutes.get<Record<string, unknown>, WatchlistResponse>(
async (req, res) => {
const userRepository = getRepository(User);
const itemsPerPage = 20;
const page = Number(req.query.page) ?? 1;
const page = req.query.page ? Number(req.query.page) : 1;
const offset = (page - 1) * itemsPerPage;
const activeUser = await userRepository.findOne({

View File

@@ -48,8 +48,6 @@ mediaRoutes.get('/', async (req, res, next) => {
case 'pending':
statusFilter = MediaStatus.PENDING;
break;
default:
statusFilter = undefined;
}
let sortFilter: FindOneOptions<Media>['order'] = {

View File

@@ -269,7 +269,7 @@ router.post<
);
return res.status(204).send();
} catch (e) {
} catch {
logger.error('Failed to register user push subscription', {
label: 'API',
});
@@ -290,7 +290,7 @@ router.get<{ userId: string }>(
});
return res.status(200).json(userPushSubs);
} catch (e) {
} catch {
next({ status: 404, message: 'User subscriptions not found.' });
}
}
@@ -314,7 +314,7 @@ router.get<{ userId: string; endpoint: string }>(
});
return res.status(200).json(userPushSub);
} catch (e) {
} catch {
next({ status: 404, message: 'User subscription not found.' });
}
}
@@ -368,7 +368,7 @@ router.get<{ id: string }>('/:id', async (req, res, next) => {
const isAdmin = req.user?.hasPermission(Permission.MANAGE_USERS);
return res.status(200).json(user.filter(isOwnProfile || isAdmin));
} catch (e) {
} catch {
next({ status: 404, message: 'User not found.' });
}
});
@@ -513,7 +513,7 @@ router.put<{ id: string }>(
await userRepository.save(user);
return res.status(200).json(user.filter());
} catch (e) {
} catch {
next({ status: 404, message: 'User not found.' });
}
}
@@ -877,7 +877,7 @@ router.get<{ id: string }, WatchlistResponse>(
}
const itemsPerPage = 20;
const page = Number(req.query.page) ?? 1;
const page = req.query.page ? Number(req.query.page) : 1;
const offset = (page - 1) * itemsPerPage;
const user = await getRepository(User).findOneOrFail({