-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update indent rule to support typescript v4.5 (#71)
* Update indent rule to support typescript v4.5 * update * update
- Loading branch information
Showing
25 changed files
with
817 additions
and
16 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
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
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
32 changes: 32 additions & 0 deletions
32
tests/fixtures/rules/indent/invalid/ts-v5/ts-import-assertion01-errors.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,32 @@ | ||
[ | ||
{ | ||
"message": "Expected indentation of 2 spaces but found 0 spaces.", | ||
"line": 3, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 4 spaces but found 0 spaces.", | ||
"line": 4, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 6 spaces but found 0 spaces.", | ||
"line": 5, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 8 spaces but found 0 spaces.", | ||
"line": 6, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 8 spaces but found 0 spaces.", | ||
"line": 7, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 4 spaces but found 0 spaces.", | ||
"line": 8, | ||
"column": 1 | ||
} | ||
] |
11 changes: 11 additions & 0 deletions
11
tests/fixtures/rules/indent/invalid/ts-v5/ts-import-assertion01-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,11 @@ | ||
<!-- prettier-ignore --> | ||
<script lang="ts"> | ||
import foo from "./foo.json" assert | ||
{ | ||
type | ||
: | ||
"json" | ||
} | ||
</script> | ||
|
||
<!--tests/fixtures/rules/indent/invalid/ts/ts-import-assertion01-input--> |
11 changes: 11 additions & 0 deletions
11
tests/fixtures/rules/indent/invalid/ts-v5/ts-import-assertion01-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,11 @@ | ||
<!-- prettier-ignore --> | ||
<script lang="ts"> | ||
import foo from "./foo.json" assert | ||
{ | ||
type | ||
: | ||
"json" | ||
} | ||
</script> | ||
|
||
<!--tests/fixtures/rules/indent/invalid/ts/ts-import-assertion01-input--> |
62 changes: 62 additions & 0 deletions
62
tests/fixtures/rules/indent/invalid/ts-v5/ts-import-assertion02-errors.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,62 @@ | ||
[ | ||
{ | ||
"message": "Expected indentation of 2 spaces but found 0 spaces.", | ||
"line": 3, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 4 spaces but found 0 spaces.", | ||
"line": 4, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 4 spaces but found 0 spaces.", | ||
"line": 5, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 6 spaces but found 0 spaces.", | ||
"line": 6, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 8 spaces but found 0 spaces.", | ||
"line": 7, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 8 spaces but found 0 spaces.", | ||
"line": 8, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 10 spaces but found 0 spaces.", | ||
"line": 9, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 12 spaces but found 0 spaces.", | ||
"line": 10, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 12 spaces but found 0 spaces.", | ||
"line": 11, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 8 spaces but found 0 spaces.", | ||
"line": 12, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 4 spaces but found 0 spaces.", | ||
"line": 13, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 2 spaces but found 0 spaces.", | ||
"line": 14, | ||
"column": 1 | ||
} | ||
] |
17 changes: 17 additions & 0 deletions
17
tests/fixtures/rules/indent/invalid/ts-v5/ts-import-assertion02-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,17 @@ | ||
<!-- prettier-ignore --> | ||
<script lang="ts"> | ||
import( | ||
"./foo.json", | ||
{ | ||
assert | ||
: | ||
{ | ||
type | ||
: | ||
"json" | ||
} | ||
} | ||
) | ||
</script> | ||
|
||
<!--tests/fixtures/rules/indent/invalid/ts/ts-import-assertion02-input--> |
17 changes: 17 additions & 0 deletions
17
tests/fixtures/rules/indent/invalid/ts-v5/ts-import-assertion02-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,17 @@ | ||
<!-- prettier-ignore --> | ||
<script lang="ts"> | ||
import( | ||
"./foo.json", | ||
{ | ||
assert | ||
: | ||
{ | ||
type | ||
: | ||
"json" | ||
} | ||
} | ||
) | ||
</script> | ||
|
||
<!--tests/fixtures/rules/indent/invalid/ts/ts-import-assertion02-input--> |
37 changes: 37 additions & 0 deletions
37
tests/fixtures/rules/indent/invalid/ts-v5/ts-import-assertion03-errors.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,37 @@ | ||
[ | ||
{ | ||
"message": "Expected indentation of 2 spaces but found 0 spaces.", | ||
"line": 3, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 4 spaces but found 0 spaces.", | ||
"line": 4, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 6 spaces but found 0 spaces.", | ||
"line": 5, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 8 spaces but found 0 spaces.", | ||
"line": 6, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 8 spaces but found 0 spaces.", | ||
"line": 7, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 6 spaces but found 0 spaces.", | ||
"line": 8, | ||
"column": 1 | ||
}, | ||
{ | ||
"message": "Expected indentation of 4 spaces but found 0 spaces.", | ||
"line": 9, | ||
"column": 1 | ||
} | ||
] |
Oops, something went wrong.