diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index c4c826183..89928251b 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -27,6 +27,15 @@ export default defineConfig( tseslint.configs.recommended, { rules: { + 'no-restricted-imports': [ + 'error', + { + patterns: [ + ".*", // Disallow any relative imports (they should be '@app/x/y/z' or similar) + "src/*", // Disallow any absolute imports (they should be '@app/x/y/z' or similar) + ], + }, + ], '@typescript-eslint/no-empty-object-type': [ 'error', { diff --git a/frontend/src/core/components/shared/LocalIcon.tsx b/frontend/src/core/components/shared/LocalIcon.tsx index 9701f6ace..a9b7198fc 100644 --- a/frontend/src/core/components/shared/LocalIcon.tsx +++ b/frontend/src/core/components/shared/LocalIcon.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { addCollection, Icon } from '@iconify/react'; -import iconSet from '../../../assets/material-symbols-icons.json'; +import iconSet from '../../../assets/material-symbols-icons.json'; // eslint-disable-line no-restricted-imports -- Outside app paths // Load icons synchronously at import time - guaranteed to be ready on first render let iconsLoaded = false; diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index c8e9081c1..c52fb3753 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -1,6 +1,6 @@ import '@mantine/core/styles.css'; import '@mantine/dates/styles.css'; -import '../vite-env.d.ts'; +import '../vite-env.d.ts'; // eslint-disable-line no-restricted-imports -- Outside app paths import '@app/styles/index.css'; // Import global styles import React from 'react'; import ReactDOM from 'react-dom/client';