Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for ts4.5 to
vue/script-indent
rule
- Loading branch information
Showing
11 changed files
with
231 additions
and
33 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
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,9 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}, "requirements": { "@typescript-eslint/parser": ">=5.4.1 || ^5.4.1-0" } }--> | ||
<script lang="ts"> | ||
import foo from "./foo.json" assert | ||
{ | ||
type | ||
: | ||
"json" | ||
} | ||
</script> |
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,15 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}, "requirements": { "@typescript-eslint/parser": ">=5.4.1 || ^5.4.1-0" } }--> | ||
<script lang="ts"> | ||
import( | ||
"./foo.json", | ||
{ | ||
assert | ||
: | ||
{ | ||
type | ||
: | ||
"json" | ||
} | ||
} | ||
) | ||
</script> |
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,10 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}, "requirements": { "@typescript-eslint/parser": ">=5.4.1 || ^5.4.1-0" } }--> | ||
<script lang="ts"> | ||
export * from "mod" assert | ||
{ | ||
type | ||
: | ||
"json" | ||
} | ||
; | ||
</script> |
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,10 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}, "requirements": { "@typescript-eslint/parser": ">=5.4.1 || ^5.4.1-0" } }--> | ||
<script lang="ts"> | ||
export { foo } from "mod" assert | ||
{ | ||
type | ||
: | ||
"json" | ||
} | ||
; | ||
</script> |
17 changes: 17 additions & 0 deletions
17
tests/fixtures/script-indent/ts-type-only-import-export-01.vue
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 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}, "requirements": { "@typescript-eslint/parser": ">=5.4.0 || ^5.4.1-0" } }--> | ||
<script lang="ts"> | ||
import | ||
type | ||
Foo | ||
from | ||
'foo' | ||
import | ||
type | ||
{ | ||
Foo | ||
} | ||
from | ||
'foo'; | ||
export | ||
type Foo = {} | ||
</script> |
23 changes: 23 additions & 0 deletions
23
tests/fixtures/script-indent/ts-type-only-import-export-02.vue
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,23 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}, "requirements": { "@typescript-eslint/parser": ">=5.4.0 || ^5.4.1-0" } }--> | ||
<script lang="ts"> | ||
import | ||
{ | ||
type | ||
Foo | ||
} | ||
from | ||
'foo'; | ||
export | ||
{ | ||
type | ||
Bar | ||
} | ||
from | ||
'bar'; | ||
export | ||
{ | ||
type | ||
Baz | ||
} | ||
; | ||
</script> |
26 changes: 26 additions & 0 deletions
26
tests/fixtures/script-indent/ts-type-only-import-export-03.vue
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,26 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}, "requirements": { "@typescript-eslint/parser": ">=5.4.0 || ^5.4.1-0" } }--> | ||
<script lang="ts"> | ||
import | ||
{ | ||
type | ||
Foo | ||
as Foo2 | ||
} | ||
from | ||
'foo'; | ||
export | ||
{ | ||
type | ||
Bar | ||
as Bar2 | ||
} | ||
from | ||
'bar'; | ||
export | ||
{ | ||
type | ||
Baz | ||
as Baz2 | ||
} | ||
; | ||
</script> |