Skip to content
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

refactor(preAlias): improve skip condition #19544

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OnlyWick
Copy link
Contributor

@OnlyWick OnlyWick commented Mar 1, 2025

Description

Returning early can save some unnecessary code execution.

@patak-dev
Copy link
Member

Thanks for the PR! I don't think this will make a real difference. The only interesting bit is avoiding the bareImportRE.test(id) when scan is true. Maybe we could just move options.scan as the first condition, but I still don't think it is worthy. I'll let other comment on this one.

@OnlyWick
Copy link
Contributor Author

OnlyWick commented Mar 3, 2025

Yeah, bareImportRE.test(id) can indeed be moved to the front as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants