Rules Hub
Coding Rules Library
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Remove dependencies made redundant by a framework upgrade
After upgrading a major framework version, review dependencies (plugins, polyfills, helpers) the new version absorbs or replaces and uninstall the ones no longer needed.
Bad example
| 1 | { |
| 2 | "devDependencies": { |
| 3 | "framework": "^4.0.0", |
| 4 | "framework-plugin-feature-x": "^1.2.0", |
| 5 | "some-polyfill": "^3.0.0" |
| 6 | } |
| 7 | } |
| 8 | // feature-x and the polyfill are now built into framework v4 |
Explanation (EN)
The plugin and polyfill were only needed for the old major version; keeping them after upgrading bloats node_modules and misleads readers about the real dependency surface.
Objašnjenje (HR)
Plugin i polyfill bili su potrebni samo za staru glavnu verziju; zadrzavanje nakon nadogradnje napuhuje node_modules i zavarava citatelje o stvarnom skupu ovisnosti.
Good example
| 1 | { |
| 2 | "devDependencies": { |
| 3 | "framework": "^4.0.0" |
| 4 | } |
| 5 | } |
| 6 | // redundant plugin and polyfill uninstalled |
Explanation (EN)
Only the still-needed dependency remains; obsolete packages absorbed by the upgrade are removed, keeping the dependency list honest and lean.
Objašnjenje (HR)
Ostaje samo i dalje potrebna ovisnost; zastarjeli paketi koje je nadogradnja apsorbirala su uklonjeni, cime popis ovisnosti ostaje istinit i vitak.
Notes (EN)
Check the upgrade's migration guide for plugins/features that became built-in, then remove them and re-run the build/tests to confirm nothing relied on them.
Bilješke (HR)
Provjeri vodic za migraciju nadogradnje za pluginove/znacajke koje su postale ugradene, zatim ih ukloni i ponovno pokreni build/testove da potvrdis da nista nije ovisilo o njima.