Skip to content

Bug: typing issue on tseslint.config with ESLint 9.29.0 #11308

Closed as not planned
@threeal

Description

@threeal

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

See: threeal/nodejs-starter#839

ESLint Config

// eslint.config.ts

import eslint from "@eslint/js";
import { globalIgnores } from "eslint/config";
import tseslint from "typescript-eslint";

export default tseslint.config(
  globalIgnores(["dist"]),
  eslint.configs.recommended,
  tseslint.configs.strictTypeChecked,
  tseslint.configs.stylisticTypeChecked,
  {
    languageOptions: {
      parserOptions: {
        projectService: true,
        tsconfigRootDir: import.meta.dirname,
      },
    },
  },
);

tsconfig

{
  "extends": "@tsconfig/node24",
  "compilerOptions": {
    "noEmit": true
  }
}

Expected Result

Call to tsc does not cause typing error.

Actual Result

Call to tsc result in the following:

eslint.config.ts:6:3 - error TS2345: Argument of type 'Config<RulesRecord>' is not assignable to parameter of type 'InfiniteDepthConfigWithExtends'.
  Type 'Config<RulesRecord>' is not assignable to type 'ConfigWithExtends'.
    Types of property 'languageOptions' are incompatible.
      Type 'import("/Users/threeal/Workspaces/nodejs/nodejs-starter/node_modules/.pnpm/eslint@9.29.0_jiti@2.4.2/node_modules/eslint/lib/types/index").Linter.LanguageOptions | undefined' is not assignable to type 'import("/Users/threeal/Workspaces/nodejs/nodejs-starter/node_modules/.pnpm/@typescript-eslint+utils@8.34.0_eslint@9.29.0_jiti@2.4.2__typescript@5.8.3/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions | undefined'.
        Type 'import("/Users/threeal/Workspaces/nodejs/nodejs-starter/node_modules/.pnpm/eslint@9.29.0_jiti@2.4.2/node_modules/eslint/lib/types/index").Linter.LanguageOptions' is not assignable to type 'import("/Users/threeal/Workspaces/nodejs/nodejs-starter/node_modules/.pnpm/@typescript-eslint+utils@8.34.0_eslint@9.29.0_jiti@2.4.2__typescript@5.8.3/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions'.
          Types of property 'ecmaVersion' are incompatible.
            Type 'EcmaVersion | undefined' is not assignable to type 'EcmaVersion'.
              Type '17' is not assignable to type 'EcmaVersion'.

6   globalIgnores(["dist"]),
    ~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in eslint.config.ts:6

Call to eslint does not have any issue, so purely typing issue. There's also no issue when using ESLint 9.28.0 or below.

Additional Info

No response

Versions

package version
typescript-eslint 8.34.0
TypeScript 5.8.3
ESLint 9.29.0
node 24.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already existsfix: out of date packagesuser was on an old version of our tooling or ESLint, updating fixed itlocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.triageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy