Commit 198e6e2
committed
chore(linter): only hyperlink rule names when docs URL exists (#16536)
PR #16496 converted all rule names to hyperlinks, but some rules lack documentation URLs, creating broken markdown links like `[react/static-components]()`.
## Changes
- Modified `tasks/lint_rules/src/markdown-renderer.mjs` to conditionally render hyperlinks only when `docsUrl` is non-empty
- Rules with documentation URLs render as `[name](url)`
- Rules without documentation URLs render as plain text `name`
**Before:**
```markdown
| ✅ | [react/jsx-key](https://github.com/.../jsx-key.md) |
| | [react/static-components]() |
```
**After:**
```markdown
| ✅ | [react/jsx-key](https://github.com/.../jsx-key.md) |
| | react/static-components |
```
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
> Review #16496 and action the most recent comment on it regarding misisng hyperlinks
</details>
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).1 parent 767db50 commit 198e6e2
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
0 commit comments