Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the indent rules supports ECMAScript 2020
- Loading branch information
Showing
26 changed files
with
341 additions
and
25 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
7 changes: 7 additions & 0 deletions
7
tests/fixtures/html-indent/nullish-coalescing-operator-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,7 @@ | ||
<!--{}--> | ||
<template> | ||
<div v-bind:a="a | ||
?? | ||
b | ||
"/> | ||
</template> |
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 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}}--> | ||
<!-- TODO If ESLint supports the new syntax by default, remove the parser specification and test. --> | ||
|
||
<template> | ||
<div v-bind:a=" | ||
obj | ||
?.aaa | ||
?.bbb | ||
?.ccc | ||
"/> | ||
</template> |
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"}}--> | ||
<!-- TODO If ESLint supports the new syntax by default, remove the parser specification and test. --> | ||
<template> | ||
<div v-bind:a=" | ||
obj?. | ||
aaa?. | ||
bbb?. | ||
ccc | ||
"/> | ||
</template> |
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"}}--> | ||
<!-- TODO If ESLint supports the new syntax by default, remove the parser specification and test. --> | ||
<template> | ||
<div v-bind:a=" | ||
obj?. | ||
[aaa]?. | ||
[bbb] | ||
?.[ccc] | ||
"/> | ||
</template> |
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 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}}--> | ||
<!-- TODO If ESLint supports the new syntax by default, remove the parser specification and test. --> | ||
<template> | ||
<div v-bind:a=" | ||
obj?. | ||
( | ||
aaa | ||
)?. | ||
( | ||
bbb | ||
) | ||
?.( | ||
ccc | ||
) | ||
"/> | ||
</template> |
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,7 @@ | ||
<!--{}--> | ||
<script> | ||
var a = | ||
10n | ||
+ | ||
5n | ||
</script> |
16 changes: 16 additions & 0 deletions
16
tests/fixtures/script-indent/export-all-declaration-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,16 @@ | ||
<!--{}--> | ||
<script> | ||
export | ||
* | ||
as | ||
foo | ||
from | ||
"mod" | ||
; | ||
export | ||
* | ||
as | ||
bar | ||
from | ||
"mod" | ||
</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 @@ | ||
<!--{}--> | ||
<script> | ||
async function fn() { | ||
for | ||
await | ||
( | ||
a | ||
of | ||
b | ||
) | ||
{ | ||
; | ||
} | ||
} | ||
</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,7 @@ | ||
<!--{}--> | ||
<script> | ||
const fs = import | ||
( | ||
'fs' | ||
) | ||
</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,8 @@ | ||
<!--{}--> | ||
<script> | ||
const module = import | ||
( | ||
m. | ||
n | ||
) | ||
</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,11 @@ | ||
<!--{}--> | ||
<script> | ||
async function fn() { | ||
return await | ||
import | ||
( | ||
m. | ||
n | ||
) | ||
} | ||
</script> |
6 changes: 6 additions & 0 deletions
6
tests/fixtures/script-indent/nullish-coalescing-operator-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,6 @@ | ||
<!--{}--> | ||
<script> | ||
var v = a | ||
?? | ||
b | ||
</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,12 @@ | ||
<!--{}--> | ||
<script> | ||
var obj = { | ||
a: | ||
1, | ||
...obj1, | ||
b: | ||
2, | ||
... | ||
obj2, | ||
} | ||
</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,8 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}}--> | ||
<!-- TODO If ESLint supports the new syntax by default, remove the parser specification and test. --> | ||
<script> | ||
obj | ||
?.aaa | ||
?.bbb | ||
?.ccc | ||
</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,8 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}}--> | ||
<!-- TODO If ESLint supports the new syntax by default, remove the parser specification and test. --> | ||
<script> | ||
obj?. | ||
aaa?. | ||
bbb?. | ||
ccc | ||
</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,8 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}}--> | ||
<!-- TODO If ESLint supports the new syntax by default, remove the parser specification and test. --> | ||
<script> | ||
obj?. | ||
[aaa]?. | ||
[bbb] | ||
?.[ccc] | ||
</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,14 @@ | ||
<!--{"parserOptions": {"parser":"@typescript-eslint/parser"}}--> | ||
<!-- TODO If ESLint supports the new syntax by default, remove the parser specification and test. --> | ||
<script> | ||
obj?. | ||
( | ||
aaa | ||
)?. | ||
( | ||
bbb | ||
) | ||
?.( | ||
ccc | ||
) | ||
</script> |
Oops, something went wrong.