format all

This commit is contained in:
C4illin
2024-05-26 12:46:22 +02:00
parent 50e9b861b0
commit da1a8934e1
3 changed files with 13 additions and 9 deletions

View File

@@ -108,7 +108,7 @@ export async function mainConverter(
console.log( console.log(
`No available converter supports converting from ${fileType} to ${convertTo}.`, `No available converter supports converting from ${fileType} to ${convertTo}.`,
); );
return "File type not supported" return "File type not supported";
} }
try { try {
@@ -123,13 +123,13 @@ export async function mainConverter(
console.log( console.log(
`Converted ${inputFilePath} from ${fileType} to ${convertTo} successfully using ${converterName}.`, `Converted ${inputFilePath} from ${fileType} to ${convertTo} successfully using ${converterName}.`,
); );
return "Done" return "Done";
} catch (error) { } catch (error) {
console.error( console.error(
`Failed to convert ${inputFilePath} from ${fileType} to ${convertTo} using ${converterName}.`, `Failed to convert ${inputFilePath} from ${fileType} to ${convertTo} using ${converterName}.`,
error, error,
); );
return "Failed, check logs" return "Failed, check logs";
} }
} }

View File

@@ -11,7 +11,7 @@ export const normalizeFiletype = (filetype: string): string => {
default: default:
return lowercaseFiletype; return lowercaseFiletype;
} }
} };
export const normalizeOutputFiletype = (filetype: string): string => { export const normalizeOutputFiletype = (filetype: string): string => {
const lowercaseFiletype = filetype.toLowerCase(); const lowercaseFiletype = filetype.toLowerCase();
@@ -24,4 +24,4 @@ export const normalizeOutputFiletype = (filetype: string): string => {
default: default:
return lowercaseFiletype; return lowercaseFiletype;
} }
} };

View File

@@ -458,7 +458,9 @@ const app = new Elysia()
<optgroup label={converter}> <optgroup label={converter}>
{targets.map((target) => ( {targets.map((target) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation> // biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<option value={`${target},${converter}`} safe>{target}</option> <option value={`${target},${converter}`} safe>
{target}
</option>
))} ))}
</optgroup> </optgroup>
))} ))}
@@ -485,7 +487,9 @@ const app = new Elysia()
<optgroup label={converter}> <optgroup label={converter}>
{targets.map((target) => ( {targets.map((target) => (
// biome-ignore lint/correctness/useJsxKeyInIterable: <explanation> // biome-ignore lint/correctness/useJsxKeyInIterable: <explanation>
<option value={`${target},${converter}`} safe>{target}</option> <option value={`${target},${converter}`} safe>
{target}
</option>
))} ))}
</optgroup> </optgroup>
), ),