Skip to content

Commit aa9b7df

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

30 files changed

+673
-0
lines changed
Lines changed: 3 additions & 0 deletions
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,24 @@
1+
<a class="link">Click me!</a>
2+
3+
<a>Click me two!</a>
4+
5+
<b class="bold">Text 1</b>
6+
7+
<b data-key="val">Text 3</b>
8+
9+
<i>Italic</i>
10+
11+
<style>
12+
.link,
13+
.bold,
14+
.link:active,
15+
.link + .bold,
16+
.bold[data-key="val"],
17+
.bold::before,
18+
i,
19+
i:active,
20+
#bold + i,
21+
i::before {
22+
color: red;
23+
}
24+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<a class="link">Click me!</a>
2+
3+
<a>Click me two!</a>
4+
5+
<b class="bold">Text 1</b>
6+
7+
<b data-key="val">Text 3</b>
8+
9+
<i>Italic</i>
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+
36+
i {
37+
color: red;
38+
}
39+
40+
i:active {
41+
color: red;
42+
}
43+
44+
#bold + i {
45+
color: red;
46+
}
47+
48+
i::before {
49+
color: red;
50+
}
51+
</style>
Lines changed: 3 additions & 0 deletions
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,51 @@
1+
<a class="link">Click me!</a>
2+
3+
<a>Click me two!</a>
4+
5+
<b class="bold">Text 1</b>
6+
7+
<b data-key="val">Text 3</b>
8+
9+
<i>Italic</i>
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+
36+
i {
37+
color: red;
38+
}
39+
40+
i:active {
41+
color: red;
42+
}
43+
44+
#bold + i {
45+
color: red;
46+
}
47+
48+
i::before {
49+
color: red;
50+
}
51+
</style>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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" data-key="val">Text 2</b>
8+
9+
<style>
10+
.link {
11+
color: red;
12+
}
13+
14+
.bold {
15+
color: red;
16+
}
17+
18+
.link:active {
19+
color: red;
20+
}
21+
22+
.link + .bold {
23+
color: red;
24+
}
25+
26+
.bold[data-key="val"] {
27+
color: red;
28+
}
29+
30+
.bold::before {
31+
color: red;
32+
}
33+
</style>
Lines changed: 3 additions & 0 deletions
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>
Lines changed: 31 additions & 0 deletions
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>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"options": [{ "style": ["class", "type", "id"] }]
3+
}

0 commit comments

Comments
 (0)