mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
use Biome to format Bun's codebase instead of Prettier (#8494)
* Ignore * Create biome.json * Ignore * biome * [autofix.ci] apply automated fixes --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -19,9 +19,9 @@ export enum Loader {
|
||||
ts = BunLoader.ts,
|
||||
}
|
||||
export interface TestReference {
|
||||
name: string,
|
||||
byteOffset: number,
|
||||
kind: 'test' | 'describe',
|
||||
name: string;
|
||||
byteOffset: number;
|
||||
kind: "test" | "describe";
|
||||
}
|
||||
export type { ScanResult, TransformResponse };
|
||||
|
||||
@@ -221,7 +221,7 @@ export class Bun {
|
||||
} else {
|
||||
const fs = await import("fs");
|
||||
|
||||
if (typeof url === 'string' && url.startsWith('file://')) {
|
||||
if (typeof url === "string" && url.startsWith("file://")) {
|
||||
url = new URL(url); // fs.readFileSync cannot consume URL strings, only URL objects
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ export class Bun {
|
||||
),
|
||||
),
|
||||
byteOffset: response.tests[i].byteOffset,
|
||||
kind: testKindMap[response.tests[i].kind] as 'test' | 'describe',
|
||||
kind: testKindMap[response.tests[i].kind] as "test" | "describe",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -309,7 +309,11 @@ export class Bun {
|
||||
return tests;
|
||||
}
|
||||
|
||||
static transformSync(content: Uint8Array | string, file_name: string, loader?: keyof typeof Loader): TransformResponse {
|
||||
static transformSync(
|
||||
content: Uint8Array | string,
|
||||
file_name: string,
|
||||
loader?: keyof typeof Loader,
|
||||
): TransformResponse {
|
||||
const bb = new ByteBuffer(Bun.scratch);
|
||||
bb.length = 0;
|
||||
bb.index = 0;
|
||||
|
||||
Reference in New Issue
Block a user