Skip to content

Commit 42652bb

Browse files
committed
fix tabs
1 parent fcec223 commit 42652bb

File tree

10 files changed

+76
-60
lines changed

10 files changed

+76
-60
lines changed

test/runtime/samples/const-tag-hoisting/main.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<div>{n} ^ 4 = {hypercubed}</div>
77

88
{@const squared = n * n}
9-
{@const cubed = squared * n}
10-
{@const hypercubed = cubed * n}
9+
{@const cubed = squared * n}
10+
{@const hypercubed = cubed * n}
1111
{/each}

test/runtime/samples/const-tag-ordering/main.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
<div>{n} ^ 4 = {hypercubed}</div>
77

88
{@const squared = n * n}
9-
{@const cubed = squared * n}
10-
{@const hypercubed = cubed * n}
9+
{@const cubed = squared * n}
10+
{@const hypercubed = cubed * n}
1111
{/each}
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
[{
2-
"code": "invalid-const-declaration",
3-
"message": "'a' has already been declared",
4-
"start": { "line": 7, "column": 2, "character": 84 },
5-
"end": { "line": 7, "column": 19, "character": 101 },
6-
"pos": 84
7-
}]
1+
[
2+
{
3+
"code": "invalid-const-declaration",
4+
"message": "'a' has already been declared",
5+
"start": { "line": 7, "column": 2, "character": 84 },
6+
"end": { "line": 7, "column": 19, "character": 101 },
7+
"pos": 84
8+
}
9+
]
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
[{
2-
"code": "invalid-const-declaration",
3-
"message": "'item' has already been declared",
4-
"start": { "line": 6, "column": 2, "character": 64 },
5-
"end": { "line": 6, "column": 21, "character": 83 },
6-
"pos": 64
7-
}]
1+
[
2+
{
3+
"code": "invalid-const-declaration",
4+
"message": "'item' has already been declared",
5+
"start": { "line": 6, "column": 2, "character": 64 },
6+
"end": { "line": 6, "column": 21, "character": 83 },
7+
"pos": 64
8+
}
9+
]
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
[{
2-
"code": "cyclical-constant-tags",
3-
"message": "Cyclical dependency detected: b → c → b",
4-
"start": { "line": 6, "column": 2, "character": 61 },
5-
"end": { "line": 6, "column": 20, "character": 79 },
6-
"pos": 61
7-
}]
1+
[
2+
{
3+
"code": "cyclical-constant-tags",
4+
"message": "Cyclical dependency detected: b → c → b",
5+
"start": { "line": 6, "column": 2, "character": 61 },
6+
"end": { "line": 6, "column": 20, "character": 79 },
7+
"pos": 61
8+
}
9+
]
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
[{
2-
"code": "invalid-const-placement",
3-
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
4-
"start": { "line": 5, "column": 0, "character": 36 },
5-
"end": { "line": 5, "column": 18, "character": 54 },
6-
"pos": 36
7-
}]
1+
[
2+
{
3+
"code": "invalid-const-placement",
4+
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
5+
"start": { "line": 5, "column": 0, "character": 36 },
6+
"end": { "line": 5, "column": 18, "character": 54 },
7+
"pos": 36
8+
}
9+
]
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
[{
2-
"code": "invalid-const-placement",
3-
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
4-
"start": { "line": 6, "column": 2, "character": 46 },
5-
"end": { "line": 6, "column": 20, "character": 64 },
6-
"pos": 46
7-
}]
1+
[
2+
{
3+
"code": "invalid-const-placement",
4+
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
5+
"start": { "line": 6, "column": 2, "character": 46 },
6+
"end": { "line": 6, "column": 20, "character": 64 },
7+
"pos": 46
8+
}
9+
]
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
[{
2-
"code": "invalid-const-placement",
3-
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
4-
"start": { "line": 7, "column": 4, "character": 63 },
5-
"end": { "line": 7, "column": 18, "character": 77 },
6-
"pos": 63
7-
}]
1+
[
2+
{
3+
"code": "invalid-const-placement",
4+
"message": "{@const} must be the immediate child of {#each}, {:then}, {:catch}, <svelte:fragment> and <Component>",
5+
"start": { "line": 7, "column": 4, "character": 63 },
6+
"end": { "line": 7, "column": 18, "character": 77 },
7+
"pos": 63
8+
}
9+
]
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
[{
2-
"code": "invalid-const-update",
3-
"message": "'b' is declared using {@const ...} and it is read-only",
4-
"start": { "line": 7, "column": 26, "character": 106 },
5-
"end": { "line": 7, "column": 30, "character": 110 },
6-
"pos": 106
7-
}]
1+
[
2+
{
3+
"code": "invalid-const-update",
4+
"message": "'b' is declared using {@const ...} and it is read-only",
5+
"start": { "line": 7, "column": 26, "character": 106 },
6+
"end": { "line": 7, "column": 30, "character": 110 },
7+
"pos": 106
8+
}
9+
]
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
[{
2-
"code": "invalid-binding",
3-
"message": "Cannot bind to a variable declared with {@const ...}",
4-
"start": { "line": 7, "column": 9, "character": 89 },
5-
"end": { "line": 7, "column": 23, "character": 103 },
6-
"pos": 89
7-
}]
1+
[
2+
{
3+
"code": "invalid-binding",
4+
"message": "Cannot bind to a variable declared with {@const ...}",
5+
"start": { "line": 7, "column": 9, "character": 89 },
6+
"end": { "line": 7, "column": 23, "character": 103 },
7+
"pos": 89
8+
}
9+
]

0 commit comments

Comments
 (0)