Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add Resources section to rule pages #15901

Merged
merged 2 commits into from May 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the current website, we're using HEAD instead of main. Just to check - did you intentionally switch to main?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We used HEAD to aid with the transition from master to main. I don’t think it’s necessary anymore.

<li><a href="https://github.com/eslint/eslint/blob/main/tests/rules/{{ title }}.js">Tests source</a></li>
nzakas marked this conversation as resolved.
Show resolved Hide resolved
</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