Skip to content

Package.json for eslint-config-react-app on NPM is incorrect #8998

Closed
@Svish

Description

@Svish

Describe the bug

The package.json file for eslint-config-react-app differs between NPM and Git for one peer dependency:

  • Git: "eslint-plugin-react-hooks": "1.x || 2.x || 3.x || 4.x"
  • Npm: "eslint-plugin-react-hooks": "1.x || 2.x"

Both has "version": "5.2.1", and everything else matches, except for this one peer dependency. 😕

Steps to reproduce

  1. Inspect package.json on git:
    "version": "5.2.1"
    "eslint-plugin-react-hooks": "1.x || 2.x || 3.x || 4.x"
  2. Run npm pack eslint-config-react-app
  3. Inspect the package.json within the downloaded tgz package:
    "version": "5.2.1"
    "eslint-plugin-react-hooks": "1.x || 2.x"

Expected behavior

Would expect the acceptable versions of "eslint-plugin-react-hooks" to be the same in both places.

Actual behavior

Acceptable versions do not match. Means npm gives me a warning when I try to upgrade eslint-plugin-react-hooks to its latest version, 4.x:

> npm install eslint-plugin-react-hooks@4
npm WARN eslint-config-react-app@5.2.1 requires a peer of eslint-plugin-react-hooks@1.x || 2.x but none is installed. You must install peer dependencies yourself.

+ eslint-plugin-react-hooks@4.0.1
updated 1 package and audited 712 packages in 3.669s

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions