Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript related peerDependencies trigger errors in npm list #21

Open
johnhunter opened this issue Oct 22, 2019 · 1 comment
Open

Comments

@johnhunter
Copy link

typescript and @types/react are included as peerDependencies although they seem to be optional. I don't use Typescript and don't want to install them. But npm install raises warnings for these missing peer deps. Worse is that npm list errors on them and this breaks https://github.com/pivotal/LicenseFinder which we use in our CI pipeline.

Maybe these should be devDependencies?

    "peerDependencies": {
        "@types/react": "^16.8.20",
        "react": "^16.8.x",
        "typescript": "^3.5.2"
    },

https://github.com/Swizec/useDimensions/blob/master/package.json#L21-L25

@MattWilliamsDev
Copy link

+1 to this.

Currently working on a project that cannot use TS but we don't seem to have issues using the hook. However, the warning that pops up could give pause to other devs working on the project and make them want to drop the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants