diff --git a/package.json b/package.json index ae40678a..d3435662 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "build": "pnpm run --filter=next-yak build", "build:swc": "pnpm run --filter=yak-swc build", "example": "pnpm --filter=next-yak-example run dev", + "format": "pnpm run --recursive --if-present format", "package:types": "npx --package=@arethetypeswrong/cli attw --pack packages/next-yak", "prettier": "pnpm run --recursive --if-present prettier", "test": "pnpm run build && pnpm --filter=next-yak --filter=cross-file-tests --filter=next-yak-example run \"/test($|:types)/\"", diff --git a/packages/yak-swc/package.json b/packages/yak-swc/package.json index 7bc494fe..d55b4c81 100644 --- a/packages/yak-swc/package.json +++ b/packages/yak-swc/package.json @@ -21,6 +21,7 @@ "main": "target/wasm32-wasi/release/yak_swc.wasm", "scripts": { "build": "cargo build --release --target=wasm32-wasi", + "format": "cargo fmt --all", "prepublishOnly": "npm run build", "test": "cargo test", "test:snapshots": "cd yak_swc && UPDATE=1 cargo test" diff --git a/packages/yak-swc/relative_posix_path/src/lib.rs b/packages/yak-swc/relative_posix_path/src/lib.rs index 579a1b84..c7b1c7f8 100644 --- a/packages/yak-swc/relative_posix_path/src/lib.rs +++ b/packages/yak-swc/relative_posix_path/src/lib.rs @@ -58,10 +58,10 @@ mod tests { #[test] fn test_relative_path_windows_forward_slash() { - assert_eq!( - relative_posix_path(r"E:\foo", "E:/foo/bar/file.tsx"), - "bar/file.tsx" - ); + assert_eq!( + relative_posix_path(r"E:\foo", "E:/foo/bar/file.tsx"), + "bar/file.tsx" + ); } #[test]