diff --git a/docs/src/_includes/components/rule-categories.macro.html b/docs/src/_includes/components/rule-categories.macro.html index 3797f8d0a30..dccadbed077 100644 --- a/docs/src/_includes/components/rule-categories.macro.html +++ b/docs/src/_includes/components/rule-categories.macro.html @@ -1,6 +1,6 @@ {%- macro ruleCategories(params) -%} -
+
{%- if params.recommended == true -%}
Recommended diff --git a/docs/src/_includes/layouts/doc.html b/docs/src/_includes/layouts/doc.html index 0383fdca846..ce012a8a38d 100644 --- a/docs/src/_includes/layouts/doc.html +++ b/docs/src/_includes/layouts/doc.html @@ -15,6 +15,7 @@ {# Add in various sections to content so TOC is accurate #} {% set all_content = content %} + {% set rule_meta = rules_meta[title] %} {% if related_rules %} {% set related_rules_content %} @@ -36,7 +37,7 @@

Further Reading

{% set all_content = [all_content, further_reading_content] | join %} {% endif %} - {% if rule_type %} + {% if rule_meta %} {% set resources_content %}

Resources

    @@ -47,8 +48,6 @@

    Resources

    {% set all_content = [all_content, resources_content] | join %} {% endif %} - {% set rule_meta = rules_meta[title] %} -
    diff --git a/docs/src/pages/rules.md b/docs/src/pages/rules.md index 22ce383f2eb..2edf31a446b 100644 --- a/docs/src/pages/rules.md +++ b/docs/src/pages/rules.md @@ -15,6 +15,7 @@ eleventyNavigation: Rules in ESLint are grouped by type to help you understand their purpose. Each rule has emojis denoting: {{ ruleCategories({ + index: true, recommended: true, fixable: true, hasSuggestions: true