title |
---|
Rule categories |
The rule categories—namely “recommended”, “fixable”, and “hasSuggestions”—are shown in the rules page. They are rendered using the ruleCategories
macro (imported from /components/rule-categories.macro.html
). There is also an individual macro for each category type.
{ % from 'components/rule-categories.macro.html' import ruleCategories % }
{ { ruleCategories({
recommended: true,
fixable: true,
hasSuggestions: true
}) } }
{% from 'components/rule-categories.macro.html' import ruleCategories, recommended, fixable, hasSuggestions %}
{{ ruleCategories({ recommended: true, fixable: true, hasSuggestions: true }) }}
For every rule, you can render the category it belongs to using the corresponding category shortcode:
{ % recommended % }
{ % fixable % }
{ % hasSuggestions % }
{% recommended %} {% fixable %} {% hasSuggestions %}