antfu / eslint-config

Anthony's ESLint config preset
https://eslint-config.antfu.me/
MIT License
3.41k stars 400 forks source link

Svelte Dependency Conflict #503

Closed MrVauxs closed 2 weeks ago

MrVauxs commented 2 weeks ago

Describe the bug

Attempting to add npm i -D eslint-plugin-svelte after npm i -D eslint @antfu/eslint-config causes a conflicting peer dependency

Reproduction

mkdir test && cd test && npm create -y && npm i -D eslint @antfu/eslint-config eslint-plugin-svelte && npm i

System Info

'Log files:
C:\Users\mrvau\AppData\Local\npm-cache\_logs\2024-06-13T21_25_33_052Z-debug-0.log

# npm resolution error report

While resolving: @antfu/eslint-config@2.21.1
Found: svelte-eslint-parser@0.37.0
node_modules/svelte-eslint-parser
  peerOptional svelte-eslint-parser@"^0.37.0" from eslint-plugin-perfectionist@2.11.0
  node_modules/eslint-plugin-perfectionist
    eslint-plugin-perfectionist@"^2.10.0" from @antfu/eslint-config@2.21.1
    node_modules/@antfu/eslint-config
      dev @antfu/eslint-config@"^2.21.1" from the root project
  svelte-eslint-parser@"^0.37.0" from eslint-plugin-svelte@2.39.3
  node_modules/eslint-plugin-svelte
    dev eslint-plugin-svelte@"^2.39.3" from the root project
    peerOptional eslint-plugin-svelte@">=2.35.1" from @antfu/eslint-config@2.21.1
    node_modules/@antfu/eslint-config
      dev @antfu/eslint-config@"^2.21.1" from the root project

Could not resolve dependency:
peerOptional svelte-eslint-parser@"^0.33.1" from @antfu/eslint-config@2.21.1
node_modules/@antfu/eslint-config
  dev @antfu/eslint-config@"^2.21.1" from the root project

Conflicting peer dependency: svelte-eslint-parser@0.33.1
node_modules/svelte-eslint-parser
  peerOptional svelte-eslint-parser@"^0.33.1" from @antfu/eslint-config@2.21.1
  node_modules/@antfu/eslint-config
    dev @antfu/eslint-config@"^2.21.1" 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.

Used Package Manager

npm

Validations

Contributions