Skip to content

Commit a4690e6

Browse files
Fix biome linting issues in file-parser example
- Use block statements for if condition - Replace template literal with string literal where interpolation not needed
1 parent d9e441e commit a4690e6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

typescript/fetch/src/plugin-file-parser/file-parser-all-sizes.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ function extractCode(text: string): string | null {
5050
* Format file size for display
5151
*/
5252
function formatSize(bytes: number): string {
53-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)} KB`;
53+
if (bytes < 1024 * 1024) {
54+
return `${(bytes / 1024).toFixed(0)} KB`;
55+
}
5456
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
5557
}
5658

@@ -149,7 +151,7 @@ async function main() {
149151
const result = await processPdf(size, expectedCode);
150152
results.push(result.success);
151153
} catch (error) {
152-
console.log(`Status: ❌ FAIL`);
154+
console.log('Status: ❌ FAIL');
153155
console.log(`Error: ${error instanceof Error ? error.message : String(error)}`);
154156
results.push(false);
155157
}

0 commit comments

Comments
 (0)