-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update svelte to v5.0.0-next.33 (#657)
- Loading branch information
Showing
7 changed files
with
31 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"eslint-plugin-svelte": patch | ||
--- | ||
|
||
feat: update svelte to v5.0.0-next.33 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
tests/fixtures/rules/no-unused-svelte-ignore/invalid/script-comment01-errors.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
- message: svelte-ignore comment is used, but not warned | ||
line: 4 | ||
column: 19 | ||
line: 7 | ||
column: 20 | ||
suggestions: null |
15 changes: 7 additions & 8 deletions
15
tests/fixtures/rules/no-unused-svelte-ignore/invalid/script-comment01-input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
<script> | ||
// svelte-ignore state-not-mutated | ||
let mutable = $state(42); | ||
// svelte-ignore state-not-mutated | ||
let immutable = $state(42); | ||
export function update(a) { | ||
immutable = a; | ||
let count = $state(0); | ||
let doubled = $derived(count * 2); | ||
// svelte-ignore static-state-reference | ||
console.log(count); | ||
export function fn() { | ||
// svelte-ignore static-state-reference | ||
console.log(doubled); | ||
} | ||
</script> | ||
|
||
{mutable}{immutable} |
10 changes: 6 additions & 4 deletions
10
tests/fixtures/rules/no-unused-svelte-ignore/valid/script-comment-input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<script> | ||
// svelte-ignore state-not-mutated | ||
let immutable = $state(42); | ||
let count = $state(0); | ||
let doubled = $derived(count * 2); | ||
// svelte-ignore static-state-reference | ||
console.log(count); | ||
// svelte-ignore static-state-reference | ||
console.log(doubled); | ||
</script> | ||
|
||
{immutable} |
16 changes: 7 additions & 9 deletions
16
tests/fixtures/rules/no-unused-svelte-ignore/valid/ts-lang01-input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
<script> | ||
let mutable = $state(42); | ||
// svelte-ignore state-not-mutated | ||
let immutable = $state(42); | ||
export function update(a) { | ||
mutable = a; | ||
} | ||
<script lang="ts"> | ||
let count = $state(0); | ||
let doubled = $derived(count * 2); | ||
// svelte-ignore static-state-reference | ||
console.log(count as any); | ||
// svelte-ignore static-state-reference | ||
console.log(doubled!); | ||
</script> | ||
|
||
{mutable}{immutable} |