sindresorhus / grunt-eslint

Validate files with ESLint
MIT License
200 stars 72 forks source link

Remove grunt from peerDependencies in package.json #149

Closed shama closed 7 years ago

shama commented 7 years ago

Ref: https://github.com/gruntjs/grunt/issues/1116

I think grunt as a peer dep should be removed. We have already removed grunt from peerDependencies in the contrib-* plugins as older versions of npm fail with EPEERINVALID on them.

Given how broken peer deps can be and that they are deprecated, we are recommending removing grunt as a peer dep.

Thanks!

sindresorhus commented 7 years ago

I haven't heard of peerDependencies being deprecated. Source?

npm@3 changed to not install peerDependencies automatically. peerDependencies can still be useful to have a warning printed to the user if they try to use an incompatible plugin though.

shama commented 7 years ago

Sorry I misspoke, you're right, not deprecated, behavior changed. I still don't think peerDependencies should be used. I don't find the warnings helpful in informing the user how to resolve the peer dependency issue, it breaks on prerelease tags and it breaks in older environments.

We got around the grunt builds failing on this plugin by installing npm@3 for older versions of Node and recommend others to upgrade npm as a fix too. So feel free to ignore this request if you feel strongly about keeping peerDependencies.

sindresorhus commented 7 years ago

I'm gonna keep it. peerDependencies are widely used for other things I maintain too like ESLint plugin and shared configs.