Skip to content

Issue with the subDependencies of typescript-eslint #9112

Closed as not planned
Closed as not planned
@rajanmiddha001

Description

@rajanmiddha001

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Relevant Package

typescript-eslint

Playground Link

No response

Repro Code

I started to install the packages 
eslint: 9.2.0 ,
typescript-eslint: 7.9.0
but it gives me an error Conflicting peer dependency: eslint@8.57.0 because typescript-eslint has eslint in the package.json with fixed version "8.57.0"  so it throws an error

ESLint Config

import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import sonarjs from "eslint-plugin-sonarjs";


export default [
  {
    languageOptions: { 
      globals: globals.node 
    }
  },
  pluginJs.configs.recommended,
  ...tseslint.configs.recommended,
  sonarjs.configs.recommended,
  {
    "rules": {
      "complexity": ["error", 7],
      "@typescript-eslint/no-explicit-any": ["off"]
    }
  }
];

tsconfig

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": { "*": ["types/*"] },
    "target": "ES2021",                          
    "module": "commonjs",                     
    "sourceRoot": "src",
    "outDir": "dist",
    "noImplicitAny": false,
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "declaration": false,
    "listFiles": false
  },
  "include": [
    "src/**/*"
  ],
  "exclude": [
    "test/**/*",
    ".vscode",
    ".serverless",
    ".git",
    "node_modules/**/*",
    "dist",
    ".eslintrc.js"
  ],
  "compileOnSave": true,
  "buildOnSave": false,
  "atom": {
    "rewriteTsconfig": false
  }
}

Expected Result

so it shouldn't fixed the eslint version to 8.57.0

Actual Result

it restricted me to install the npm packages.

Additional Info

No response

Versions

package version
@eslint/js 9.2.0
@typescript-eslint 7.9.0
TypeScript 5.4.5
ESLint 9.2.0

eslint error
typescript-eslint

Metadata

Metadata

Assignees

No one assigned

    Labels

    fix: user errorissue was fixed by correcting the configuration / correcting the codelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions