Skip to content

Commit

Permalink
return a list
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Dec 11, 2024
1 parent b3a3c2c commit 1b1cc38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 2 additions & 6 deletions runtime/_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,6 @@ export async function generateLintRuleList() {
}

lintRules.sort((a, b) => a.name.localeCompare(b.name));
let content = `<ul>`;
lintRules.forEach((rule) => {
content += `<li><b>${rule.name}</b></li>`;
});
content += `</ul>`;
return content;

return lintRules;
}
11 changes: 10 additions & 1 deletion runtime/reference/cli/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ templateEngine: [vto, md]
For a complete list of supported rules, visit
[the deno_lint rule documentation](https://lint.deno.land).

{{ await generateLintRuleList() }}
<ul>
{{ for lintRule of await generateLintRuleList() }}
<li>
<b>{{ lintRule.name }}</b>
<pre>
{{ lintRule.mdContent.slice(0, 100) }}
</pre>
</li>
{{ /for }}
</ul>

## Ignore directives

Expand Down

0 comments on commit 1b1cc38

Please sign in to comment.