Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
fullstack ruleP2universalStack: typescript
jsdocdocumentationtypes
Document type and interface members with JSDoc, not line comments
Use `/** */` on declared members (e.g. `res.locals.adFree`) so the documentation shows on hover wherever the member is used; a `//` comment only lives in the declaration file.
PR: hegnar-web#4698 FCK-3550 Drive ad suppression from the article flagCreated: Sep 7, 2026
Bad example
Old codets
| 1 | // Suppresses every ad surface on this request. |
| 2 | adFree?: boolean; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | /** Suppresses every ad surface on this request. */ |
| 2 | adFree?: boolean; |
Explanation (EN)
Objašnjenje (HR)