This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 888
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the UI for the rules documentation (#2275)
* Improve the UI for the rules documentation & add "feature" badges for each listed rule
- Loading branch information
1 parent
5d21a09
commit ee721bb
Showing
4 changed files
with
136 additions
and
8 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
<ul> | ||
<ul class="rules-list"> | ||
{% assign rules = site.data.rules | where: "type",include.ruleType | sort: "name" %} | ||
{% for rule in rules %} | ||
<li><a href="{{rule.ruleName}}">{{rule.ruleName}}</a> - {{rule.description | markdownify | remove:"<p>" | remove: "</p>"}}</li> | ||
<li> | ||
<a href="{{rule.ruleName}}"> | ||
<div class="rule-features"> | ||
{% if rule.typescriptOnly %} | ||
<span class="feature feature-sm feature-ts-only" title="This rule cannot be run against JavaScript files">TS Only</span> | ||
{% endif %} | ||
{% if rule.hasFix %} | ||
<span class="feature feature-sm feature-fixer" title="This rule has the ability to auto-fix violations">Has Fixer</span> | ||
{% endif %} | ||
{% if rule.requiresTypeInfo %} | ||
<span class="feature feature-sm feature-requires-type-info" title="This rule requires type information to run">Requires Type Info</span> | ||
{% endif %} | ||
</div> | ||
<strong>{{rule.ruleName}}</strong> - {{rule.description | markdownify | remove:"<p>" | remove: "</p>"}} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> |
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