Skip to content

Commit 52fe463

Browse files
committed
chore: update prettier-plugin-marko to 4.1
Formatting keeps the `async` keyword on shorthand methods; covered by a format test through the extension.
1 parent fbed6f4 commit 52fe463

4 files changed

Lines changed: 26 additions & 6 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@marko/language-server": patch
3+
"marko-vscode": patch
4+
---
5+
6+
Update prettier-plugin-marko to 4.1, so formatting keeps the `async` keyword on shorthand methods.

packages/language-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"jsdom": "^29.1.1",
5252
"marko": "^5.39.33",
5353
"prettier": "^3.8.4",
54-
"prettier-plugin-marko": "^4.0.10",
54+
"prettier-plugin-marko": "^4.1.0",
5555
"relative-import-path": "^1.0.1",
5656
"typescript": "^6.0.3",
5757
"vscode-css-languageservice": "^6.3.10",

packages/vscode/src/__tests__/format.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ describe("format", () => {
3131
of=those
3232
/>
3333
34+
`,
35+
);
36+
});
37+
38+
it("async shorthand method", async () => {
39+
await snap.inline(
40+
() => format("<button async onClick() { await save() }>go</button>"),
41+
`
42+
<button async onClick() {
43+
await save();
44+
}>
45+
go
46+
</button>
47+
3448
`,
3549
);
3650
});

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)