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
I haven't exactly narrowed down why yet, but there appears to be a performance degradation in patterns like this:
type Alpha2Code =
| "AF"
...
| "XK";
type LanguageCode =
| "aa"
...
| "zu";
type Locale = `${LanguageCode}-${Alpha2Code}`;
export function getDefaultLocale() {
return 'en-AU' as Locale;
}
In the example reproduction, it takes about 73 seconds on my machine.
Note that tsc
takes 0.7s.
Reproduction Repository Link
https://github.com/AaronMoat/typescript-eslint-perf
Repro Steps
- clone the repo
yarn install
yarn lint
Versions
package | version |
---|---|
typescript-eslint |
8.11.0 |
TypeScript |
5.6.3 |
ESLint |
9.13.0 |
node |
v20.17.0 |