Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/prettier-plugin-marko-4-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@marko/language-server": patch
"marko-vscode": patch
---

Update prettier-plugin-marko to 4.1, so formatting keeps the `async` keyword on shorthand methods.
2 changes: 1 addition & 1 deletion packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"jsdom": "^29.1.1",
"marko": "^5.39.33",
"prettier": "^3.8.4",
"prettier-plugin-marko": "^4.0.10",
"prettier-plugin-marko": "^4.1.0",
"relative-import-path": "^1.0.1",
"typescript": "^6.0.3",
"vscode-css-languageservice": "^6.3.10",
Expand Down
14 changes: 14 additions & 0 deletions packages/vscode/src/__tests__/format.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ describe("format", () => {
of=those
/>

`,
);
});

it("async shorthand method", async () => {
await snap.inline(
() => format("<button async onClick() { await save() }>go</button>"),
`
<button async onClick() {
await save();
}>
go
</button>

`,
);
});
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.