-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: Improve module resolution #440
Conversation
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.
LGTM, but it seems coverage needs to be either improved or decreased a bit
I checked the difference and in @d3xter666 do you know whether there is still a case that needs the handling in here? ui5-linter/src/linter/ui5Types/SourceFileLinter.ts Lines 315 to 331 in e9a5812
|
It seems that this test/file I believe this is caused by the new namespace resolve logic in here and also the conditional inclusion of the Edit: Just checked it. Removed this section https://github.com/SAP/ui5-linter/blob/main/src/linter/ui5Types/SourceFileLinter.ts#L288-L332 and the tests are green. Also checked the |
@d3xter666 thanks a lot 👍🏻 Then I'll go ahead with that. We can still revert it in case we encounter some relevant cases again. |
7466d37
to
f9c805b
Compare
This solves issues where some detections did not work properly due to the way dependencies were resolved. When using relative imports, the module resolution was working, but when for example importing a control from a test, the complete namespace is used, but the corresponding JS file was not found. This change ensures that JS files are resolved and also that the types for a framework library are loaded when it is linted.
f9c805b
to
3438e2b
Compare
This solves issues where some detections did not work properly due to
the way dependencies were resolved.
When using relative imports, the module resolution was working, but when
for example importing a control from a test, the complete namespace is
used, but the corresponding JS file was not found.
This change ensures that JS files are resolved and also that the types
for a framework library are loaded when it is linted.