eslint-plugin-import icon indicating copy to clipboard operation
eslint-plugin-import copied to clipboard

Use resolved package name

Open mieszko4 opened this issue 6 years ago • 4 comments

Should fix https://github.com/benmosher/eslint-plugin-import/issues/496

mieszko4 avatar Jun 08 '18 10:06 mieszko4

Coverage Status

Coverage increased (+2.8%) to 97.268% when pulling e25180ce3681da00953bdf2dd1ccdb9c888e5e40 on mieszko4:patch-1 into ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57 on benmosher:master.

coveralls avatar Jun 12 '18 13:06 coveralls

@ljharb I've added the test that would have failed without fix in no-extraneous-dependencies.js. Please take a look.

mieszko4 avatar Jun 12 '18 14:06 mieszko4

@arcanis i'm intending to merge this soon, does it need any changes to avoid causing berry problems?

ljharb avatar Mar 04 '20 21:03 ljharb

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.

arcanis avatar Mar 04 '20 21:03 arcanis