Turn the comments that describe functions into JSDoc so the editor shows them on hover
The 669 // comments sitting right above a function, method or hook become /** */ blocks, unchanged in wording; eslint directives stay right above the line they target. website/AGENTS.md now asks for JSDoc on function comments and // inside function bodies. ExpeditionPlanner.jsx grew past 300 lines and gets its full header, as the header test requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
88c7bf8317
commit
166790245f
152 changed files with 1389 additions and 967 deletions
|
|
@ -30,12 +30,12 @@ export function httpError(status, code, message, extra = {}) {
|
|||
return Object.assign(new Error(message), { status, code, ...extra });
|
||||
}
|
||||
|
||||
// Caddy remplace X-Forwarded-For par l'adresse réelle du client (voir docs/SERVER.md).
|
||||
/** Caddy remplace X-Forwarded-For par l'adresse réelle du client (voir docs/SERVER.md). */
|
||||
export function clientAddress(req) {
|
||||
return String(req.headers["x-forwarded-for"] || req.socket?.remoteAddress || "unknown").split(",")[0].trim();
|
||||
}
|
||||
|
||||
// Les compteurs ne valent que pour la minute en cours : ils sont tous oubliés à la suivante pour que la mémoire reste bornée.
|
||||
/** Les compteurs ne valent que pour la minute en cours : ils sont tous oubliés à la suivante pour que la mémoire reste bornée. */
|
||||
export function createRateLimiter(now) {
|
||||
const buckets = new Map();
|
||||
let currentMinute = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue