useDimensions
useDimensions copied to clipboard
Typescript related peerDependencies trigger errors in npm list
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
+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.