Skip to content

Commit b3d6df3

Browse files
committed
asdf
1 parent fc63b78 commit b3d6df3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+190
-193
lines changed

frontend/vite-plugins/env-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function envConfig(
2828
| {
2929
isDevelopment: false;
3030
clientVersion: string;
31-
},
31+
}
3232
): Plugin {
3333
return {
3434
name: "virtual-env-config",

frontend/vite-plugins/font-preview.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function fontPreview(): Plugin {
2727

2828
const end = performance.now();
2929
console.log(
30-
`Creating webfonts preview took ${Math.round(end - start)} ms`,
30+
`Creating webfonts preview took ${Math.round(end - start)} ms`
3131
);
3232
},
3333
};
@@ -50,11 +50,11 @@ async function generatePreviewFonts(debug: boolean = false): Promise<void> {
5050
await generateSubset(
5151
srcDir + "/" + fileName,
5252
targetDir + "/" + fileName,
53-
includedCharacters,
53+
includedCharacters
5454
);
5555
if (debug) {
5656
console.log(
57-
`Processing ${name} with file ${fileName} to display "${includedCharacters}".`,
57+
`Processing ${name} with file ${fileName} to display "${includedCharacters}".`
5858
);
5959
}
6060
}
@@ -63,7 +63,7 @@ async function generatePreviewFonts(debug: boolean = false): Promise<void> {
6363
async function generateSubset(
6464
source: string,
6565
target: string,
66-
includedCharacters: string,
66+
includedCharacters: string
6767
): Promise<void> {
6868
const font = fs.readFileSync(source);
6969
const subset = await subsetFont(font, includedCharacters, {

frontend/vite-plugins/fontawesome-subset.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export function fontawesomeSubset(): Plugin {
2323
"src/webfonts-generated",
2424
{
2525
targetFormats: ["woff2"],
26-
},
26+
}
2727
);
2828

2929
const end = performance.now();
3030
console.log(
31-
`Creating fontawesome subset took ${Math.round(end - start)} ms`,
31+
`Creating fontawesome subset took ${Math.round(end - start)} ms`
3232
);
3333
},
3434
};
@@ -94,11 +94,11 @@ function getFontawesomeConfig(debug = false): FontawesomeConfig {
9494
"./src",
9595
(filename) =>
9696
!filename.endsWith("fontawesome-5.scss") &&
97-
!filename.endsWith("fontawesome-6.scss"), //ignore our own css
97+
!filename.endsWith("fontawesome-6.scss") //ignore our own css
9898
);
9999
const staticFiles = findAllFiles(
100100
"./static",
101-
(filename) => filename.endsWith(".html") || filename.endsWith(".css"),
101+
(filename) => filename.endsWith(".html") || filename.endsWith(".css")
102102
);
103103

104104
const allFiles = [...srcFiles, ...staticFiles];
@@ -127,12 +127,11 @@ function getFontawesomeConfig(debug = false): FontawesomeConfig {
127127
const brands = usedClasses.filter((it) => iconSet.brands.includes(it));
128128

129129
const leftOvers = icons.filter(
130-
(it) =>
131-
!(solid.includes(it) || regular.includes(it) || brands.includes(it)),
130+
(it) => !(solid.includes(it) || regular.includes(it) || brands.includes(it))
132131
);
133132
if (leftOvers.length !== 0) {
134133
throw new Error(
135-
"Fontawesome failed with unknown icons: " + leftOvers.toString(),
134+
"Fontawesome failed with unknown icons: " + leftOvers.toString()
136135
);
137136
}
138137

@@ -143,7 +142,7 @@ function getFontawesomeConfig(debug = false): FontawesomeConfig {
143142
.filter((it) => usedClasses.filter((c) => it[1].includes(c)).length > 0)
144143
.map((it) => it[0])
145144
.filter((it) => it !== "brands")
146-
.join(", "),
145+
.join(", ")
147146
);
148147

149148
console.debug(
@@ -152,7 +151,7 @@ function getFontawesomeConfig(debug = false): FontawesomeConfig {
152151
regular,
153152
solid,
154153
brands,
155-
}),
154+
})
156155
);
157156
console.debug("Detected fontawesome classes in", Date.now() - time, "ms");
158157
}
@@ -176,7 +175,7 @@ function toFileAndDir(dir: string, file: string): FileObject {
176175

177176
function findAllFiles(
178177
dir: string,
179-
filter: (filename: string) => boolean = (_it): boolean => true,
178+
filter: (filename: string) => boolean = (_it): boolean => true
180179
): string[] {
181180
const files = fs
182181
.readdirSync(dir)
@@ -197,7 +196,7 @@ function findAllFiles(
197196
function parseIcons(iconSet: string): string[] {
198197
const require = createRequire(import.meta.url);
199198
const path = require.resolve(
200-
`@fortawesome/fontawesome-free/js/${iconSet}.js`,
199+
`@fortawesome/fontawesome-free/js/${iconSet}.js`
201200
);
202201
const file: string | null = fs.readFileSync(path).toString();
203202

frontend/vite-plugins/language-hashes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function getHashes(): Record<string, string> {
3737
const hashes = Object.fromEntries(
3838
readdirSync("./static/languages").map((file) => {
3939
return [file.slice(0, -5), calcHash(file)];
40-
}),
40+
})
4141
);
4242

4343
const end = performance.now();
@@ -51,7 +51,7 @@ function calcHash(file: string): string {
5151
const currentLanguage = JSON.stringify(
5252
JSON.parse(readFileSync("./static/languages/" + file).toString()),
5353
null,
54-
0,
54+
0
5555
);
5656
const encoder = new TextEncoder();
5757
const data = encoder.encode(currentLanguage);

frontend/vite-plugins/minify-json.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ export function minifyJson(): Plugin {
6868
1024
6969
).toFixed(2)} mB\x1b[0m\n` +
7070
` \x1b[32mTotal savings: ${totalSavings.toFixed(
71-
2,
72-
)}%\x1b[0m took ${Math.round(end - start)} ms\n`,
71+
2
72+
)}%\x1b[0m took ${Math.round(end - start)} ms\n`
7373
);
7474
},
7575
};

frontend/vite.config.prod.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { versionFile } from "./vite-plugins/version-file";
1717

1818
function pad(numbers, maxLength, fillString) {
1919
return numbers.map((number) =>
20-
number.toString().padStart(maxLength, fillString),
20+
number.toString().padStart(maxLength, fillString)
2121
);
2222
}
2323

@@ -26,10 +26,10 @@ const CLIENT_VERSION = (() => {
2626
const versionPrefix = pad(
2727
[date.getFullYear(), date.getMonth() + 1, date.getDate()],
2828
2,
29-
"0",
29+
"0"
3030
).join(".");
3131
const versionSuffix = pad([date.getHours(), date.getMinutes()], 2, "0").join(
32-
".",
32+
"."
3333
);
3434
const version = [versionPrefix, versionSuffix].join("_");
3535

packages/contracts/__test__/validation/validation.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe("validation", () => {
3636

3737
testCases.forEach((testCase) => {
3838
expect(Validation.containsProfanity(testCase.text, "substring")).toBe(
39-
testCase.expected,
39+
testCase.expected
4040
);
4141
});
4242
});

packages/contracts/src/admin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export type ClearStreakHourOffsetRequest = z.infer<
2727
export const ToggleBanResponseSchema = responseWithData(
2828
z.object({
2929
banned: z.boolean(),
30-
}),
30+
})
3131
).strict();
3232
export type ToggleBanResponse = z.infer<typeof ToggleBanResponseSchema>;
3333

@@ -44,7 +44,7 @@ export const RejectReportsRequestSchema = z
4444
.array(
4545
z
4646
.object({ reportId: z.string(), reason: z.string().optional() })
47-
.strict(),
47+
.strict()
4848
)
4949
.nonempty(),
5050
})
@@ -138,5 +138,5 @@ export const adminContract = c.router(
138138
}),
139139

140140
commonResponses: CommonResponses,
141-
},
141+
}
142142
);

packages/contracts/src/ape-keys.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const AddApeKeyResponseSchema = responseWithData(
2424
apeKeyId: IdSchema,
2525
apeKey: z.string().base64(),
2626
apeKeyDetails: ApeKeySchema,
27-
}),
27+
})
2828
);
2929
export type AddApeKeyResponse = z.infer<typeof AddApeKeyResponseSchema>;
3030

@@ -106,5 +106,5 @@ export const apeKeysContract = c.router(
106106
}),
107107

108108
commonResponses: CommonResponses,
109-
},
109+
}
110110
);

packages/contracts/src/configs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ export const configsContract = c.router(
6565
}),
6666

6767
commonResponses: CommonResponses,
68-
},
68+
}
6969
);

0 commit comments

Comments
 (0)