-
-
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.
test(consistent-selector-style): added rule tests
- Loading branch information
1 parent
882fd80
commit e963ca7
Showing
15 changed files
with
301 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...in-svelte/tests/fixtures/rules/consistent-selector-style/valid/class-id-type/_config.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 @@ | ||
{ | ||
"options": [{ "style": ["class", "id", "type"] }] | ||
} |
15 changes: 15 additions & 0 deletions
15
...ts/fixtures/rules/consistent-selector-style/valid/class-id-type/class-scss01-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,15 @@ | ||
<a class="link">Click me!</a> | ||
|
||
<b class="bold">Text 1</b> | ||
|
||
<b>Text 2</b> | ||
|
||
<style lang="scss"> | ||
.link { | ||
color: red; | ||
} | ||
.bold { | ||
color: red; | ||
} | ||
</style> |
31 changes: 31 additions & 0 deletions
31
...e/tests/fixtures/rules/consistent-selector-style/valid/class-id-type/class01-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,31 @@ | ||
<a class="link">Click me!</a> | ||
|
||
<b class="bold">Text 1</b> | ||
|
||
<b data-key="val">Text 2</b> | ||
|
||
<style> | ||
.link { | ||
color: red; | ||
} | ||
.bold { | ||
color: red; | ||
} | ||
.link:active { | ||
color: red; | ||
} | ||
.link + .bold { | ||
color: red; | ||
} | ||
.bold[data-key="val"] { | ||
color: red; | ||
} | ||
.bold::before { | ||
color: red; | ||
} | ||
</style> |
3 changes: 3 additions & 0 deletions
3
...in-svelte/tests/fixtures/rules/consistent-selector-style/valid/class-type-id/_config.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 @@ | ||
{ | ||
"options": [{ "style": ["class", "type", "id"] }] | ||
} |
15 changes: 15 additions & 0 deletions
15
...ts/fixtures/rules/consistent-selector-style/valid/class-type-id/class-scss01-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,15 @@ | ||
<a class="link">Click me!</a> | ||
|
||
<b class="bold">Text 1</b> | ||
|
||
<b>Text 2</b> | ||
|
||
<style lang="scss"> | ||
.link { | ||
color: red; | ||
} | ||
.bold { | ||
color: red; | ||
} | ||
</style> |
31 changes: 31 additions & 0 deletions
31
...e/tests/fixtures/rules/consistent-selector-style/valid/class-type-id/class01-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,31 @@ | ||
<a class="link">Click me!</a> | ||
|
||
<b class="bold">Text 1</b> | ||
|
||
<b data-key="val">Text 2</b> | ||
|
||
<style> | ||
.link { | ||
color: red; | ||
} | ||
.bold { | ||
color: red; | ||
} | ||
.link:active { | ||
color: red; | ||
} | ||
.link + .bold { | ||
color: red; | ||
} | ||
.bold[data-key="val"] { | ||
color: red; | ||
} | ||
.bold::before { | ||
color: red; | ||
} | ||
</style> |
3 changes: 3 additions & 0 deletions
3
...in-svelte/tests/fixtures/rules/consistent-selector-style/valid/id-class-type/_config.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 @@ | ||
{ | ||
"options": [{ "style": ["id", "class", "type"] }] | ||
} |
35 changes: 35 additions & 0 deletions
35
...e/tests/fixtures/rules/consistent-selector-style/valid/id-class-type/class01-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,35 @@ | ||
<a class="link">Click me!</a> | ||
|
||
<a class="link">Click me two!</a> | ||
|
||
<b class="bold">Text 1</b> | ||
|
||
<b class="bold">Text 2</b> | ||
|
||
<b data-key="val">Text 2</b> | ||
|
||
<style> | ||
.link { | ||
color: red; | ||
} | ||
.bold { | ||
color: red; | ||
} | ||
.link:active { | ||
color: red; | ||
} | ||
.link + .bold { | ||
color: red; | ||
} | ||
.bold[data-key="val"] { | ||
color: red; | ||
} | ||
.bold::before { | ||
color: red; | ||
} | ||
</style> |
15 changes: 15 additions & 0 deletions
15
...tests/fixtures/rules/consistent-selector-style/valid/id-class-type/id-scss01-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,15 @@ | ||
<a id="link">Click me!</a> | ||
|
||
<b id="bold">Text 1</b> | ||
|
||
<b>Text 2</b> | ||
|
||
<style lang="scss"> | ||
#link { | ||
color: red; | ||
} | ||
#bold { | ||
color: red; | ||
} | ||
</style> |
31 changes: 31 additions & 0 deletions
31
...elte/tests/fixtures/rules/consistent-selector-style/valid/id-class-type/id01-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,31 @@ | ||
<a id="link">Click me!</a> | ||
|
||
<b id="bold">Text 1</b> | ||
|
||
<b data-key="val">Text 2</b> | ||
|
||
<style> | ||
#link { | ||
color: red; | ||
} | ||
#bold { | ||
color: red; | ||
} | ||
#link:active { | ||
color: red; | ||
} | ||
#link + #bold { | ||
color: red; | ||
} | ||
#bold[data-key="val"] { | ||
color: red; | ||
} | ||
#bold::before { | ||
color: red; | ||
} | ||
</style> |
3 changes: 3 additions & 0 deletions
3
...in-svelte/tests/fixtures/rules/consistent-selector-style/valid/id-type-class/_config.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 @@ | ||
{ | ||
"options": [{ "style": ["id", "type", "class"] }] | ||
} |
35 changes: 35 additions & 0 deletions
35
...e/tests/fixtures/rules/consistent-selector-style/valid/id-type-class/class01-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,35 @@ | ||
<a class="link">Click me!</a> | ||
|
||
<span class="link">Click me two!</span> | ||
|
||
<b class="bold">Text 1</b> | ||
|
||
<strong class="bold">Text 2</strong> | ||
|
||
<b data-key="val">Text 2</b> | ||
|
||
<style> | ||
.link { | ||
color: red; | ||
} | ||
.bold { | ||
color: red; | ||
} | ||
.link:active { | ||
color: red; | ||
} | ||
.link + .bold { | ||
color: red; | ||
} | ||
.bold[data-key="val"] { | ||
color: red; | ||
} | ||
.bold::before { | ||
color: red; | ||
} | ||
</style> |
15 changes: 15 additions & 0 deletions
15
...tests/fixtures/rules/consistent-selector-style/valid/id-type-class/id-scss01-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,15 @@ | ||
<a id="link">Click me!</a> | ||
|
||
<b id="bold">Text 1</b> | ||
|
||
<b>Text 2</b> | ||
|
||
<style lang="scss"> | ||
#link { | ||
color: red; | ||
} | ||
#bold { | ||
color: red; | ||
} | ||
</style> |
31 changes: 31 additions & 0 deletions
31
...elte/tests/fixtures/rules/consistent-selector-style/valid/id-type-class/id01-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,31 @@ | ||
<a id="link">Click me!</a> | ||
|
||
<b id="bold">Text 1</b> | ||
|
||
<b data-key="val">Text 2</b> | ||
|
||
<style> | ||
#link { | ||
color: red; | ||
} | ||
#bold { | ||
color: red; | ||
} | ||
#link:active { | ||
color: red; | ||
} | ||
#link + #bold { | ||
color: red; | ||
} | ||
#bold[data-key="val"] { | ||
color: red; | ||
} | ||
#bold::before { | ||
color: red; | ||
} | ||
</style> |
35 changes: 35 additions & 0 deletions
35
...te/tests/fixtures/rules/consistent-selector-style/valid/id-type-class/type01-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,35 @@ | ||
<a>Click me!</a> | ||
|
||
<a>Click me two!</a> | ||
|
||
<b>Text 1</b> | ||
|
||
<b>Text 2</b> | ||
|
||
<b data-key="val">Text 2</b> | ||
|
||
<style> | ||
a { | ||
color: red; | ||
} | ||
b { | ||
color: red; | ||
} | ||
a:active { | ||
color: red; | ||
} | ||
a + b { | ||
color: red; | ||
} | ||
b[data-key="val"] { | ||
color: red; | ||
} | ||
b::before { | ||
color: red; | ||
} | ||
</style> |