Skip to content

Vue-cli-plugin-eslint peer dependency problem #6374

@throrin19

Description

@throrin19

Version

@vue/vue-cli-plugin-eslint@4.5.12

Environment info

System:
    OS: macOS 11.2.3
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  Binaries:
    Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node
    Yarn: Not Found
    npm: 7.6.3 - ~/.nvm/versions/node/v12.13.1/bin/npm
  Browsers:
    Chrome: 89.0.4389.90
    Firefox: 85.0.2
    Safari: 14.0.3
  npmGlobalPackages:
    @vue/cli: 4.2.3

Steps to reproduce

install latest version of eslint in devDependencies (for me it's eslint@7.20.0) and install @vue/vue-cli-plugin-eslint

What is expected?

All packages install correctly

What is actually happening?

NPM error with eslint peer dependency :

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: my-project@1.22.1
npm ERR! Found: eslint@7.20.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"7.20.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@">= 1.6.0 < 7.0.0" from @vue/cli-plugin-eslint@4.5.12
npm ERR! node_modules/@vue/cli-plugin-eslint
npm ERR!   dev @vue/cli-plugin-eslint@"4.5.12" from the root project

After research, I see the peer dependencies in @vue/vue-cli-plugin-eslint ignore latest eslint versions :

"eslint": ">= 1.6.0 < 7.0.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions