Skip to content

Bug: [typescript-eslint] missing eslint transitive peer dependency #10078

Closed as not planned
@rtritto

Description

@rtritto

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Playground Link

NA

Repro Code

- `yarn init -y`
- `yarn set version berry`
- `yarn add -D eslint typescript typescript-eslint`
- see logs

ESLint Config

NA

tsconfig

NA

Expected Result

No warning in logs:

➤ YN0000: · Yarn 4.5.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Post-resolution validation
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed                                                                                                                       
➤ YN0000: ┌ Deduplication step
➤ YN0000: │ No packages can be deduped using the highest strategy
➤ YN0000: └ Completed
➤ YN0000: · Done with warnings

yarn explain peer-requirements

p6025f → ✓ typescript-eslint@npm:8.8.0 [3223e] doesn't provide @types/eslint to @typescript-eslint/eslint-plugin@npm:8.8.0 [198f3] and 3 other dependencies
p815e2 → ✓ typescript-eslint@npm:8.8.0 [3223e] doesn't provide @types/typescript-eslint__parser to @typescript-eslint/eslint-plugin@npm:8.8.0 [198f3]
p97120 → ✓ typescript-eslint@npm:8.8.0 [3223e] provides @typescript-eslint/parser@npm:8.8.0 [198f3] to @typescript-eslint/eslint-plugin@npm:8.8.0 [198f3]
p8687d → ✓ typescript-eslint@npm:8.8.0 [3223e] provide eslint to @typescript-eslint/eslint-plugin@npm:8.8.0 [198f3] and 3 other dependencies

Actual Result

Warning in logs:

➤ YN0000: · Yarn 4.5.0
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Post-resolution validation
➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed                                                                                                                       
➤ YN0000: ┌ Deduplication step
➤ YN0000: │ No packages can be deduped using the highest strategy
➤ YN0000: └ Completed
➤ YN0000: · Done with warnings

yarn explain peer-requirements

p6025f → ✓ typescript-eslint@npm:8.8.0 [3223e] doesn't provide @types/eslint to @typescript-eslint/eslint-plugin@npm:8.8.0 [198f3] and 3 other dependencies
p815e2 → ✓ typescript-eslint@npm:8.8.0 [3223e] doesn't provide @types/typescript-eslint__parser to @typescript-eslint/eslint-plugin@npm:8.8.0 [198f3]
p97120 → ✓ typescript-eslint@npm:8.8.0 [3223e] provides @typescript-eslint/parser@npm:8.8.0 [198f3] to @typescript-eslint/eslint-plugin@npm:8.8.0 [198f3]
p8687d → ✘ typescript-eslint@npm:8.8.0 [3223e] doesn't provide eslint to @typescript-eslint/eslint-plugin@npm:8.8.0 [198f3] and 3 other dependencies

Additional Info

A workaround (with yarn berry):

# .yarnrc.yml
packageExtensions:
  typescript-eslint@*:
    peerDependencies:
      eslint: "*"

An article, related to transitive peer dependencies, written by author of yarn package manager: Implicit Transitive Peer Dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-plugintriageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions