-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix: typescript peer dependency #10373
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 peer dependency #10373
Conversation
|
Thanks for the PR, @rtritto! 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. |
|
Related #9744 |
d22d19b to
e08bcad
Compare
|
Added reproduction |
e08bcad to
0ae44b8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10373 +/- ##
=======================================
Coverage 86.76% 86.76%
=======================================
Files 444 444
Lines 15311 15311
Branches 4457 4457
=======================================
Hits 13285 13285
Misses 1672 1672
Partials 354 354
Flags with carried forward coverage won't be shown. Click here to find out more. |
0ae44b8 to
abc7931
Compare
|
Rebased |
bradzacher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for doing this and sticking with us!
|
@bradzacher could you guys please make the semver range more lenient? |
|
This PR was a breaking change (adding a peer dependency always is); see #10480. The proper fix here was probably downgrading to a version of ts-api-utils that doesn't have the peer dep. |
##### [v8.18.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8180-2024-12-09) ##### 🚀 Features - **eslint-plugin:** \[switch-exhaustiveness-check] add support for "no default" comment ([#10218](typescript-eslint/typescript-eslint#10218)) - **eslint-plugin:** \[no-deprecated] report on super call of deprecated constructor ([#10397](typescript-eslint/typescript-eslint#10397)) ##### 🩹 Fixes - **eslint-plugin:** \[use-unknown-in-catch-callback-variable] only flag function literals ([#10436](typescript-eslint/typescript-eslint#10436)) - **eslint-plugin:** \[no-base-to-string] handle more robustly when multiple `toString()` declarations are present for a type ([#10432](typescript-eslint/typescript-eslint#10432)) - **eslint-plugin:** \[no-deprecated] check if a JSX attribute is deprecated ([#10374](typescript-eslint/typescript-eslint#10374)) - typescript peer dependency ([#10373](typescript-eslint/typescript-eslint#10373)) ##### ❤️ Thank You - Kim Sang Du [@developer-bandi](https://github.com/developer-bandi) - Kirk Waiblinger [@kirkwaiblinger](https://github.com/kirkwaiblinger) - mdm317 - rtritto You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
|
@AviVahl the range represents what we officially support. As we have seen many times in the past the newer versions of TS could cause crashes until we release support. If you want to use a newer version of TS then you can use your package manager's flag to specify you want to ignore the peer dependency ranges. |
|
Regardless - as per our contributing guide - we do not seek comments on PRs because it's not searchable from the issue search. Please file an issue if you wish to discuss further. |

PR Checklist
Overview
typescriptis a mandatory peer dependency (peerDepedency ofts-api-utils) and not optional peer dependency (it needs to be removed from peerDepedencyMeta).Info
ts-api-utilshastypescriptas peer dependency:Changes
@typescript-eslint/typescript-estreeusests-api-utilsdependency that hastypescriptas peer dependency (see Info)@typescript-eslint/utilsuses@typescript-eslint/typescript-estreedependency that usests-api-utilsdependency. It needstypescriptpeer dependency@typescript-eslint/parseruses@typescript-eslint/typescript-estreedependency that usests-api-utilsdependency. It needstypescriptpeer dependency@typescript-eslint/type-utilsuses@typescript-eslint/typescript-estreeand@typescript-eslint/utilsdependencies that usets-api-utilsdependency. It needstypescriptpeer dependency@typescript-eslint/eslint-pluginuses@typescript-eslint/utilsdependency that uses@typescript-eslint/typescript-estreedependency that hastypescriptas peer dependencytypescript-eslintuses@typescript-eslint/parserand@typescript-eslint/utilsdependencies that uses@typescript-eslint/typescript-estreedependency that hastypescriptas peer dependencyIssue Reproduction
Case where
typescriptis omitted byeslint-plugin-solidbecause@typescript-eslint/utilsdin't hastypescriptas mandatory peer dependency.yarn init -yyarn set version berryyarn add -D eslint typescript eslint-plugin-solidyarn explain peer-requirementsand see logspcc27b → ✘ eslint-plugin-solid@npm:0.14.4 [3223e] doesn't provide typescript to @typescript-eslint/utils@npm:8.15.0 [e3d25] and 2 other dependenciesyarn explain peer-requirements pcc27band see logs