-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk/skyux-eslint): add linting rule to detect the use of legacy …
…icons (#3061)
- Loading branch information
1 parent
e364c04
commit 1abcf12
Showing
10 changed files
with
1,089 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
44 changes: 44 additions & 0 deletions
44
libs/sdk/skyux-eslint/docs/rules/template/no-legacy-icons.md
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 @@ | ||
# `skyux-eslint-template/no-legacy-icons` | ||
|
||
Prevents usage of legacy icons in HTML templates. | ||
|
||
- Type: problem | ||
|
||
<br> | ||
|
||
## Rule Options | ||
|
||
The rule does not have any configuration options. | ||
|
||
<br> | ||
|
||
## Usage Examples | ||
|
||
#### Default Config | ||
|
||
```json | ||
{ | ||
"rules": { | ||
"skyux-eslint-template/no-legacy-icons": ["error"] | ||
} | ||
} | ||
``` | ||
|
||
#### ❌ Invalid Code | ||
|
||
```html | ||
<sky-icon icon="plus-circle"></sky-icon> | ||
~~~~~~~~~~~~~~~~~~ | ||
``` | ||
```html | ||
<sky-action-button-container> | ||
<sky-action-button (actionClick)="filterActionClick()"> | ||
<sky-action-button-icon iconType="trash" /> | ||
~~~~~~~~~~~~~~~~ | ||
<sky-action-button-header> Delete a list </sky-action-button-header> | ||
<sky-action-button-details> | ||
Delete an existing list. | ||
</sky-action-button-details> | ||
</sky-action-button> | ||
</sky-action-button-container> | ||
``` |
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
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
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
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
Oops, something went wrong.