-
-
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.
feat(consistent-selector-style): Enabled support for partial style
- Loading branch information
1 parent
2e0b642
commit 27d8671
Showing
11 changed files
with
249 additions
and
1 deletion.
There are no files selected for viewing
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
3 changes: 3 additions & 0 deletions
3
...t-plugin-svelte/tests/fixtures/rules/consistent-selector-style/valid/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": ["type", "id"] }] | ||
} |
37 changes: 37 additions & 0 deletions
37
...-svelte/tests/fixtures/rules/consistent-selector-style/valid/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,37 @@ | ||
<a class="link">Click me!</a> | ||
|
||
<a class="link">Click me two!</a> | ||
|
||
<a>Click me three!</a> | ||
|
||
<b class="bold">Text 1</b> | ||
|
||
<b class="bold">Text 2</b> | ||
|
||
<b data-key="val">Text 3</b> | ||
|
||
<style> | ||
.link { | ||
color: red; | ||
} | ||
.bold { | ||
color: red; | ||
} | ||
.link:active { | ||
color: red; | ||
} | ||
.link + .bold { | ||
color: red; | ||
} | ||
.bold[data-key="val"] { | ||
color: red; | ||
} | ||
.bold::before { | ||
color: red; | ||
} | ||
</style> |
33 changes: 33 additions & 0 deletions
33
...gin-svelte/tests/fixtures/rules/consistent-selector-style/valid/type-id/id01-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,33 @@ | ||
<a id="link">Click me!</a> | ||
|
||
<a>Click me too!</a> | ||
|
||
<b id="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; | ||
} | ||
#bold[data-key="val"] { | ||
color: red; | ||
} | ||
#bold::before { | ||
color: red; | ||
} | ||
</style> |
13 changes: 13 additions & 0 deletions
13
...lte/tests/fixtures/rules/consistent-selector-style/valid/type-id/type-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,13 @@ | ||
<a>Click me!</a> | ||
|
||
<b>Text 1</b> | ||
|
||
<style lang="scss"> | ||
a { | ||
color: red; | ||
} | ||
b { | ||
color: red; | ||
} | ||
</style> |
35 changes: 35 additions & 0 deletions
35
...n-svelte/tests/fixtures/rules/consistent-selector-style/valid/type-id/type01-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>Click me!</a> | ||
|
||
<a>Click me two!</a> | ||
|
||
<b>Text 1</b> | ||
|
||
<b>Text 2</b> | ||
|
||
<b data-key="val">Text 2</b> | ||
|
||
<style> | ||
a { | ||
color: red; | ||
} | ||
b { | ||
color: red; | ||
} | ||
a:active { | ||
color: red; | ||
} | ||
a + b { | ||
color: red; | ||
} | ||
b[data-key="val"] { | ||
color: red; | ||
} | ||
b::before { | ||
color: red; | ||
} | ||
</style> |
3 changes: 3 additions & 0 deletions
3
...lint-plugin-svelte/tests/fixtures/rules/consistent-selector-style/valid/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": ["type"] }] | ||
} |
44 changes: 44 additions & 0 deletions
44
...gin-svelte/tests/fixtures/rules/consistent-selector-style/valid/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,44 @@ | ||
<a class="link">Click me!</a> | ||
|
||
<a class="link">Click me two!</a> | ||
|
||
<a>Click me three!</a> | ||
|
||
<a class="unique">Click me three!</a> | ||
|
||
<b class="bold">Text 1</b> | ||
|
||
<b class="bold">Text 2</b> | ||
|
||
<b data-key="val">Text 3</b> | ||
|
||
<style> | ||
.link { | ||
color: red; | ||
} | ||
.bold { | ||
color: red; | ||
} | ||
.link:active { | ||
color: red; | ||
} | ||
.link + .bold { | ||
color: red; | ||
} | ||
.bold[data-key="val"] { | ||
color: red; | ||
} | ||
.bold::before { | ||
color: red; | ||
} | ||
.unique { | ||
color: red; | ||
} | ||
</style> |
33 changes: 33 additions & 0 deletions
33
...plugin-svelte/tests/fixtures/rules/consistent-selector-style/valid/type/id01-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,33 @@ | ||
<a id="link">Click me!</a> | ||
|
||
<a>Click me too!</a> | ||
|
||
<b id="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; | ||
} | ||
#bold[data-key="val"] { | ||
color: red; | ||
} | ||
#bold::before { | ||
color: red; | ||
} | ||
</style> |
13 changes: 13 additions & 0 deletions
13
...svelte/tests/fixtures/rules/consistent-selector-style/valid/type/type-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,13 @@ | ||
<a>Click me!</a> | ||
|
||
<b>Text 1</b> | ||
|
||
<style lang="scss"> | ||
a { | ||
color: red; | ||
} | ||
b { | ||
color: red; | ||
} | ||
</style> |
35 changes: 35 additions & 0 deletions
35
...ugin-svelte/tests/fixtures/rules/consistent-selector-style/valid/type/type01-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>Click me!</a> | ||
|
||
<a>Click me two!</a> | ||
|
||
<b>Text 1</b> | ||
|
||
<b>Text 2</b> | ||
|
||
<b data-key="val">Text 2</b> | ||
|
||
<style> | ||
a { | ||
color: red; | ||
} | ||
b { | ||
color: red; | ||
} | ||
a:active { | ||
color: red; | ||
} | ||
a + b { | ||
color: red; | ||
} | ||
b[data-key="val"] { | ||
color: red; | ||
} | ||
b::before { | ||
color: red; | ||
} | ||
</style> |