eslint-plugin-import
eslint-plugin-import copied to clipboard
Use resolved package name
Should fix https://github.com/benmosher/eslint-plugin-import/issues/496
Coverage increased (+2.8%) to 97.268% when pulling e25180ce3681da00953bdf2dd1ccdb9c888e5e40 on mieszko4:patch-1 into ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57 on benmosher:master.
@ljharb I've added the test that would have failed without fix in no-extraneous-dependencies.js
. Please take a look.
@arcanis i'm intending to merge this soon, does it need any changes to avoid causing berry problems?
From the look of it it should be compatible in most cases, since we store packages inside a standalone node_modules
path (to make vendor detection easier):
/app/.yarn/cache/foo-1.0.0.zip/node_modules/foo/index.js
One caveat however: we cannot do that when people use the workspace:
, link:
, or portal:
protocol, because they are resolved to the final path. So given the package.json
:
{
"dependencies": {
"foo": "link:./foo"
}
}
You'd have /app/foo
, not /app/node_modules/foo
.