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 ruleP1universalStack: javascript
paginationdefaultscorrectness
Default pagination to page 1, not page 0
When defaulting a page number, use 1 — page 0 typically renders nothing.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codejavascript
| 1 | const page = currentPage ?? 0; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejavascript
| 1 | const page = currentPage ?? 1; |
Explanation (EN)
Objašnjenje (HR)