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
fix(typescript-eslint): declare peer dependency on utils
to ensure npm correctly installs dependencies
#8738
Conversation
…npm correctly installs dependencies
Thanks for the PR, @bradzacher! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…npm correctly installs dependencies (typescript-eslint#8738)
PR Checklist
Overview
typescript-eslint
is currently "naughty" and accesses types from/utils
via a transitive dependency.This means that the types we receive depend on how the package manager installs things.
pnpm and npm both do a bad job of installing dependencies in the most sane way (npm/cli#7300) and given the current ecosystem it's possible to get an old major for
/utils
installed at the root instead of v7. This means TS will get the incorrect types for/utils
and then the config types break.This adds a hard dep on
/utils
to force the relationship so that all package managers do the same thing and either hoist the/utils
dependency to the root, or at least ensure that/utils
is nested withintypescript-eslint
.I considered making this a peer dep - but considering
/eslint-plugin
already depends on/utils
- it's always installed (i.e. we're not adding an extra dep) - so no need to do anything complicated that might be misinterpreted by package managers.