diff --git a/package.json b/package.json
index e82f9d5b5f..64697a604a 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,7 @@
"lint:yml": "eslint \"**/*.{yml,yaml}\"",
"lint:styles": "stylelint \"**/*.scss\"",
"lint:lit": "yarn lit-analyzer \"src/**/*.ts\"",
- "lint:circular-imports": "madge --circular --extensions ts ./src",
+ "lint:circular-imports": "madge --circular --ts-config ./tsconfig.json --extensions ts ./src",
"lint:tsc": "npm-run-all --sequential lint:tsc:*",
"lint:tsc:components": "tsc --noEmit --project src/components/tsconfig.json",
"lint:tsc:components-spec": "tsc --noEmit --project src/components/tsconfig.spec.json",
diff --git a/src/visual-regression-app/src/components/test-case/image-diff/fullscreen-diff/fullscreen-diff.ts b/src/visual-regression-app/src/components/test-case/image-diff/fullscreen-diff/fullscreen-diff.ts
index 7be6a61fc5..701e033a80 100644
--- a/src/visual-regression-app/src/components/test-case/image-diff/fullscreen-diff/fullscreen-diff.ts
+++ b/src/visual-regression-app/src/components/test-case/image-diff/fullscreen-diff/fullscreen-diff.ts
@@ -2,7 +2,7 @@ import { LitElement, html, type TemplateResult, type CSSResultGroup, nothing } f
import { customElement, property } from 'lit/decorators.js';
import type { SbbRadioButtonGroupElement } from '../../../../../../components/radio-button/radio-button-group/radio-button-group.js';
-import type { FailedFiles } from '../../../../../interfaces.js';
+import type { FailedFiles } from '../../../../interfaces.js';
import style from './fullscreen-diff.scss?lit&inline';
diff --git a/src/visual-regression-app/src/components/test-case/image-diff/image-diff.ts b/src/visual-regression-app/src/components/test-case/image-diff/image-diff.ts
index 02c81215a1..b126bae8e3 100644
--- a/src/visual-regression-app/src/components/test-case/image-diff/image-diff.ts
+++ b/src/visual-regression-app/src/components/test-case/image-diff/image-diff.ts
@@ -3,7 +3,7 @@ import { customElement, property, state } from 'lit/decorators.js';
import { SbbOverlayElement } from '../../../../../components/overlay/overlay.js';
import type { SbbToggleCheckElement } from '../../../../../components/toggle-check/toggle-check.js';
-import type { FailedFiles } from '../../../../interfaces.js';
+import type { FailedFiles } from '../../../interfaces.js';
import style from './image-diff.scss?lit&inline';
diff --git a/src/visual-regression-app/interfaces.ts b/src/visual-regression-app/src/interfaces.ts
similarity index 100%
rename from src/visual-regression-app/interfaces.ts
rename to src/visual-regression-app/src/interfaces.ts
diff --git a/src/visual-regression-app/src/screenshots.ts b/src/visual-regression-app/src/screenshots.ts
index a431a6e47b..c7ee30515a 100644
--- a/src/visual-regression-app/src/screenshots.ts
+++ b/src/visual-regression-app/src/screenshots.ts
@@ -1,7 +1,7 @@
// eslint-disable-next-line import-x/no-unresolved
import { screenshotsRaw } from 'virtual:screenshots';
-import type { FailedFiles, ScreenshotMap } from '../interfaces.js';
+import type { FailedFiles, ScreenshotMap } from './interfaces.js';
const viewportOrder = ['zero', 'micro', 'small', 'medium', 'large', 'wide', 'ultra'];
diff --git a/src/visual-regression-app/src/vite-env.d.ts b/src/visual-regression-app/src/vite-env.d.ts
deleted file mode 100644
index acd9038143..0000000000
--- a/src/visual-regression-app/src/vite-env.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-///
-
-declare module 'virtual:screenshots' {
- // eslint-disable-next-line @typescript-eslint/consistent-type-imports
- export const screenshotsRaw: import('../interfaces.js').ScreenshotMap;
-}
-
-declare module '*?lit&inline' {
- // eslint-disable-next-line @typescript-eslint/consistent-type-imports
- const src: import('lit').CSSResultGroup;
- export default src;
-}
diff --git a/src/visual-regression-app/tsconfig.json b/src/visual-regression-app/tsconfig.json
index 1c0aa3c731..d5efd68ad7 100644
--- a/src/visual-regression-app/tsconfig.json
+++ b/src/visual-regression-app/tsconfig.json
@@ -2,8 +2,12 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "../..",
- "baseUrl": "."
+ "baseUrl": ".",
+ "paths": {
+ "@sbb-esta/lyne-components": ["../components"],
+ "@sbb-esta/lyne-components/*": ["../components/*"]
+ }
},
- "include": ["./**/*.ts", "./src/vite-env.d.ts"],
+ "include": ["./**/*.ts", "../vite-env.d.ts"],
"exclude": ["vite.config.ts"]
}
diff --git a/src/visual-regression-app/vite.config.ts b/src/visual-regression-app/vite.config.ts
index e210611a16..f7c234d151 100644
--- a/src/visual-regression-app/vite.config.ts
+++ b/src/visual-regression-app/vite.config.ts
@@ -13,7 +13,7 @@ import {
import { distDir } from '../../tools/vite/index.js';
import rootConfig from '../../vite.config.js';
-import type { FailedFiles } from './interfaces.js';
+import type { FailedFiles } from './src/interfaces.js';
const packageRoot = new URL('.', import.meta.url);
const screenshotsDir = new URL(`./screenshots/`, distDir);
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts
index 9848f7e607..e19dfee5fc 100644
--- a/src/vite-env.d.ts
+++ b/src/vite-env.d.ts
@@ -9,3 +9,8 @@ declare module '*?lit&inline' {
declare module '@custom-elements-manifest/analyzer/cli' {
export const cli: (...args) => Promise;
}
+
+declare module 'virtual:screenshots' {
+
+ export const screenshotsRaw: import('./visual-regression-app/src/interfaces').ScreenshotMap;
+}