-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
How to treat imports inside a monorepo as internal #1125
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
Comments
Since technically it’s not internal - that syntax is for npm-installed scoped modules - i don’t believe it’s currently possible. |
Would it be possible to add an option to |
Is it not an option to use a prefix that isn't also a valid npm package name? |
I don't think that is possible in a monorepo. The packages inside a monorepo will always have valid package names since you have to create a package.json for each one of them. Besides that, I need my packages in the monorepo to be scoped. This is also how other projects like babel and jest are doing it. Another option would also be to check via the root package.json if the current project is a monorepo, to determine where the modules are located and consider those internal (I mean by reading the workspaces property). Or is this the wrong way around? |
I think it should simply be possible for us to specify what's treated as "internal". |
I am working on a monorepo where I have some files with a list of imports that looks like this:
In this example, the second import refers to a package inside the monorepo and I would like it to be treated as an internal import by
import/order
. Is this possible to achieve?The text was updated successfully, but these errors were encountered: