Closed
Description
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
- clone the repo
pnpm install
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
Labels
Go ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issueSomething isn't workingSomething isn't workingPlease 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.issues relating to vue supportissues relating to vue support