mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-06 16:06:26 -05:00
chore: fix linting in entire project
This commit is contained in:
@@ -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
|
||||
}))
|
||||
}
|
||||
};
|
||||
})
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user