-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use module aliases vs relative paths #3683
base: master
Are you sure you want to change the base?
Conversation
Search tests will fail while I'm updating ES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement
"paths": { | ||
"@components/*": ["components/*"], | ||
"@hooks/*": ["hooks/*"], | ||
"@styles/*": ["styles/*"], | ||
"@theme": ["theme/index"], | ||
"@translations/*": ["translations/*"], | ||
"@config": ["config"], | ||
"@interfaces": ["interfaces/index"] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit): I personally prefer using like @/components/*
instead of @components/*
. So it doesn't get confused if we have a external package like @components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @Kevan-Y here. I also use the @/components/*
for module aliases
We'd need to fix #3690 first to pass eslint. |
@DukeManh do you want this in before tonight (end of Hacktoberfest)? If so, what does it need? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good!
The only nit-picky thing that might be considered, that some projects prefer the scoped package inports to be between the "traditional" library imports and the relative imports for readability reasons.
a51adae
to
94eec21
Compare
When the project grows deeper, more
../
are required in the relative import paths to import modules so this configs TS path aliases, that map to certain absolute paths.Type of Change
Description
Steps to test the PR
Checklist