fix: resolve Vite MUI deep import by moving to barrel import + updated ESLint allowlist

- Changed @mui/material/Box deep imports to { Box } from '@mui/material'
- Updated no-restricted-imports to only restrict DS-covered components,
  allowing Box/Stack/Grid for layout
This commit is contained in:
Sergey Krylov 2026-06-21 17:15:45 +03:00
parent bd33412691
commit a8741cfeab
3 changed files with 12 additions and 3 deletions

View File

@ -32,7 +32,16 @@ module.exports = {
'no-restricted-imports': ['warn', {
paths: [{
name: '@mui/material',
message: 'Import from @moex-vibe/design-system instead.',
importNames: [
// DS-covered: import from @moex-vibe/design-system
'Typography', 'Button', 'TextField', 'Select', 'Checkbox',
'Paper', 'Chip', 'Badge', 'Alert', 'Dialog', 'Skeleton',
'CircularProgress', 'Link', 'IconButton',
'Table', 'TableBody', 'TableCell', 'TableContainer',
'TableHead', 'TableRow', 'TableSortLabel',
'TablePagination', 'Pagination',
],
message: 'Import from @moex-vibe/design-system instead, or use Box/Stack/Grid for layout.',
}],
}],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],

View File

@ -1,4 +1,4 @@
import Box from '@mui/material/Box';
import { Box } from '@mui/material';
import { Heading, Text } from '@moex-vibe/design-system';
export function HomePage() {

View File

@ -1,6 +1,6 @@
import { useState, useRef, useEffect } from 'react';
import { useNavigate } from 'react-router-dom';
import Box from '@mui/material/Box';
import { Box } from '@mui/material';
import { Chip, Surface, Text, TextField } from '@moex-vibe/design-system';
import { useSearch } from '@/entities/search';