-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Invalid eslint error for "import/no-extraneous-dependencies" when it's reference self #2430
Comments
Self-reference only works with the "exports" or "imports" field, which this plugin doesn't yet support. You shouldn't be able to self-require the package otherwise. |
Yarn workspaces, and I assume npm and pnpm workspaces too, installs all local packages to In the tests of a package I want to reference the built package. The file
imports |
@jacobrask yes, in that case it should Just Work. If it doesn't, and you can run the |
This comment was marked as resolved.
This comment was marked as resolved.
Self-referencing only works in node via the "exports" or "imports" fields, which this package (via It should not be expected to work otherwise. |
In my case, since it is a custom rollup project, it works as expected, but I get your point, deleting my comments to prevent bad practices/habits. 👍 |
@ljharb Do we have an idea on when this will be added to this plugin? or waiting on someone to contribute this? |
@rmarkins-godaddy it needs to be added to Since it's a best practice to make packages backwards-compatible to pre-exports node, i'd hope this feature gap is minimally impactful in the meantime. |
What's the status on this? It's already been a year and it seems to be still unsolved. I would have to guess that |
@lxsmnsyc it's been 4 years since node shipped "exports", and yes, |
@ljharb how is |
There's a lot of functionality we'd need - in particular, we'd need the ability to lint against a particular version of node's support, and nothing in the ecosystem provides that ( No matter how much longer it takes, I'm unlikely to switch from |
Error:
The text was updated successfully, but these errors were encountered: