Skip to content

Commit 800d8d7

Browse files
committed
prettier
1 parent 1e697d3 commit 800d8d7

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

.prettierrc

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,23 @@
33
"singleQuote": true,
44
"trailingComma": "none",
55
"printWidth": 100,
6-
"plugins": [
7-
"prettier-plugin-svelte"
8-
],
6+
"plugins": ["prettier-plugin-svelte"],
97
"overrides": [
108
{
11-
"files": [
12-
"*.svelte"
13-
],
9+
"files": ["*.svelte"],
1410
"options": {
1511
"bracketSameLine": false
1612
}
1713
},
1814
{
19-
"files": [
20-
"README.md",
21-
"packages/*/README.md",
22-
"**/package.json"
23-
],
15+
"files": ["README.md", "packages/*/README.md", "**/package.json"],
2416
"options": {
2517
"useTabs": false,
2618
"tabWidth": 2
2719
}
2820
},
2921
{
30-
"files": [
31-
"sites/svelte-5-preview/src/routes/docs/content/**/*.md"
32-
],
22+
"files": ["sites/svelte-5-preview/src/routes/docs/content/**/*.md"],
3323
"options": {
3424
"printWidth": 60
3525
}

sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ In rare cases, you may need to run code _before_ the DOM updates. For this we ca
128128
messages;
129129
130130
// autoscroll when new messages are added
131-
if (div.offsetHeight + div.scrollTop > div.scrollHeight - 20) {
131+
if (
132+
div.offsetHeight + div.scrollTop >
133+
div.scrollHeight - 20
134+
) {
132135
tick().then(() => {
133136
div.scrollTo(0, div.scrollHeight);
134137
});

sites/svelte-5-preview/src/routes/docs/content/03-appendix/01-faq.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ Beyond the complexities listed above, the current design imposes some unfortunat
5353
export {};
5454
// @filename: index.ts
5555
// ---cut---
56-
let theme: 'light' | 'dark' = $derived(dark ? 'dark' : 'light');
56+
let theme: 'light' | 'dark' = $derived(
57+
dark ? 'dark' : 'light'
58+
);
5759
```
5860
- Updating values inside `$:` statements can cause [confusing behaviour](https://github.com/sveltejs/svelte/issues/6732) and [impossible to resolve bugs](https://github.com/sveltejs/svelte/issues/4933) and the statements may run in an [unexpected order](https://github.com/sveltejs/svelte/issues/4516)
5961
- `$: {...}` doesn't let you return a cleanup function the way that [`$effect`](runes#$effect) does

0 commit comments

Comments
 (0)