Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved closing bracket indentation for
vue/html-indent
rule. (#1162)
- Added `closeBracket.startTag`, `closeBracket.endTag` and `closeBracket.selfClosingTag` options to `vue/html-indent` rule. So that the closeBracket offset value can be set for each tag type. - Changed `vue/html-indent` rule to calculate the base point of the indent offset of the closing bracket of the end tag by the start tag.
- Loading branch information
Showing
9 changed files
with
157 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!--{}--> | ||
<template> | ||
<a | ||
href="#" | ||
>Link 1</a | ||
> | ||
<a | ||
href="#" | ||
> | ||
Link 2</a | ||
> | ||
<div>Content</div | ||
> | ||
<div | ||
/> | ||
</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 @@ | ||
<!--{"options":[2, { "closeBracket": 1 }]}--> | ||
<template> | ||
<a | ||
href="#" | ||
>Link 1</a | ||
> | ||
<a | ||
href="#" | ||
> | ||
Link 2</a | ||
> | ||
<div>Content</div | ||
> | ||
<div | ||
/> | ||
</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 @@ | ||
<!--{"options":[2, { "closeBracket": { "startTag": 1 } }]}--> | ||
<template> | ||
<a | ||
href="#" | ||
>Link 1</a | ||
> | ||
<a | ||
href="#" | ||
> | ||
Link 2</a | ||
> | ||
<div>Content</div | ||
> | ||
<div | ||
/> | ||
</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 @@ | ||
<!--{"options":[2, { "closeBracket": { "endTag": 1 } }]}--> | ||
<template> | ||
<a | ||
href="#" | ||
>Link 1</a | ||
> | ||
<a | ||
href="#" | ||
> | ||
Link 2</a | ||
> | ||
<div>Content</div | ||
> | ||
<div | ||
/> | ||
</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 @@ | ||
<!--{"options":[2, { "closeBracket": { "selfClosingTag": 1 } }]}--> | ||
<template> | ||
<a | ||
href="#" | ||
>Link 1</a | ||
> | ||
<a | ||
href="#" | ||
> | ||
Link 2</a | ||
> | ||
<div>Content</div | ||
> | ||
<div | ||
/> | ||
</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 @@ | ||
<!--{"options":[2, { "closeBracket": { "startTag": 1, "endTag": 2, "selfClosingTag": 3 } }]}--> | ||
<template> | ||
<a | ||
href="#" | ||
>Link 1</a | ||
> | ||
<a | ||
href="#" | ||
> | ||
Link 2</a | ||
> | ||
<div>Content</div | ||
> | ||
<div | ||
/> | ||
</template> |