Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs: Add Resources section to rule pages (#15901)
* docs: Add Resources section to rule pages

* Update docs/src/_includes/layouts/doc.html

Co-authored-by: Brandon Mills <btmills@users.noreply.github.com>

Co-authored-by: Brandon Mills <btmills@users.noreply.github.com>
  • Loading branch information
nzakas and btmills committed May 30, 2022
1 parent 68cf0fb commit 1351a9b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/src/_includes/layouts/doc.html
Expand Up @@ -34,6 +34,17 @@ <h2 id="further-reading">Further Reading</h2>

{% set all_content = [all_content, further_reading_content] | join %}
{% endif %}

{% if rule_type %}
{% set resources_content %}
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://github.com/eslint/eslint/blob/main/lib/rules/{{ title }}.js">Rule source</a></li>
<li><a href="https://github.com/eslint/eslint/blob/main/tests/lib/rules/{{ title }}.js">Tests source</a></li>
</ul>
{% endset %}
{% set all_content = [all_content, resources_content] | join %}
{% endif %}

<div class="docs-content">
<main id="main" tabindex="-1" class="docs-main">
Expand Down

0 comments on commit 1351a9b

Please sign in to comment.