Skip to content

Commit af5f30b

Browse files
committed
chore: bump fmt printWidth to 90
1 parent 391528a commit af5f30b

10 files changed

Lines changed: 26 additions & 67 deletions

File tree

.livemark/components/Banner.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ export function Banner() {
2222
rel="noopener noreferrer"
2323
className="font-semibold hover:underline underline-offset-2"
2424
>
25-
<MessageCircle className="inline size-3.5 align-[-0.125em]" /> share
26-
feedback!
25+
<MessageCircle className="inline size-3.5 align-[-0.125em]" /> share feedback!
2726
</a>
2827
</span>
2928
</div>

.livemark/routes/index.tsx

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ function Hero() {
4747
</h1>
4848

4949
<p className="mt-6 text-lg md:text-xl text-muted-foreground max-w-2xl mx-auto">
50-
Mark a TypeScript code block in any <code>.md</code> file. Testdocs
51-
lifts it into a real vitest or jest test — no separate spec file, no
52-
boilerplate.
50+
Mark a TypeScript code block in any <code>.md</code> file. Testdocs lifts it
51+
into a real vitest or jest test — no separate spec file, no boilerplate.
5352
</p>
5453

5554
<div className="mt-10 flex flex-col sm:flex-row items-center justify-center gap-3">
@@ -162,8 +161,7 @@ function Features() {
162161
Doctests, the way you wished they worked
163162
</h2>
164163
<p className="mt-4 text-muted-foreground text-lg">
165-
Lean defaults, no setup beyond the plugin, full control when you
166-
need it.
164+
Lean defaults, no setup beyond the plugin, full control when you need it.
167165
</p>
168166
</div>
169167
</Reveal>
@@ -186,9 +184,7 @@ function FeatureCard({ icon: Icon, title, description }: Feature) {
186184
<Icon className="size-5" />
187185
</div>
188186
<h3 className="text-lg font-semibold text-foreground">{title}</h3>
189-
<p className="mt-2 text-sm text-muted-foreground leading-relaxed">
190-
{description}
191-
</p>
187+
<p className="mt-2 text-sm text-muted-foreground leading-relaxed">{description}</p>
192188
</div>
193189
)
194190
}
@@ -247,19 +243,17 @@ function TerminalSample() {
247243
return (
248244
<pre className="p-5 text-sm leading-relaxed font-mono overflow-x-auto">
249245
<code className={tk.body}>
250-
<span className={tk.prompt}>$</span>{" "}
251-
<span className={tk.func}>pnpm</span> test
246+
<span className={tk.prompt}>$</span> <span className={tk.func}>pnpm</span> test
252247
{"\n\n "}
253-
<span className={tk.pass}></span> docs/sum.md{" "}
254-
<span className={tk.dim}>(1)</span>
248+
<span className={tk.pass}></span> docs/sum.md <span className={tk.dim}>(1)</span>
255249
{"\n "}
256250
<span className={tk.pass}></span> Adds two numbers
257251
{"\n\n "}
258252
<span className={tk.dim}>Test Files</span>{" "}
259253
<span className={tk.pass}>1 passed</span> (1)
260254
{"\n "}
261-
<span className={tk.dim}>Tests</span>{" "}
262-
<span className={tk.pass}>1 passed</span> (1)
255+
<span className={tk.dim}>Tests</span> <span className={tk.pass}>1 passed</span>{" "}
256+
(1)
263257
</code>
264258
</pre>
265259
)
@@ -275,9 +269,8 @@ function Showcase() {
275269
Write a doctest. Get a test.
276270
</h2>
277271
<p className="mt-4 text-muted-foreground text-lg">
278-
Tag a fence with <code className="font-mono">test</code> and the
279-
block's body becomes the body of an{" "}
280-
<code className="font-mono">it()</code>.
272+
Tag a fence with <code className="font-mono">test</code> and the block's
273+
body becomes the body of an <code className="font-mono">it()</code>.
281274
</p>
282275
</div>
283276
</Reveal>

.livemark/styles/general.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,7 @@
140140
}
141141
[data-slot="sidebar-content"]:hover,
142142
[data-slot="sidebar-content"]:focus-within {
143-
scrollbar-color: color-mix(
144-
in oklch,
145-
var(--sidebar-foreground) 20%,
146-
transparent
147-
)
143+
scrollbar-color: color-mix(in oklch, var(--sidebar-foreground) 20%, transparent)
148144
transparent;
149145
}
150146

.releaserc.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22
"branches": ["main"],
33
"plugins": [
44
["@semantic-release/commit-analyzer", { "preset": "conventionalcommits" }],
5-
[
6-
"@semantic-release/release-notes-generator",
7-
{ "preset": "conventionalcommits" }
8-
],
9-
[
10-
"@semantic-release/exec",
11-
{ "prepareCmd": "pnpm vers ${nextRelease.version}" }
12-
],
5+
["@semantic-release/release-notes-generator", { "preset": "conventionalcommits" }],
6+
["@semantic-release/exec", { "prepareCmd": "pnpm vers ${nextRelease.version}" }],
137
[
148
"@semantic-release/exec",
159
{

actions/markdown/parse.unit.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,15 @@ describe("parseMarkdown", () => {
1919
})
2020

2121
it("returns each duplicate-heading block separately", () => {
22-
const md =
23-
"## Adds\n\n```ts test\na\n```\n\n## Adds\n\n```ts test\nb\n```\n"
22+
const md = "## Adds\n\n```ts test\na\n```\n\n## Adds\n\n```ts test\nb\n```\n"
2423
expect(parseMarkdown(md)).toEqual([
2524
{ heading: "Adds", code: "a" },
2625
{ heading: "Adds", code: "b" },
2726
])
2827
})
2928

3029
it("ignores `# heading` lines inside a fenced code block", () => {
31-
const md =
32-
"## Real\n\n```ts test\n# not a heading\nexpect(1).toBe(1)\n```\n"
30+
const md = "## Real\n\n```ts test\n# not a heading\nexpect(1).toBe(1)\n```\n"
3331
const blocks = parseMarkdown(md)
3432
expect(blocks).toHaveLength(1)
3533
expect(blocks[0]?.heading).toBe("Real")
@@ -50,16 +48,12 @@ describe("parseMarkdown", () => {
5048

5149
it("returns empty heading when no heading precedes the block", () => {
5250
const md = "```ts test\nexpect(1).toBe(1)\n```\n"
53-
expect(parseMarkdown(md)).toEqual([
54-
{ heading: "", code: "expect(1).toBe(1)" },
55-
])
51+
expect(parseMarkdown(md)).toEqual([{ heading: "", code: "expect(1).toBe(1)" }])
5652
})
5753

5854
it("accepts tsx with test token", () => {
5955
const md = "```tsx test\nconst x = <div />\n```"
60-
expect(parseMarkdown(md)).toEqual([
61-
{ heading: "", code: "const x = <div />" },
62-
])
56+
expect(parseMarkdown(md)).toEqual([{ heading: "", code: "const x = <div />" }])
6357
})
6458

6559
it("does not accept js with test token", () => {
@@ -69,9 +63,7 @@ describe("parseMarkdown", () => {
6963

7064
it('captures `name="..."` as the block\'s name override', () => {
7165
const md = '## H\n\n```ts test name="custom"\nx\n```\n'
72-
expect(parseMarkdown(md)).toEqual([
73-
{ heading: "H", code: "x", name: "custom" },
74-
])
66+
expect(parseMarkdown(md)).toEqual([{ heading: "H", code: "x", name: "custom" }])
7567
})
7668

7769
it("captures the `skip` token", () => {

actions/test/render.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,9 @@ export function renderTestModule(
3232
const fallback = filename.replace(/\.md$/, "")
3333
const names = assignNames(blocks, fallback)
3434
const itStatements = blocks
35-
.map((block, index) =>
36-
renderIt(names[index] ?? fallback, block.body, kindFor(block)),
37-
)
35+
.map((block, index) => renderIt(names[index] ?? fallback, block.body, kindFor(block)))
3836
.join("\n")
39-
file.addStatements(
40-
`describe(${JSON.stringify(filename)}, () => {\n${itStatements}\n})`,
41-
)
37+
file.addStatements(`describe(${JSON.stringify(filename)}, () => {\n${itStatements}\n})`)
4238

4339
file.formatText({ indentSize: 2, convertTabsToSpaces: true })
4440
return file.getFullText()

actions/test/render.unit.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ const jestPlugin: Plugin = {
1212

1313
describe("renderTestModule", () => {
1414
it("returns export {} for empty input", () => {
15-
expect(renderTestModule([], "foo.md", { plugin: vitestPlugin })).toBe(
16-
"export {}\n",
17-
)
15+
expect(renderTestModule([], "foo.md", { plugin: vitestPlugin })).toBe("export {}\n")
1816
})
1917

2018
it("wraps a single block in describe + async it", () => {
@@ -33,9 +31,7 @@ describe("renderTestModule", () => {
3331
expect(out).toContain(`describe("foo.md", () =>`)
3432
expect(out).toContain(`it("Adds", async () =>`)
3533
expect(out).toContain("expect(1).toBe(1)")
36-
expect(out).toContain(
37-
`await import("vite-plus/test").catch(() => import("vitest"))`,
38-
)
34+
expect(out).toContain(`await import("vite-plus/test").catch(() => import("vitest"))`)
3935
})
4036

4137
it("suffixes duplicate headings with #N", () => {

plugins/jest/index.unit.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ describe("testdocs jest transformer", () => {
1313
})
1414

1515
it("returns export {} for md files with no marked blocks", () => {
16-
const { code } = transformer.process(
17-
"# H\n\n```ts\nx\n```\n",
18-
"/path/empty.md",
19-
)
16+
const { code } = transformer.process("# H\n\n```ts\nx\n```\n", "/path/empty.md")
2017
expect(code).toBe("export {}\n")
2118
})
2219

plugins/vite/index.unit.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ describe("testdocs vite plugin", () => {
2020

2121
it("returns export {} for md files with no marked blocks", () => {
2222
const code = expectTransformedCode(
23-
invokeTransform(
24-
plugin.transform,
25-
"# H\n\n```ts\nx\n```\n",
26-
"/path/empty.md",
27-
),
23+
invokeTransform(plugin.transform, "# H\n\n```ts\nx\n```\n", "/path/empty.md"),
2824
)
2925
expect(code).toBe("export {}\n")
3026
})

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const ignorePatterns = ["**/generated/**"]
66
export default defineConfig({
77
fmt: {
88
semi: false,
9-
printWidth: 80,
9+
printWidth: 90,
1010
arrowParens: "avoid",
1111
ignorePatterns,
1212
},

0 commit comments

Comments
 (0)