Skip to content

Commit 1351a9b

Browse files
nzakasbtmills
andauthored
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 <[email protected]> Co-authored-by: Brandon Mills <[email protected]>
1 parent 68cf0fb commit 1351a9b

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/src/_includes/layouts/doc.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ <h2 id="further-reading">Further Reading</h2>
3434

3535
{% set all_content = [all_content, further_reading_content] | join %}
3636
{% endif %}
37+
38+
{% if rule_type %}
39+
{% set resources_content %}
40+
<h2 id="resources">Resources</h2>
41+
<ul>
42+
<li><a href="https://github.com/eslint/eslint/blob/main/lib/rules/{{ title }}.js">Rule source</a></li>
43+
<li><a href="https://github.com/eslint/eslint/blob/main/tests/lib/rules/{{ title }}.js">Tests source</a></li>
44+
</ul>
45+
{% endset %}
46+
{% set all_content = [all_content, resources_content] | join %}
47+
{% endif %}
3748

3849
<div class="docs-content">
3950
<main id="main" tabindex="-1" class="docs-main">

0 commit comments

Comments
 (0)