Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bug: Vue + TypeScript project slowdown with v8 alpha #9312

Copy link
Copy link
Closed
@jfrs

Description

@jfrs
Issue body actions

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.

Issue Description

After upgrading a fairly standard Vue + TypeScript project (ESLint from v8 to v9, and typescript-eslint from v7 to v8), with a similar configuration the linting time goes from +/- 20 seconds to 3 minutes.

The command is eslint src, where src is a directory containing only .ts and .vue files.

Old .eslintrc.json:

{
  "root": true,
  "parser": "vue-eslint-parser",
  "parserOptions": {
    "parser": "@typescript-eslint/parser",
    "project": true,
    "extraFileExtensions": [".vue"]
  },
  "extends": [
    "plugin:@typescript-eslint/strict-type-checked",
    "plugin:@typescript-eslint/stylistic-type-checked",
    "plugin:vue/vue3-recommended",
    "prettier"
  ],
  "overrides": [
    {
      "files": ["src/types/*.d.ts"],
      "rules": {
        "@typescript-eslint/no-extraneous-class": ["error", { "allowConstructorOnly": true }]
      }
    }
  ]
}

New eslint.config.js

import eslintConfigPrettier from 'eslint-config-prettier';
import pluginVue from 'eslint-plugin-vue';
import tseslint from 'typescript-eslint';

export default tseslint.config(
  ...tseslint.configs.strictTypeChecked,
  ...tseslint.configs.stylisticTypeChecked,
  ...pluginVue.configs['flat/recommended'],
  eslintConfigPrettier,
  {
    languageOptions: {
      parserOptions: {
        parser: tseslint.parser,
        projectService: true,
        extraFileExtensions: ['.vue']
      }
    }
  },
  {
    rules: {
      '@typescript-eslint/no-unused-vars': ['error', { caughtErrorsIgnorePattern: 'ignore' }]
    }
  },
  {
    files: ['src/types/*.d.ts'],
    rules: {
      '@typescript-eslint/no-extraneous-class': ['error', { allowConstructorOnly: true }]
    }
  },
  {
    ignores: ['eslint.config.js']
  }
);

Reproduction Repository Link

Private repository but I can give people access to it

Repro Steps

  1. clone the repo
  2. pnpm install
  3. pnpm lint

Versions

package version
typescript-eslint 8.0.0-alpha.29
TypeScript 5.4.5
ESLint 9.4.0
node 22.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.vueissues relating to vue supportissues relating to vue support

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.