fix: break import cycles

import/no-cycle (now active) flagged 17 cycles across 12 files:

- shared/ui self-barrel cycles (Logo/Stat/StatGroup/ComboControl/
  FilterGroup/SectionHeader): import siblings relatively instead of
  through the $shared/ui barrel that re-exports them
- shared/lib/utils: roundToStepPrecision imports getDecimalPlaces
  relatively instead of via the utils barrel
- routes: lazy-load Redirect in the router so it no longer statically
  imports a component that imports navigate back from it
This commit is contained in:
Ilia Mashkov
2026-06-02 23:02:07 +03:00
parent f3a10e38df
commit c6c8497906
8 changed files with 13 additions and 14 deletions
+3 -2
View File
@@ -1,6 +1,5 @@
import { createRouter } from 'sv-router';
import Home from './Home.svelte';
import Redirect from './Redirect.svelte';
/**
* Single-page router for glyphdiff.
@@ -18,6 +17,8 @@ export const {
'/': Home,
/**
* Any unmatched path redirects to home until additional routes exist.
* Lazy-loaded so `router` doesn't statically import `Redirect`, which
* imports `navigate` from here — breaks the import cycle.
*/
'*notfound': Redirect,
'*notfound': () => import('./Redirect.svelte'),
});