Skip to content

Commit 15d524a

Browse files
fix lint
1 parent 8e0bd5a commit 15d524a

5 files changed

Lines changed: 94 additions & 32 deletions

File tree

astro-atproto-loader/__tests__/index.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ describe("atProtoLiveLoader", () => {
395395
track: String(value.track),
396396
},
397397
}),
398-
queryFilter: ({ entry, filter }) =>
399-
entry.data.track === filter.track,
398+
queryFilter: ({ entry, filter }) => entry.data.track === filter.track,
400399
});
401400

402401
const result = await loader.loadCollection({

astro-atproto-loader/__tests__/msw/handlers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ export const mockGetRecord = ({
134134
url.searchParams.get("collection") !== collection ||
135135
url.searchParams.get("rkey") !== record.rkey
136136
) {
137-
return new HttpResponse(
138-
JSON.stringify({ error: "RecordNotFound" }),
139-
{ status: 404, headers: { "content-type": "application/json" } },
140-
);
137+
return new HttpResponse(JSON.stringify({ error: "RecordNotFound" }), {
138+
status: 404,
139+
headers: { "content-type": "application/json" },
140+
});
141141
}
142142
return HttpResponse.json({
143143
uri: `at://${record.did}/${collection}/${record.rkey}`,

remark-capitalize-titles/index.ts

Lines changed: 77 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,83 @@ import { DEFAULT_CAPITALIZATIONS as DEFAULT_CAPITALIZATIONS_ } from "./capitaliz
99
// Articles, conjunctions, and prepositions that stay lowercase mid-title
1010
// (AP-style title casing). Sourced from the same set as `vercel/title`.
1111
const SMALL_WORDS = new Set([
12-
"a", "an", "the", "aboard", "about", "above", "across", "after", "against", "along",
13-
"amid", "among", "anti", "around", "as", "at", "before", "behind",
14-
"and", "but", "or", "nor", "for", "yet", "so",
15-
"below", "beneath", "beside", "besides", "between", "beyond", "by",
16-
"concerning", "considering", "despite", "down", "during", "except",
17-
"excepting", "excluding", "following", "from", "in", "inside", "into",
18-
"like", "minus", "near", "of", "off", "on", "onto", "opposite", "over",
19-
"past", "per", "plus", "regarding", "round", "save", "since", "than",
20-
"through", "to", "toward", "towards", "under", "underneath", "unlike",
21-
"until", "up", "upon", "versus", "via", "with", "within", "without",
12+
"a",
13+
"an",
14+
"the",
15+
"aboard",
16+
"about",
17+
"above",
18+
"across",
19+
"after",
20+
"against",
21+
"along",
22+
"amid",
23+
"among",
24+
"anti",
25+
"around",
26+
"as",
27+
"at",
28+
"before",
29+
"behind",
30+
"and",
31+
"but",
32+
"or",
33+
"nor",
34+
"for",
35+
"yet",
36+
"so",
37+
"below",
38+
"beneath",
39+
"beside",
40+
"besides",
41+
"between",
42+
"beyond",
43+
"by",
44+
"concerning",
45+
"considering",
46+
"despite",
47+
"down",
48+
"during",
49+
"except",
50+
"excepting",
51+
"excluding",
52+
"following",
53+
"from",
54+
"in",
55+
"inside",
56+
"into",
57+
"like",
58+
"minus",
59+
"near",
60+
"of",
61+
"off",
62+
"on",
63+
"onto",
64+
"opposite",
65+
"over",
66+
"past",
67+
"per",
68+
"plus",
69+
"regarding",
70+
"round",
71+
"save",
72+
"since",
73+
"than",
74+
"through",
75+
"to",
76+
"toward",
77+
"towards",
78+
"under",
79+
"underneath",
80+
"unlike",
81+
"until",
82+
"up",
83+
"upon",
84+
"versus",
85+
"via",
86+
"with",
87+
"within",
88+
"without",
2289
]);
2390

2491
// Characters that ride along with an adjacent word but don't break it:

remark-capitalize-titles/tests/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,4 @@ describe("Handles hyphenated compound words", () => {
220220
"## Up-to-date and Ready-to-merge",
221221
);
222222
});
223-
});
223+
});

remark-capitalize-titles/tests/vercel.test.ts

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const processMarkdown = async (value: Compatible) => {
88
return file.toString().slice(0, -1);
99
};
1010

11-
1211
// Test cases lifted verbatim from the upstream `title` package's own suite
1312
// (vercel/title, test/index.test.js) so we can see exactly how our wrapper
1413
// diverges from `title`'s standalone behavior. Some expected outputs have
@@ -37,9 +36,7 @@ describe("Imported from `title` package's test suite", () => {
3736

3837
test("handles titles with special characters", async () => {
3938
expect(
40-
await processMarkdown(
41-
"# seattle’S BEST coffee & grandma's cookies",
42-
),
39+
await processMarkdown("# seattle’S BEST coffee & grandma's cookies"),
4340
).toBe("# Seattle’s Best Coffee & Grandma's Cookies");
4441
});
4542

@@ -54,19 +51,18 @@ describe("Imported from `title` package's test suite", () => {
5451

5552
test("handles Vercel product names with other special characters", async () => {
5653
expect(
57-
await processWith(
58-
"# aPi 2.0: lOG-in with zeit, new dOCs & more",
59-
["API", "ZEIT"],
60-
),
54+
await processWith("# aPi 2.0: lOG-in with zeit, new dOCs & more", [
55+
"API",
56+
"ZEIT",
57+
]),
6158
// NOTE: upstream `title` produces "Log-In"; our wrapper applies
6259
// AP-style hyphenated-tail lowercasing, so we expect "Log-in".
6360
).toBe("# API 2.0: Log-in with ZEIT, New Docs & More");
6461

6562
expect(
66-
await processWith(
67-
"# toWArds NEXT.JS 5: Introducing cANaRY Updates",
68-
["Next.js"],
69-
),
63+
await processWith("# toWArds NEXT.JS 5: Introducing cANaRY Updates", [
64+
"Next.js",
65+
]),
7066
).toBe("# Towards Next.js 5: Introducing Canary Updates");
7167
});
7268

@@ -92,9 +88,9 @@ describe("Imported from `title` package's test suite", () => {
9288
"# Be Careful What You Wish For",
9389
);
9490

95-
expect(
96-
await processWith("# XYZ: what is it good for", ["XYZ"]),
97-
).toBe("# XYZ: What Is It Good For");
91+
expect(await processWith("# XYZ: what is it good for", ["XYZ"])).toBe(
92+
"# XYZ: What Is It Good For",
93+
);
9894
});
9995

10096
test("supports international characters", async () => {

0 commit comments

Comments
 (0)