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).
frontend ruleP2universalStack: Web assets
assetsfontsbundle-sizeyagni
Don't ship asset variants you don't actually use
Before adding font/image/asset variants (e.g. italic, extra weights), confirm they're actually needed; unused variants bloat the bundle.
PR: vinify-frontend · org-mining-hist-2026-06Created: Jun 19, 2026
Bad example
Old codetypescript
| 1 | fonts: [ |
| 2 | { src: '/fonts/Bell-Regular.ttf' }, |
| 3 | { src: '/fonts/Bell-Bold.ttf', fontWeight: 700 }, |
| 4 | { src: '/fonts/Bell-Italic.ttf', fontStyle: 'italic' }, // is italic ever used? |
| 5 | ] |
Explanation (EN)
Objašnjenje (HR)
Good example
New codetypescript
| 1 | fonts: [ |
| 2 | { src: '/fonts/Bell-Regular.ttf' }, |
| 3 | { src: '/fonts/Bell-Bold.ttf', fontWeight: 700 }, |
| 4 | ] |
Explanation (EN)
Objašnjenje (HR)