Open latin-1 opened 1 month ago
This seems like a really weird constraint for yarn to enforce - to force a package to declare a peer dependency for its transient peer dependencies.
For the record the dependencies haven't changed since v7 AFAIK. So it should fail in the same way.
@bradzacher The requirement for Yarn is that every transitive peer dependency needs to either be "passed on" as peer dependency or declared as dependency (so all packages further up the chain don't need to declare it anymore)
(maybe off-topic) BTW, yarn and pnpm (but not npm >= 7, which appears to have a bug^1) allow you to declare a dependency in both dependencies
and peerDependencies
. The one in dependencies
will act as a fallback.
Hi,
Same problem here today but using NPM.
My dev dependencies versions:
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"eslint": "^9.4.0",
}
When I try to run npm install
:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: project-name@0.1.0
npm ERR! Found: eslint@9.4.0
npm ERR! node_modules/eslint
npm ERR! dev eslint@"^9.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^8.56.0" from @typescript-eslint/parser@7.12.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR! dev @typescript-eslint/parser@"^7.12.0" from the root project
npm ERR! peer @typescript-eslint/parser@"^7.0.0" from @typescript-eslint/eslint-plugin@7.12.0
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! dev @typescript-eslint/eslint-plugin@"^7.12.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
@LFCavalcanti youre using eslint v9 with typescript-eslint v7. That pairing is not valid - typescript-eslint v7 only supports eslint v8.
@LFCavalcanti youre using eslint v9 with typescript-eslint v7. That pairing is not valid - typescript-eslint v7 only supports eslint v8.
Yeah, I managed to fix that updating to this:
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"eslint": "^8.57.0",
}
I already tried fixing the Eslint version to ^8.57.0
but the error persisted.
The catch was updating Eslint first, then the parser and finally the plugin.
Thanks!
@LFCavalcanti youre using eslint v9 with typescript-eslint v7. That pairing is not valid - typescript-eslint v7 only supports eslint v8.
What's the meaning behind this statement? Does typescript-eslint
plan to ever support ESLint 9 or? I see the documentation references flat config which is for ESLint 9 - but peer dependency says v8.x.x. Also aside from the warning everything works?
Flat config support !== ESLint 9 support. You can support one without the other.
Issues on our side:
v7
v8
branch, currently in beta@bradzacher
@LFCavalcanti youre using eslint v9 with typescript-eslint v7. That pairing is not valid - typescript-eslint v7 only supports eslint v8.
current eslint version is v9, how do I use typescript-eslint if the current version is v7? is there an alpha version or something like that?
I'm going to lock this issue as the conversation is going way off topic. We shall investigate the peer deps.
Before You File a Bug Report Please Confirm You Have Done The Following...
Relevant Package
typescript-eslint
Playground Link
No response
Repro Code
ESLint Config
No response
tsconfig
No response
Expected Result
Installed without any warnings.
Actual Result
yarn install
reports unmet peer dependencies.Additional Info
No response
Versions
typescript-eslint
8.0.0-alpha.25
TypeScript
5.4.5
ESLint
9.4.0