Skip to content

Commit

Permalink
test(consistent-selector-style): added rule tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Dec 5, 2024
1 parent 882fd80 commit 49a6b98
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"options": [{ "style": ["class", "id", "type"] }]
}
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>
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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"options": [{ "style": ["class", "type", "id"] }]
}
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>
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>

0 comments on commit 49a6b98

Please sign in to comment.