Skip to content

Commit 15be01a

Browse files
linter fixes
1 parent 15d524a commit 15be01a

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

astro-atproto-loader/__examples__/03-grouped-reposts/src/live.config.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ import { defineAtProtoLiveCollection } from "@fujocoded/astro-atproto-loader";
2121
// Set up validation for schemas via zod
2222
const BlobRefSchema = z
2323
.object({
24-
ref: z.unknown(),
24+
ref: z.union([z.string(), z.object({ $link: z.string() })]).nullish(),
2525
mimeType: z.string(),
2626
})
2727
.transform((blob) => ({
28-
cid: blob.ref == null ? undefined : String(blob.ref),
28+
cid:
29+
blob.ref == null
30+
? undefined
31+
: typeof blob.ref === "string"
32+
? blob.ref
33+
: blob.ref.$link,
2934
mimeType: blob.mimeType,
3035
}));
3136

remark-capitalize-titles/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ const titleCase = (input: string, options: TitleOptions): string => {
260260
// A leading ellipsis (`...and more`) signals a continuation, so the
261261
// first-word force-cap is suppressed and small-word rules apply normally.
262262
const leadingHasMultiDot = /\.{2,}/.test(leadingText);
263-
const leadingHasHardCap = [...leadingText].some((c) => HARD_CAP.has(c));
263+
const leadingHasHardCap = Array.from(HARD_CAP).some((c) => leadingText.includes(c));
264264

265265
const out: string[] = [];
266266
let cursor = 0;

0 commit comments

Comments
 (0)