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: general
documentationvendoringmaintainability
Document vendored/copied code with a comment and its source
If you must inline third-party or generated code (like a polyfill), add a header comment explaining what it is and where it came from.
PR: hegnar-bellsheep-web · org-mining-hist-2026-06Created: Jun 18, 2026
Bad example
Old codets
| 1 | // is-well-formed.ts |
| 2 | String.prototype.isWellFormed = function () { /* ... */ }; |
Explanation (EN)
Objašnjenje (HR)
Good example
New codets
| 1 | // Polyfill for String.prototype.isWellFormed (ES2024) |
| 2 | // Source: https://github.com/zloirock/core-js |
| 3 | String.prototype.isWellFormed = function () { /* ... */ }; |
Explanation (EN)
Objašnjenje (HR)