-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
7 changed files
with
121 additions
and
0 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": minor | ||
--- | ||
|
||
feat: add support for `{@snippet}`and `{@render}` in indent rule |
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
40 changes: 40 additions & 0 deletions
40
tests/fixtures/rules/indent/invalid/snippets01-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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 3 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 4 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 5 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 6 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 7 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 11 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 12 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 6 spaces but found 0 spaces. | ||
line: 13 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 4 spaces but found 0 spaces. | ||
line: 14 | ||
column: 1 | ||
suggestions: null | ||
- message: Expected indentation of 2 spaces but found 0 spaces. | ||
line: 15 | ||
column: 1 | ||
suggestions: null |
16 changes: 16 additions & 0 deletions
16
tests/fixtures/rules/indent/invalid/snippets01-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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- prettier-ignore --> | ||
{#snippet | ||
foo( | ||
{ | ||
a | ||
} | ||
) | ||
} | ||
{/snippet} | ||
{@render | ||
foo( | ||
{ | ||
a | ||
} | ||
) | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/fixtures/rules/indent/invalid/snippets01-output.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- prettier-ignore --> | ||
{#snippet | ||
foo( | ||
{ | ||
a | ||
} | ||
) | ||
} | ||
{/snippet} | ||
{@render | ||
foo( | ||
{ | ||
a | ||
} | ||
) | ||
} |
3 changes: 3 additions & 0 deletions
3
tests/fixtures/rules/indent/invalid/snippets01-requirements.json
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,3 @@ | ||
{ | ||
"svelte": ">=5.0.0-0" | ||
} |