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

Wildcards in tsconfig path mapping #17

Open
raphaelmeyer opened this issue Jul 25, 2023 · 1 comment
Open

Wildcards in tsconfig path mapping #17

raphaelmeyer opened this issue Jul 25, 2023 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@raphaelmeyer
Copy link

raphaelmeyer commented Jul 25, 2023

We have a setup where we make heavy use of secondary entry points with ng-packagr. In tsconfig.json we make use of the following:

{
  "compilerOptions": {
    "paths": {
      "@some/name/*": ["some/path/*/src"]
    }
  }
}

With this setup, e.g. @some/name/foo maps to some/path/foo/src.

I've seen that sheriff already has support, when the wildcard is at the end. But I could not get it working with the wildcard in the middle of the path.

Otherwise the plugin looks very promising, because we are looking for some linter rule to prevent to import from another entry point with a relative path instead of using the name.

@rainerhahnekamp
Copy link
Collaborator

Hey Raphael, wow! I was not aware that one can have these kinds of paths. I guess, there could also be the possibility for something like some/path/**/src or even some/path/*/src/*lib.

I will take a look into it. There are special unit tests for the matching algorithm. So it should hopefully not take too much time.

@rainerhahnekamp rainerhahnekamp added the bug Something isn't working label Aug 21, 2023
@rainerhahnekamp rainerhahnekamp added this to the Cache milestone Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants