-
-
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 49a6b98
Showing
6 changed files
with
106 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> |
35 changes: 35 additions & 0 deletions
35
...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,35 @@ | ||
<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; | ||
} | ||
a.link { | ||
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> |
35 changes: 35 additions & 0 deletions
35
...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,35 @@ | ||
<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; | ||
} | ||
a.link { | ||
color: red; | ||
} | ||
.bold[data-key="val"] { | ||
color: red; | ||
} | ||
.bold::before { | ||
color: red; | ||
} | ||
</style> |