Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Import library SCSS via module resolution, not raw node_modules paths
Use the configured Sass package resolution and public entry points instead of hardcoded node_modules paths.
Bad example
| 1 | @import './node_modules/preact-range-slider/assets/_mixin.scss'; |
Explanation (EN)
A hardcoded node_modules path can break under workspace or package-manager layout changes.
Objašnjenje (HR)
Good example
| 1 | @use "design-library/mixins" as mixins; |
Explanation (EN)
This schematic package entry relies on a configured importer; use the real package's supported path and syntax.
Objašnjenje (HR)
Notes (EN)
Resolve third-party Sass through the configured package importer and documented package entry point, avoiding assumptions about physical node_modules layout.
Exceptions / Tradeoffs (EN)
Tilde resolution is a bundler-specific legacy convention and is not universal Sass syntax. Prefer @use/package exports where supported by the actual toolchain and package.