-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Labels
Description
Environment
@nuxt/eslint: 1.15.0eslint: 9.39.2npm: 11.xnode: 22.x
Problem
@nuxt/eslint@1.15.0 and @nuxt/eslint-config@1.15.0 both declare support for ESLint 9 in their peer dependencies:
"peerDependencies": {
"eslint": "^9.0.0 || ^10.0.0"
}However, the pnpm-workspace.yaml catalog sets:
catalogs:
prod:
'@eslint/js': ^10.0.1 # Published with packages
dev:
eslint: ^9.39.2 # Used for developmentThis is inconsistent: the monorepo itself uses ESLint 9 for development, but publishes @eslint/js@^10.0.1 which has a peerOptional on eslint@^10.0.0.
As a result, using @nuxt/eslint@1.15.0 with ESLint 9 produces warnings on every install:
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @eslint/js@10.0.1
npm warn Found: eslint@9.39.2
npm warn Could not resolve dependency:
npm warn peerOptional eslint@"^10.0.0" from @eslint/js@10.0.1
Comparison
| Version | @eslint/js dependency |
|---|---|
@nuxt/eslint-config@1.14.0 |
^9.39.2 ✅ |
@nuxt/eslint-config@1.15.0 |
^10.0.1 ❌ |
Expected Behavior
If @nuxt/eslint advertises ESLint 9 support, the resolved dependencies should not produce warnings when used with ESLint 9.
Suggested Fix
Update the catalog to support both versions:
catalogs:
prod:
'@eslint/js': ^9.39.2 || ^10.0.1This allows users to migrate to ESLint 10 at their own pace while maintaining backward compatibility with ESLint 9.
Reproduction
npm init -y
npm install @nuxt/eslint@1.15.0 eslint@^9.39.2
# Warning appears on installWorkaround
Downgrade to @nuxt/eslint@1.14.0 which uses @eslint/js@^9.39.2.
Reactions are currently unavailable