A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/typescript-eslint/typescript-eslint/issues/10899 below:

typescript-eslint config types are incompatible with `defineConfig()` types · Issue #10899 · typescript-eslint/typescript-eslint · GitHub

Before You File a Proposal Please Confirm You Have Done The Following... Description

I just installed eslint with typescript-eslint (npm init @eslint/config@latest) - I haven't done anything yet - right away I get this error.

Type '({ readonly rules: Readonly<RulesRecord>; } | Config)[]' is not assignable to type 'Config<RulesRecord>[]'.
  Type '{ readonly rules: Readonly<RulesRecord>; } | Config' is not assignable to type 'Config<RulesRecord>'.
    Type 'Config' is not assignable to type 'Config<RulesRecord>'.
      Types of property 'languageOptions' are incompatible.
        Type 'import("/media/neuronet/projekty/event-conductor/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions | undefined' is not assignable to type 'import("/media/neuronet/projekty/event-conductor/node_modules/eslint/lib/types/index").Linter.LanguageOptions | undefined'.
          Type 'import("/media/neuronet/projekty/event-conductor/node_modules/@typescript-eslint/utils/dist/ts-eslint/Config").FlatConfig.LanguageOptions' is not assignable to type 'import("/media/neuronet/projekty/event-conductor/node_modules/eslint/lib/types/index").Linter.LanguageOptions'.
            Types of property 'parser' are incompatible.
              Type 'LooseParserModule | undefined' is not assignable to type 'Parser | undefined'.
                Type '{ meta?: { name?: string | undefined; version?: string | undefined; } | undefined; parseForESLint(text: string, options?: unknown): { ast: unknown; scopeManager?: unknown; services?: unknown; visitorKeys?: unknown; }; }' is not assignable to type 'Parser | undefined'.
                  Type '{ meta?: { name?: string | undefined; version?: string | undefined; } | undefined; parseForESLint(text: string, options?: unknown): { ast: unknown; scopeManager?: unknown; services?: unknown; visitorKeys?: unknown; }; }' is not assignable to type 'Omit<ESTreeParser, "parseForESLint"> & { parseForESLint(text: string, options?: any): Omit<ESLintParseResult, "ast" | "scopeManager"> & { ...; }; }'.
                    Type '{ meta?: { name?: string | undefined; version?: string | undefined; } | undefined; parseForESLint(text: string, options?: unknown): { ast: unknown; scopeManager?: unknown; services?: unknown; visitorKeys?: unknown; }; }' is not assignable to type '{ parseForESLint(text: string, options?: any): Omit<ESLintParseResult, "ast" | "scopeManager"> & { ast: unknown; scopeManager?: unknown; }; }'.
                      The types returned by 'parseForESLint(...)' are incompatible between these types.
                        Type '{ ast: unknown; scopeManager?: unknown; services?: unknown; visitorKeys?: unknown; }' is not assignable to type 'Omit<ESLintParseResult, "ast" | "scopeManager"> & { ast: unknown; scopeManager?: unknown; }'.
                          Type '{ ast: unknown; scopeManager?: unknown; services?: unknown; visitorKeys?: unknown; }' is not assignable to type 'Omit<ESLintParseResult, "ast" | "scopeManager">'.
                            Types of property 'visitorKeys' are incompatible.
                              Type 'unknown' is not assignable to type 'VisitorKeys | undefined'.ts(2322)
Impacted Configurations
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";

/** @type {import('eslint').Linter.Config[]} */
export default [
  { files: ["**/*.{js,mjs,cjs,ts}"] },
  { languageOptions: { globals: { ...globals.browser, ...globals.node } } },
  pluginJs.configs.recommended,
  ...tseslint.configs.recommended,
];
Additional Info
"typescript-eslint": "^8.25.0"
"@eslint/js": "^9.21.0",
"eslint": "^9.21.0",

I am using vscode with:
https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint @ latest
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode @ latest

I have read that the problem is with the eslint types (#10872) but maybe you will find another way to fix this - so I leave this bug here :P

gtbuchanan, val-2, paschun, 01397, davidkarlsson and 25 morekoistya and jahands


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4