Skip to content

Commit 49a6b98

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

File tree

6 files changed

+106
-0
lines changed

6 files changed

+106
-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,35 @@
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+
a.link {
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,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,35 @@
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+
a.link {
25+
color: red;
26+
}
27+
28+
.bold[data-key="val"] {
29+
color: red;
30+
}
31+
32+
.bold::before {
33+
color: red;
34+
}
35+
</style>

0 commit comments

Comments
 (0)