chore: fix linting in entire project

This commit is contained in:
mrjvs
2026-08-09 21:28:45 +02:00
parent 843f1abdde
commit 2400e98d8f
41 changed files with 350 additions and 264 deletions

View File

@@ -1,6 +1,6 @@
import type { GetProgress, ProgressItem } from "#shared/api-types"
import { getGithubProjects } from "../utils/getGithubProgress";
import { getStripeDonations } from "../utils/getStripeDonations";
import { getGithubProjects } from '../utils/getGithubProgress';
import { getStripeDonations } from '../utils/getStripeDonations';
import type { GetProgress, ProgressItem } from '#shared/api-types';
const donationGoalCents = 3000 * 100;
@@ -10,7 +10,7 @@ export default defineEventHandler(async (event): Promise<GetProgress> => {
const donationData = await getStripeDonations(stripe);
const { projects } = await getGithubProjects(octokit);
const items: ProgressItem[] = projects.map(v => {
const items: ProgressItem[] = projects.map((v) => {
const totalTasks = v.tasks.length;
const completedTasks = v.tasks.filter(v => v.status === 'completed').length;
const percentage = Math.floor(completedTasks / totalTasks * 100);
@@ -21,9 +21,9 @@ export default defineEventHandler(async (event): Promise<GetProgress> => {
completion: percentage,
tasks: v.tasks.map(task => ({
status: task.status,
title: task.title,
title: task.title
}))
}
};
});
const summedCompletion = items.reduce((a, v) => a + v.completion, 0);
const completionPercentage = Math.floor(summedCompletion / items.length * 100);
@@ -32,9 +32,9 @@ export default defineEventHandler(async (event): Promise<GetProgress> => {
completion: completionPercentage,
donations: {
currentCents: donationData.totalDonationsCents,
goalCents: donationGoalCents,
goalCents: donationGoalCents
},
items: projects.map(v => {
items: projects.map((v) => {
const totalTasks = v.tasks.length;
const completedTasks = v.tasks.filter(v => v.status === 'completed').length;
const percentage = Math.floor(completedTasks / totalTasks * 100);
@@ -45,9 +45,9 @@ export default defineEventHandler(async (event): Promise<GetProgress> => {
completion: percentage,
tasks: v.tasks.map(task => ({
status: task.status,
title: task.title,
title: task.title
}))
}
};
})
};
});