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).
backend ruleP2universalStack: node
expressconventionsclean-codenode
Attach custom request data to a custom field, not framework slots
Put your own derived values on a dedicated property (req.appContext) rather than req.params/req.query, which are reserved for external request input.
PR: frontpage-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codetypescript
| 1 | req.query.appType = detect(req); // query should hold external params only |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | req.appContext = { appType: detect(req) }; |
Explanation (EN)
Objašnjenje (HR)