Skip to content

Commit 97b8d8e

Browse files
committed
style: Add Biome ignore comments to suppress linting warnings and adjust process.env access.
1 parent 4aeb886 commit 97b8d8e

File tree

6 files changed

+12
-1
lines changed

6 files changed

+12
-1
lines changed

examples/react-electron/electron/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
1616
process.env.APP_ROOT = path.join(__dirname, "..");
1717

1818
// 🚧 Use ['ENV_NAME'] avoid vite:define plugin - Vite@2.x
19-
export const VITE_DEV_SERVER_URL = process.env["VITE_DEV_SERVER_URL"];
19+
export const VITE_DEV_SERVER_URL = process.env.VITE_DEV_SERVER_URL;
2020
export const MAIN_DIST = path.join(process.env.APP_ROOT, "dist-electron");
2121
export const RENDERER_DIST = path.join(process.env.APP_ROOT, "dist");
2222

examples/react-nextjs/components/EvoluMinimalExample.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { type FC, Suspense, use, useState } from "react";
1010
// Primary keys are branded types, preventing accidental use of IDs across
1111
// different tables (e.g., a TodoId can't be used where a UserId is expected).
1212
const TodoId = Evolu.id("Todo");
13+
// biome-ignore lint/correctness/noUnusedVariables: Unused type alias kept for reference
1314
type TodoId = typeof TodoId.Type;
1415

1516
// Schema defines database structure with runtime validation.

packages/common/src/Type.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3242,6 +3242,7 @@ export const formatObjectError = <Error extends TypeError>(
32423242
case "Props": {
32433243
const formattedErrors = Object.entries(error.reason.errors)
32443244
.filter(([, error]) => error !== undefined)
3245+
// biome-ignore lint/style/noNonNullAssertion: Filtered above
32453246
.map(([key, error]) => `- ${key}: ${formatTypeError(error!)}`)
32463247
.join("\n");
32473248
return `Invalid object properties:\n${formattedErrors}`;

packages/common/src/local-first/Storage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,6 +1540,7 @@ const fingerprintRanges =
15401540
const fingerprintRanges = result.value.rows.map(
15411541
(row, i, arr): FingerprintRange => ({
15421542
type: RangeType.Fingerprint,
1543+
// biome-ignore lint/style/noNonNullAssertion: Guaranteed by logic
15431544
upperBound: i === arr.length - 1 ? upperBound : row.b!,
15441545
fingerprint: sqliteFingerprintToFingerprint([
15451546
row.h1,

packages/common/test/Task.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,7 @@ describe("Fiber", () => {
13311331

13321332
// Let daemon complete and wait for it
13331333
daemonCanComplete.resolve();
1334+
// biome-ignore lint/style/noNonNullAssertion: Test utility
13341335
await daemonFiber!;
13351336

13361337
expect(events).toEqual([
@@ -1422,6 +1423,7 @@ describe("Fiber", () => {
14221423
]);
14231424

14241425
daemonCanComplete.resolve();
1426+
// biome-ignore lint/style/noNonNullAssertion: Test utility
14251427
await daemonFiber!;
14261428

14271429
expect(events).toEqual([
@@ -3914,6 +3916,7 @@ describe("DI", () => {
39143916
() => {
39153917
attempts++;
39163918
if (attempts < 3) return err<NetworkError>({ type: "NetworkError" });
3919+
// biome-ignore lint/style/noNonNullAssertion: Test utility
39173920
return ok(url.split("/").pop()!);
39183921
},
39193922
};

packages/common/test/Type.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ test("TrimmedString", () => {
365365
}
366366

367367
const TrimmedAString = trimmed(AString);
368+
// biome-ignore lint/correctness/noUnusedVariables: Test utility
368369
type TrimmedAString = typeof TrimmedAString.Type;
369370

370371
expect(TrimmedAString.from("a")).toEqual(ok("a"));
@@ -2401,6 +2402,7 @@ test("optional", () => {
24012402
age: PositiveNumber,
24022403
});
24032404

2405+
// biome-ignore lint/correctness/noUnusedVariables: Test utility
24042406
type User = typeof User.Type;
24052407

24062408
expect(User.from({ name: "Alice", age: 30 })).toEqual(
@@ -2691,6 +2693,7 @@ test("custom formatTypeError written from scratch", () => {
26912693
if (error.reason.kind === "NotObject") return "Must be an object";
26922694
if (error.reason.kind === "ExtraKeys")
26932695
return "Contains unexpected fields";
2696+
// biome-ignore lint/style/noNonNullAssertion: Guaranteed by logic
26942697
const firstError = Object.values(error.reason.errors).find(
26952698
(e) => e !== undefined,
26962699
)!;
@@ -3352,6 +3355,7 @@ describe("typed", () => {
33523355
});
33533356

33543357
const Payment = union(Credit, Debit, Cash, Crypto);
3358+
// biome-ignore lint/correctness/noUnusedVariables: Test utility
33553359
type Payment = typeof Payment.Type;
33563360

33573361
// Each variant is distinguishable by type
@@ -3414,6 +3418,7 @@ describe("typed", () => {
34143418
age: optional(PositiveInt),
34153419
});
34163420

3421+
// biome-ignore lint/correctness/noUnusedVariables: Test utility
34173422
type User = typeof User.Type;
34183423

34193424
const validUser = User.from({

0 commit comments

Comments
 (0)