Skip to content

Commit

Permalink
added aliases for fsd folders
Browse files Browse the repository at this point in the history
  • Loading branch information
azakharo committed Jan 2, 2025
1 parent 37d454b commit 8a03520
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ module.exports = {
// Internal packages.
[
'^src(/.*|$)',
'^@(shared|entities|widgets|images)(/.*|$)',
// Parent imports. Put `..` last.
'^\\.\\.(?!/?$)',
'^\\.\\./?$',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Box, Button} from '@mui/material';
import {getUsers} from '@/api/users';
import {useAuth} from '@/features/auth';
import User from '@/types/users/User';
import errorImg from 'IMAGES/sad-cloud.png';
import errorImg from '@images/sad-cloud.png';

const areaColor = '#e2deed';

Expand Down
4 changes: 4 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@shared/*": ["src/shared/*"],
"@entities/*": ["src/entities/*"],
"@widgets/*": ["src/widgets/*"],
"@images/*": ["src/assets/images/*"]
},

/* Additional Checks */
Expand Down
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export default () => {
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
IMAGES: path.resolve(__dirname, './src/assets/images'),
'@shared': path.resolve(__dirname, './src/shared'),
'@entities': path.resolve(__dirname, './src/entities'),
'@widgets': path.resolve(__dirname, './src/widgets'),
'@images': path.resolve(__dirname, './src/assets/images'),
},
},
server: {
Expand Down

0 comments on commit 8a03520

Please sign in to comment.