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

"peerDependencies" option has no effect in "import/no-extraneous-dependencies" rule since 2.23.0 #2058

Closed
emilisb opened this issue May 14, 2021 · 2 comments · Fixed by #2097

Comments

@emilisb
Copy link

emilisb commented May 14, 2021

With version 2.23.0 eslint fails due to peerDependency imports in our code:

1:1 error '{PACKAGE_NAME}' should be listed in the project's dependencies. Run 'npm i -S {PACKAGE_NAME}' to add it import/no-extraneous-dependencies

Our package is scoped (@org-name/package-name), not sure if it makes any difference.

Version 2.22.1 works fine.

Our config looks like this:

'import/no-extraneous-dependencies': [
      'error',
      {
        devDependencies: [
          //
        ],
        peerDependencies: true,
        packageDir: './',
      },
    ],
@ljharb
Copy link
Member

ljharb commented May 14, 2021

cc @paztis / #1696, can you take a look at this?

@paztis
Copy link

paztis commented May 25, 2021

I think #2097 will resolve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants