-
Notifications
You must be signed in to change notification settings - Fork 28
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
Relative paths in tsconfig extends
not supported
#177
Comments
Hello @rmunch, Thanks for reporting the issue! Could you please provide me a concrete example of a not working config (the one you opened the issue for) vs the working config? Just to make sure that there is no quiproquo regarding the issue to fix (most of the time relative paths are misleading). Thanks |
Hi @antoine-coulon - with your screenshot above, if you move the tsconfig.json into a subdirectory and adjust the |
I see, in that case the outcome will probably depend on the directory where skott is run. It should probably be documented somewhere, but currently skott is not really supporting the run from a directory where files are relying on path aliases references or definitions located in parent directories. What you describe to me seems like you're running skott from a sub-package and this sub-package references a tsconfig in a parent directory (which seems to be the root of the repository, usually where a In the case you're describing, running skott from the root directory where path alias references live and then target the sub directory using While as I user I would expect both ways to work out of the box, having all resolution cases working with path aliases support indeed comes with a lot of edge cases and challenges. Also, some design decisions don't allow me an easy fix, but rather needing more or less a wide re-design, you can read a bit more there if you're interested. |
Summary
Relative paths in the tsconfig
extends
field don't appear to work. If I adjust the path to be relative to the cwd, things work as expected.Happy to open a PR if that'd be helpful. Thanks!
Reproduction steps
Adjust the
extends
field in a tsconfig file to use a relative path. Run Skott, and observe exceptions when reading tsconfig.Expected result:
Actual result:
Standard questions
Please answer these questions to help us investigate your issue more quickly:
skott
installed version?node -v
)?The text was updated successfully, but these errors were encountered: