Skip to content

Commit e963ca7

Browse files
committed
test(consistent-selector-style): added rule tests
1 parent 882fd80 commit e963ca7

File tree

15 files changed

+301
-0
lines changed

15 files changed

+301
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"options": [{ "style": ["class", "id", "type"] }]
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<a class="link">Click me!</a>
2+
3+
<b class="bold">Text 1</b>
4+
5+
<b>Text 2</b>
6+
7+
<style lang="scss">
8+
.link {
9+
color: red;
10+
}
11+
12+
.bold {
13+
color: red;
14+
}
15+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<a class="link">Click me!</a>
2+
3+
<b class="bold">Text 1</b>
4+
5+
<b data-key="val">Text 2</b>
6+
7+
<style>
8+
.link {
9+
color: red;
10+
}
11+
12+
.bold {
13+
color: red;
14+
}
15+
16+
.link:active {
17+
color: red;
18+
}
19+
20+
.link + .bold {
21+
color: red;
22+
}
23+
24+
.bold[data-key="val"] {
25+
color: red;
26+
}
27+
28+
.bold::before {
29+
color: red;
30+
}
31+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"options": [{ "style": ["class", "type", "id"] }]
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<a class="link">Click me!</a>
2+
3+
<b class="bold">Text 1</b>
4+
5+
<b>Text 2</b>
6+
7+
<style lang="scss">
8+
.link {
9+
color: red;
10+
}
11+
12+
.bold {
13+
color: red;
14+
}
15+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<a class="link">Click me!</a>
2+
3+
<b class="bold">Text 1</b>
4+
5+
<b data-key="val">Text 2</b>
6+
7+
<style>
8+
.link {
9+
color: red;
10+
}
11+
12+
.bold {
13+
color: red;
14+
}
15+
16+
.link:active {
17+
color: red;
18+
}
19+
20+
.link + .bold {
21+
color: red;
22+
}
23+
24+
.bold[data-key="val"] {
25+
color: red;
26+
}
27+
28+
.bold::before {
29+
color: red;
30+
}
31+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"options": [{ "style": ["id", "class", "type"] }]
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<a class="link">Click me!</a>
2+
3+
<a class="link">Click me two!</a>
4+
5+
<b class="bold">Text 1</b>
6+
7+
<b class="bold">Text 2</b>
8+
9+
<b data-key="val">Text 2</b>
10+
11+
<style>
12+
.link {
13+
color: red;
14+
}
15+
16+
.bold {
17+
color: red;
18+
}
19+
20+
.link:active {
21+
color: red;
22+
}
23+
24+
.link + .bold {
25+
color: red;
26+
}
27+
28+
.bold[data-key="val"] {
29+
color: red;
30+
}
31+
32+
.bold::before {
33+
color: red;
34+
}
35+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<a id="link">Click me!</a>
2+
3+
<b id="bold">Text 1</b>
4+
5+
<b>Text 2</b>
6+
7+
<style lang="scss">
8+
#link {
9+
color: red;
10+
}
11+
12+
#bold {
13+
color: red;
14+
}
15+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<a id="link">Click me!</a>
2+
3+
<b id="bold">Text 1</b>
4+
5+
<b data-key="val">Text 2</b>
6+
7+
<style>
8+
#link {
9+
color: red;
10+
}
11+
12+
#bold {
13+
color: red;
14+
}
15+
16+
#link:active {
17+
color: red;
18+
}
19+
20+
#link + #bold {
21+
color: red;
22+
}
23+
24+
#bold[data-key="val"] {
25+
color: red;
26+
}
27+
28+
#bold::before {
29+
color: red;
30+
}
31+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"options": [{ "style": ["id", "type", "class"] }]
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<a class="link">Click me!</a>
2+
3+
<span class="link">Click me two!</span>
4+
5+
<b class="bold">Text 1</b>
6+
7+
<strong class="bold">Text 2</strong>
8+
9+
<b data-key="val">Text 2</b>
10+
11+
<style>
12+
.link {
13+
color: red;
14+
}
15+
16+
.bold {
17+
color: red;
18+
}
19+
20+
.link:active {
21+
color: red;
22+
}
23+
24+
.link + .bold {
25+
color: red;
26+
}
27+
28+
.bold[data-key="val"] {
29+
color: red;
30+
}
31+
32+
.bold::before {
33+
color: red;
34+
}
35+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<a id="link">Click me!</a>
2+
3+
<b id="bold">Text 1</b>
4+
5+
<b>Text 2</b>
6+
7+
<style lang="scss">
8+
#link {
9+
color: red;
10+
}
11+
12+
#bold {
13+
color: red;
14+
}
15+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<a id="link">Click me!</a>
2+
3+
<b id="bold">Text 1</b>
4+
5+
<b data-key="val">Text 2</b>
6+
7+
<style>
8+
#link {
9+
color: red;
10+
}
11+
12+
#bold {
13+
color: red;
14+
}
15+
16+
#link:active {
17+
color: red;
18+
}
19+
20+
#link + #bold {
21+
color: red;
22+
}
23+
24+
#bold[data-key="val"] {
25+
color: red;
26+
}
27+
28+
#bold::before {
29+
color: red;
30+
}
31+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<a>Click me!</a>
2+
3+
<a>Click me two!</a>
4+
5+
<b>Text 1</b>
6+
7+
<b>Text 2</b>
8+
9+
<b data-key="val">Text 2</b>
10+
11+
<style>
12+
a {
13+
color: red;
14+
}
15+
16+
b {
17+
color: red;
18+
}
19+
20+
a:active {
21+
color: red;
22+
}
23+
24+
a + b {
25+
color: red;
26+
}
27+
28+
b[data-key="val"] {
29+
color: red;
30+
}
31+
32+
b::before {
33+
color: red;
34+
}
35+
</style>

0 commit comments

Comments
 (0)