Skip to content

[bug] Missing peer dependencies #1248

@milang

Description

@milang

Describe the bug

Even though the top-level package @eslint-react/eslint-plugin correctly declares peer dependencies (eslint and typescript), the "intermediate" packages @eslint-react/ast, @eslint-react/core, @eslint-react/kit, @eslint-react/shared, and @eslint-react/var do not do this. Lack of peer dependencies in the intermediate packages causes yarn@4 to report warnings:

Image

Details for @eslint-react/ast (the others are similar) - eslint:

Image

typescript:

Image

Please note that the issues go away when using packageExtensions configuration:

packageExtensions:
  "@eslint-react/ast@*": { peerDependencies: { "eslint": ">= 9", "typescript": ">= 5" } }
  "@eslint-react/core@*": { peerDependencies: { "eslint": ">= 9", "typescript": ">= 5" } }
  "@eslint-react/kit@*": { peerDependencies: { "eslint": ">= 9", "typescript": ">= 5" } }
  "@eslint-react/shared@*": { peerDependencies: { "eslint": ">= 9", "typescript": ">= 5" } }
  "@eslint-react/var@*": { peerDependencies: { "eslint": ">= 9", "typescript": ">= 5" } }

This tells yarn to behave as though the specified packages were published with the specified peerDependencies in their package.json.

It would be nice to not have to add this configuration to every project that uses @eslint-react/eslint-plugin in order to keep the yarn install warning-free.


Platform and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions