Skip to content

Type issue with FlatConfig: Type '17' is not assignable to type 'EcmaVersion' #19858

Closed
@borisbreuer

Description

@borisbreuer

Environment

Node version: 20.18.2
npm version: 11.3.0
Local ESLint version: 9.29.0
Global ESLint version: 9.29.0
Operating System: Win 11

What parser are you using?

Other

What did you do?

Configuration

Hello,

since 9.29.0 i have an issue with Type '17' is not assignable to type 'EcmaVersion'.ts(2345)
(property) 'flat/strongly-recommended': Linter.FlatConfig<Linter.RulesRecord>[]

did i miss something in the docs?

Cheers Guys

import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
import pluginVuetify from 'eslint-plugin-vuetify'

export default defineConfigWithVueTs(
  pluginVue.configs['flat/strongly-recommended'],
  pluginVuetify.configs['flat/base'],
  vueTsConfigs.recommended,
  {
    plugins: {
      vue: pluginVue,
      vuetify: pluginVuetify,
    },
    settings: {
      'import/resolver': {
        alias: {
          map: [['@', './src']],
          extensions: ['.ts', '.vue', '.json'],
        },
      },
    },
    ignores: [
      '**/*.d.ts',
      '**/*.js',
      '**/local-*',
      'coverage/',
      'dist/',
      'node_modules/',
      'eslint.config.ts',
      'tsconfig.json',
    ],
    rules: {
      'sort-imports': [
        'error',
        {
          ignoreCase: false,
          ignoreDeclarationSort: false,
          ignoreMemberSort: false,
          memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
          allowSeparatedGroups: true,
        },
      ],
      indent: ['error', 2],
      semi: ['error', 'never'],
      quotes: ['error', 'single'],
      'block-spacing': 'error',
      'no-multi-spaces': 'error',
      'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0 }],
      'comma-dangle': ['error', 'always-multiline'],
      'comma-spacing': ['error', { before: false, after: true }],
      'no-whitespace-before-property': 'error',
      'no-trailing-spaces': 'error',
      'space-before-function-paren': [
        'error',
        {
          anonymous: 'never',
          named: 'never',
          asyncArrow: 'always',
        },
      ],
      'space-infix-ops': 'error',
      'space-unary-ops': 'error',
      'template-curly-spacing': ['error', 'never'],
      'vue/v-on-event-hyphenation': ['error', 'never', { autofix: true }],
      '@typescript-eslint/no-explicit-any': 'off',
      '@typescript-eslint/no-unused-vars': [
        'warn',
        'all',
      ],
      'object-curly-spacing': ['error', 'always'],
      'vue/component-name-in-template-casing': ['error', 'kebab-case', { registeredComponentsOnly: false }],
    },
  },
)
Argument of type 'FlatConfig<RulesRecord>[]' is not assignable to parameter of type 'InfiniteDepthConfigWithExtendsAndVueSupport'.
  Type 'FlatConfig<RulesRecord>[]' is not assignable to type 'InfiniteDepthConfigWithExtendsAndVueSupport[]'.
    Type 'FlatConfig<RulesRecord>' is not assignable to type 'InfiniteDepthConfigWithExtendsAndVueSupport'.
      Type 'Config<RulesRecord>' is not assignable to type 'ConfigItemWithExtendsAndVueSupport'.
        The types of 'languageOptions.ecmaVersion' are incompatible between these types.
          Type 'import("PROJECT/node_modules/eslint/lib/types/index").Linter.EcmaVersion' is not assignable to type 'import("PROJECT/node_modules/@typescript-eslint/types/dist/parser-options").EcmaVersion'.
            Type '17' is not assignable to type 'EcmaVersion'.ts(2345)
(property) 'flat/strongly-recommended': Linter.FlatConfig<Linter.RulesRecord>[]

What did you expect to happen?

no breaking changes

What actually happened?

changes breaked my setup

Link to Minimal Reproducible Example


Participation

  • I am willing to submit a pull request for this issue.

Additional comments

Sorry could not build an example on stackbliz

Metadata

Metadata

Assignees

No one assigned

    Labels

    3rd party pluginThis is an issue related to a 3rd party plugin, config, or parserrepro:yesIssues with a reproducible example

    Type

    No type

    Projects

    Status

    Complete

    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