standard / eslint-config-standard

ESLint Config for JavaScript Standard Style

Home Page:https://standardjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependency conflicts.

dannysmc95 opened this issue · comments

What version of this package are you using?
Was trying to install the latest 6.1.0 version.

What operating system, Node.js, and npm version?
OS: Ubuntu Linux Docker Container
Node: v16.14.2
NPM: 8.6.0

What happened?
Installed the following packages:

@vitejs/plugin-vue
@typescript-eslint/parser
@typescript-eslint/eslint-plugin
@vue/eslint-config-typescript
eslint
eslint-plugin-import
eslint-plugin-node
eslint-plugin-promise
eslint-plugin-standard
eslint-plugin-vue
vite-plugin-eslint
@vue/eslint-config-standard

Instead got the following error:

# npm resolution error report

2022-04-12T09:30:11.559Z

While resolving: controller@2022.1.0-520
Found: eslint-plugin-promise@6.0.0
node_modules/eslint-plugin-promise
  dev eslint-plugin-promise@"^6.0.0" from the root project

Could not resolve dependency:
peer eslint-plugin-promise@"^4.2.1 || ^5.0.0" from @vue/eslint-config-standard@6.1.0
node_modules/@vue/eslint-config-standard
  dev @vue/eslint-config-standard@"*" from the root project

Fix the upstream dependency conflict, or retry
this command with --force, or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

Every time I try and change or amend the package, something is broken, so I think there are some dependency issues, as of course, I would assume I should simply be able to install everything fine, feel free to let me know different options, I can see if they will work.

What did you expect to happen?
It would install correctly.

Are you willing to submit a pull request to fix this bug?
Unfortunately, I do not know how to fix it, nor what is wrong, for now I am just using the @vue/eslint-config-typescript which is doing the job, not actually sure I even need this package, but again not entirely sure why it's happening.

FWIW, with yarn I'm seeing the same thing manifest as a warning, which doesn't seem to be fatal:

warning " > eslint-config-standard@16.0.3" has incorrect peer dependency "eslint@^7.12.1".
warning " > eslint-config-standard@16.0.3" has incorrect peer dependency "eslint-plugin-promise@^4.2.1 || ^5.0.0".

The relevant part of my package.json:

"eslint": "^8.13.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^8.6.0",

I assume this is a warning rather than an error because yarn doesn't install or otherwise enforce peer dependencies (somewhat like npm with --legacy-peer-deps). In any case ESLint still works:

$ yarn eslint --ext .js,.vue src           1 ↵  ✖ ✹ ✭main ‹ruby-3.0.3›
yarn run v1.22.18
$ /Users/david/Work/BerkeleyLibrary/galc-ui/node_modules/.bin/eslint --ext .js,.vue src

/Users/david/Work/BerkeleyLibrary/galc-ui/src/api/index.js
  26:10  error  'jsonApi' is defined but never used    no-unused-vars
  48:13  error  Unexpected trailing comma              comma-dangle
  57:10  error  'getFacets' is defined but never used  no-unused-vars

✖ 3 problems (3 errors, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

error Command failed with exit code 1.

eslint-config-standard @ 16.x is for use with ESLint 7.x
eslint-config-standard @ 17.x is for use with ESLint 8.x

There is a prerelease of the latter: https://github.com/standard/eslint-config-standard/releases/tag/v17.0.0-1

We track progress in: #208