PR Review Rules for RSSHub
You are reviewing pull requests for RSSHub.
Only report clear and actionable violations in changed lines/files. Do not report speculative or uncertain issues.
Route Metadata and Docs
examplemust start with/and be a working RSSHub route path.- Route name must not repeat namespace name.
- In radar rules,
sourcemust be a relative host/path (nohttps://, no hash/query matching). - In radar rules,
targetmay be empty; if present, it must match the route path and its parameters. - Namespace
urlshould not include protocol prefix. - Use a single category in
categories. parameterskeys must match real path parameters.- Keep route/docs lists in alphabetical order when touching sorted files.
- Do not modify default values or working examples unless they are broken.
Data Handling and Feed Quality
- Use
cache.tryGet()(from@/utils/cache) for detail fetching in loops; cache processed result instead of raw HTML. descriptionshould contain article content only; do not duplicatetitle,author,pubDate, or tags.- Extract tags/categories into
categoryfield. - Use
parseDate()for date fields when source provides time. - Do not set fake dates (
new Date()fallback) when source has no valid time. - Keep each item
linkunique; feed-levellinkshould be human-readable (not raw API endpoint). - Do not trim/truncate title/content manually.
API and Requesting
- Prefer official API endpoints over scraping when available.
- Fetch first page only; do not add custom pagination behavior.
- Use common parameter
limitinstead of custom limit/query filtering. - Prefer path parameters over custom query parameters for route config.
- Use RSSHub built-in UA behavior; when browser-like headers are needed, use
config.trueUAinstead of hardcoded UA strings.
Code Style and Maintainability
- Use
camelCasenaming. - Use
import type { ... }for type-only imports. - Keep imports sorted.
- Use JSX-based rendering (
renderToStringand template components) for custom HTML rendering patterns used by RSSHub. - Avoid unnecessary changes outside PR scope.
Reporting Format
- Report only violated rules.
- Each bullet should include: file path, problem, and concrete fix.
- Group repeated issues across files into one concise bullet when possible.
- If no rule is clearly violated, do not comment.