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
nodedependenciescleanup
Prefer Node built-in modules over browser polyfill packages in server code
In server-only code, use node: built-ins (e.g. node:assert) instead of installing browser-targeted polyfill packages.
PR: hegnar-forum-web · org-mining-hist-2026-06Created: Jun 20, 2026
Bad example
Old codejavascript
| 1 | const assert = require('assert'); // the browser polyfill package |
Explanation (EN)
Objašnjenje (HR)
Good example
New codejavascript
| 1 | const assert = require('node:assert'); |
Explanation (EN)
Objašnjenje (HR)