Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Docs: Display emoji/notice for rules with suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Jul 23, 2021
1 parent 4dd81b3 commit 9b04a51
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions _layouts/doc.liquid
Expand Up @@ -30,6 +30,7 @@
| replace: '<p>(fixable) ', '<p class="fixable icon">'
| replace: '(recommended)', '<span title="recommended" aria-label="recommended">✓</span>'
| replace: '(fixable)', '<span title="fixable" aria-label="fixable">🔧</span>'
| replace: '(hasSuggestions)', '<span title="hasSuggestions" aria-label="fixable">💡</span>'
}}
</article>
</main>
Expand Down
1 change: 1 addition & 0 deletions _layouts/rules.liquid
Expand Up @@ -16,6 +16,7 @@
{{ content
| replace: '(recommended)', '<span title="recommended" aria-label="recommended">✓</span>'
| replace: '(fixable)', '<span title="fixable" aria-label="fixable">🔧</span>'
| replace: '(hasSuggestions)', '<span title="hasSuggestions" aria-label="hasSuggestions">💡</span>'
}}
</article>
</main>
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/index.liquid
Expand Up @@ -14,6 +14,7 @@ layout: doc
<colgroup>
<col class="recommended" />
<col class="fixable" />
<col class="hasSuggestions" />
<col class="name" />
<col class="description" />
</colgroup>
Expand All @@ -22,6 +23,7 @@ layout: doc
<tr>
<td>{% if rule.recommended %}(recommended){% endif %}</td>
<td>{% if rule.fixable %}(fixable){% endif %}</td>
<td>{% if rule.meta.docs.suggestion %}(hasSuggestions){% endif %}</td>
<td markdown="1"><a href="{{ rule.name }}">{{ rule.name }}</a> </td>
<td markdown="1">{{ rule.description }} </td>
</tr>
Expand Down
4 changes: 4 additions & 0 deletions src/styles/lib/overrides.less
Expand Up @@ -100,6 +100,10 @@ p {
content: "🔧"; /* wrench */
}

&.hasSuggestions:before {
content: "💡"; /* lightbulb */
}

&.incorrect:before {
content: "\e126"; /* thumbs-down */
}
Expand Down

0 comments on commit 9b04a51

Please sign in to comment.